[PATCH 5/5] [gdb/symtab] Fix data race on per_cu->lang
Tom de Vries
tdevries@suse.de
Wed Jul 6 15:42:59 GMT 2022
On 7/5/22 17:19, Tom de Vries wrote:
> On 7/4/22 20:30, Tom Tromey wrote:
>>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>> Tom> Fix this by guarding the write with a lock.
>>
>> I would rather we avoid locks. Ideally the existing exclusion mechanism
>> should be made to work, but if that fails, perhaps we can use another
>> atomic.
>
> I gave a different approach a try: eliminating the field.
>
> That seems to work reasonably well, apart from one specific usage that I
> disabled (mentioned in commit message).
>
Hmm, that same piece of code is where I run into
https://sourceware.org/bugzilla/show_bug.cgi?id=29321 . And, it's a
piece of code from a commit where I added per_cu->lang/unit_type. So,
this starts to look like the actual cause of problems.
Thanks,
- Tom
> I'm not sure this is a good idea though, but I thought I could at least
> post it. Currently testing.
>
> Thanks,
> - Tom
>
More information about the Gdb-patches
mailing list