From: Duy Nguyen Date: Thu, 02 Jun 2016 01:04:25 GMT Subject: Re: Segfault in the attr stack Message-ID: In-Reply-To: On Thu, Jun 2, 2016 at 8:02 AM, Duy Nguyen wrote: > On Thu, Jun 2, 2016 at 5:17 AM, Junio C Hamano wrote: >> Gaah, of course. >> >> This is coming from the cache preload codepath, where multiple threads >> try to run ce_path_match(). >> It used to be OK because pathspec magic never looked at attributes, >> but now it does, and attribute system is not thread-safe. > > Off topic. I wonder if we can annotate which functions are thread-safe > (minority currently in git code base, I believe) and make gcc, clang > or sparse spot them in threaded code? By them I mean unannotated (i.e. not thread-safe) functions, of course. -- Duy