Re: [PATCH, libgfortran] Remove recursion check

2018-11-10 Thread Thomas Koenig
Hi Janne, 1) It's KISS 2) I can't find anything in the code that would lead to endless recursive invocation of the error printing functions. So, Ok for trunk? With async I/O, I think the possibilities of hitting concurrent errors have increased, so I'd still prefer the solution with wrappi

Re: [PATCH, libgfortran] Remove recursion check

2018-11-08 Thread Janne Blomqvist
On Sun, Oct 7, 2018 at 12:36 AM Thomas Koenig wrote: > Hi Janne, > > > The error handling functions can be called from a signal handler, so they > > need to be async-signal-safe. > > I didn't know that. How can this happen? > Hmm, seems I was imagining things, I can't find anything like that in

Re: [PATCH, libgfortran] Remove recursion check

2018-10-06 Thread Thomas Koenig
Hi Janne, The error handling functions can be called from a signal handler, so they need to be async-signal-safe. I didn't know that. How can this happen? Regards Thomas

Re: [PATCH, libgfortran] Remove recursion check

2018-10-06 Thread Janne Blomqvist
On Sat, Oct 6, 2018 at 8:55 PM Thomas Koenig wrote: > Hi Jerry, > > > Agree it should be fixed. I would think a mutex lock should work. Lock, > > issue error message, unlock. Even if there is recursion, since there is > > at least one error somewhere, It should be OK to pause the world to > > iss

Re: [PATCH, libgfortran] Remove recursion check

2018-10-06 Thread Thomas Koenig
Hi Jerry, Agree it should be fixed. I would think a mutex lock should work. Lock, issue error message, unlock. Even if there is recursion, since there is at least one error somewhere, It should be OK to pause the world to issue the error, and come back and finish. AS I think about it, maybe o

Re: [PATCH, libgfortran] Remove recursion check

2018-10-06 Thread Jerry DeLisle
On 10/6/18 10:00 AM, Janne Blomqvist wrote: On Mon, Sep 24, 2018 at 10:18 PM Janne Blomqvist wrote: On Mon, Sep 24, 2018 at 7:48 PM Thomas Koenig wrote: Hi Janne, libgfortran has a recursion check in the error handling paths. This works by checking the value of a static variable, and if

Re: [PATCH, libgfortran] Remove recursion check

2018-10-06 Thread Janne Blomqvist
On Mon, Sep 24, 2018 at 10:18 PM Janne Blomqvist wrote: > On Mon, Sep 24, 2018 at 7:48 PM Thomas Koenig > wrote: > >> Hi Janne, >> >> > libgfortran has a recursion check in the error handling paths. This >> > works by checking the value of a static variable, and if it matches, >> > aborting imm

Re: [PATCH, libgfortran] Remove recursion check

2018-09-24 Thread Janne Blomqvist
On Mon, Sep 24, 2018 at 7:48 PM Thomas Koenig wrote: > Hi Janne, > > > libgfortran has a recursion check in the error handling paths. This > > works by checking the value of a static variable, and if it matches, > > aborting immediately instead of continuing error processing. > > Unfortunately,

Re: [PATCH, libgfortran] Remove recursion check

2018-09-24 Thread Thomas Koenig
Hi Janne, libgfortran has a recursion check in the error handling paths. This works by checking the value of a static variable, and if it matches, aborting immediately instead of continuing error processing. Unfortunately, in a multi-threaded program, if two threads report an error at the same

[PATCH, libgfortran] Remove recursion check

2018-09-24 Thread Janne Blomqvist
libgfortran has a recursion check in the error handling paths. This works by checking the value of a static variable, and if it matches, aborting immediately instead of continuing error processing. Unfortunately, in a multi-threaded program, if two threads report an error at the same time, this ca