Re: general protection faults with "git grep" version 1.7.7.1
Show 12 quoted lines
> Jim Meyering wrote:
> > Thomas Rast wrote:
> > > [GCC moves access to a file-static variable across pthread_mutex_lock()]
> >
> > Thanks for the investigation.
> > Actually, isn't gcc -O2's code-motion justified?
> > While we *know* that those globals may be modified asynchronously,
> > builtin/grep.c forgot to tell gcc about that.
>
> I'm somewhat unwilling to believe that:
>
> * "volatile" enforces three unrelated things, see e.g. [1].
Argh, forgot my reference:
[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2016.html
section "Existing portable uses"--
Thomas Rast
trast@{inf,student}.ethz.ch