On 2025-03-10 21:55, Aurelien Jarno wrote:
> Hi Bill,
> 
> On 2025-03-10 18:48, Bill Allombert wrote:
> > On Mon, Mar 10, 2025 at 12:24:43PM +0100, Bill Allombert wrote:
> > > On Fri, Mar 07, 2025 at 11:45:10AM +0100, Bill Allombert wrote:
> > > > I am still unsure wether there is a race condition in PARI or not, 
> > > > however if
> > > > there is, it is clear that 2.41 makes the issue much worse.
> > > 
> > > Hello Aurélien,
> > > 
> > > I have made some progress. I have made a test program that does not use 
> > > PARI/GP.
> > > You need to compile with -O0 to hit the race condition.
> > > 
> > > gcc  pthread1.c -Wall -O0 -g -pthread -o pthread1
> > 
> > I join a simplified version.
> > 
> > gcc  pthread3.c -Wall -O0 -g -pthread -o pthread3
> > 
> > for i in `seq 1 100`; do echo -n "$i " && sid ./pthread3 || break; done
> > 
> > This crashes or hangs with 2.41 while it works fine with 2.36.
> 
> I have just tested that before and with upstream commit 89b53077d2a5,
> and I confirm that your testcase passes without that commit and fails
> with it. Great job!

I also noticed it failed the same way on arm64.

> > Please tell me if you would like me to do more experiments.
> 
> If you have time, yes, that's very useful. I'll also try to have a
> closer look at your testcase, but it already seems relatively small.

I am not sure I understand everything yet, but it seems that building
pari with -fexceptions is a good workaround for the issue.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                     http://aurel32.net

Reply via email to