[PATCH v2] dwarf_tag.c: Protect cu->last_abbrev_offset with lock

Mark Wielaard mark@klomp.org
Thu Feb 26 21:46:44 GMT 2026


Hi Aaron,

On Thu, Feb 26, 2026 at 01:41:27PM -0500, Aaron Merey wrote:
> Acquire abbrev_lock before reading cu->last_abbrev_offset in dwarf_tag.
> 
> Also double check for abbrev hash table entry once lock is held to
> avoid multiple threads attempting to populate the abbrev hash table.
> 
> Signed-off-by: Aaron Merey <amerey@redhat.com>
> ---
> 
> v2: Refactor based on Mark's suggestion:
> https://patchwork.sourceware.org/project/elfutils/patch/20260209131642.2681308-1-amerey@redhat.com/#224420

I really like this variant. Clean and clear.

Thanks,

Mark


More information about the Elfutils-devel mailing list