Print

Print


2008/7/17 Tim Jenness <[log in to unmask]>:
> On Jul 17, 2008, at 3:14 AM, Peter W. Draper wrote:
>
>>
>> One thought occurred to me about GCC crashing, it does have a flag
>> -pthread(s) that is used on some platforms for compiling, so I've had a
>> quick look at that area again. Anyway I now think we should be defining
>> -D_REENTRANT when compiling. This supposedly makes any references to errno
>> protected and I can see some naked references to that in AST (object.c,
>> axis.c, channel.c, mathmap.c). Worth a try.
>>
>
> AST also uses strerror instead of strerror_r and strtok instead of strtok_r.

Yes - I have a few leads now. I'm currently modifying sla.c to include
thread-safe "_r" variants for all the SLALIB functions (I'm just
wrapping each call in a mutex lock/unlock block). I'll then look at
the use of statics in smf_create_lutwcs and smf_detpos_wcs (there may
be other uses of statics in smurf but these were the ones that were
thrown up by the Intel thread checker). I'll then follow up Peter's
suggestion about -D_REENTRANT and the use of strtok, strerror, etc.

Everyone keep their fingers crossed...

David

>
> --
> Tim Jenness
> Joint Astronomy Centre
>



-- 
Note my change of e-mail address. Please send e-mail to
[log in to unmask] from now on.