llvm / llvm/llvm-project

[libunwind] is _dl_find_object thread safe to use in unwinding code?

Open
#222,731 1 comment 0 reactions 0 assignees View on GitHub
libunwind question
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

I just find out this commit
https://www.mail-archive.com/cfe-commits@lists.llvm.org/msg292908.html

According to glibc documentation

https://sourceware.org/glibc/manual/2.42/html_node/Dynamic-Linker-Introspection.html

"
_dl_find_object itself is thread-safe. However, if the application invokes dlclose for the object that contains address concurrently with _dl_find_object or after the call returns, accessing the unwinding data for that object or the link map (through result->dlfo_link_map) is not safe. Therefore, the application needs to ensure by other means (e.g., by convention) that address remains a valid code address while the unwinding information is processed.
"

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked LLVM commit and glibc Dynamic Linker Introspection documentation, then inspect libunwind’s use of _dl_find_object. Determine whether concurrent dlclose can invalidate the unwinding data or link map during unwinding, and document the required synchronization or resulting change.

Written by the indexing model from the issue text.

Assessment

Domain
compilers, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.