Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dwarf_loader: Use libdw__lock for dwarf_getlocation(s)
Eduard noticed [1] intermittent segmentation faults triggered by caching done internally in dwarf_getlocation(s). A binary tree of location information is cached in the CU, and if multiple threads access it concurrently we can get segmentation faults. It is possible to compile elfutils with experimental thread-safe support, but safer for now to add locking to pahole. No additional overhead in pahole encoding was observed as a result of these changes. [1] https://lore.kernel.org/dwarves/[email protected]/ Reported-by: Eduard Zingerman <[email protected]> Suggested-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Alan Maguire <[email protected]> Tested-by: Jiri Olsa <[email protected]> Acked-by: Eduard Zingerman <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Andrii Nakryiko <[email protected]> Cc: Daniel Borkmann <[email protected]> Cc: Song Liu <[email protected]> Cc: Yonghong Song <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
- Loading branch information