Skip to content

Thread safety in libdwarf #184

Closed Answered by davea42
jeremy-rifkin asked this question in Q&A
Discussion options

You must be logged in to vote

My email response has not appeared here. Hmm.

On reviewing libdwarf source code, I find only one static array, staticerrlist[] a very special
thing for cases with a NULL dbg (and not fussy, it is just there to give dwarf_finish() a
way to free things that could not be in a Dwarf_Debug error allocation.

It is possible that if the caller ensures that , on a given Dwarf_Debug (either directly or
indirectly) only one thread at a time refers to that Dwarf_Debug, that multiple threads
could use libdwarf. But libdwarf, as currently written, is NOT locking anything
or doing anything for thread safety other than ensuring all data used by a Dwarf_Debug
is recorded in that dbg, not recorded in stati…

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jeremy-rifkin
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants