On 9/7/17, Fletcher T. Penney <fletc...@fletcherpenney.net> wrote:
> 1)  I hope I am reporting this to the right place.  If not, my apologies.
>
> 2) I have been using lemon parsers for a year or more, but am by no
> means an export on the lemon source itself.  I did not see this issue
> referenced elsewhere, my apologies if I missed it.
>
>
> I *think* there is a thread-safety issue in the ParseTrace() function:

Yeah, but ParseTrace() is a debugging function, not intended for use
in production systems.  It shouldn't ever be used by multiple threads.
It is not intended to be threadsafe.

If you found a thread-safety issue in the Parse() function, that would
be more interesting!



>
>       void ParseTrace(FILE *TraceFILE, char *zTracePrompt){
>         yyTraceFILE = TraceFILE;
>         yyTracePrompt = zTracePrompt;
>         if( yyTraceFILE==0 ) yyTracePrompt = 0;
>         else if( yyTracePrompt==0 ) yyTraceFILE = 0;
>       }
>
> It appears that `yyTraceFILE` and `yyTracePrompt` are global variables
> that can conceivably be written to simultaneously on two separate
> threads.  I suspect the negative effects of this would be low
> (overwriting of one prompt with another, and they would likely be
> identical strings anyway).
>
>
> It is detected by Xcode's Thread Sanitizer, and I wanted to report it in
> case there was a more untoward effect that I was missing.  If nothing
> needs to be done about it, that's fine too.
>
>
> Thanks!
>
> Fletcher
>
>
>
>
> --
> Fletcher T. Penney
> fletc...@fletcherpenney.net
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to