https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107625
Bug ID: 107625
Summary: RFE: analyzer support for dlopen etc
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: dmalcolm at gcc dot gnu.org
Target Milestone: ---
Perhaps the analyzer could support:
* dlopen
* dlclose
* dlsym
Notes: see:
https://man7.org/linux/man-pages/man3/dlopen.3.html (covers dlclose also)
https://man7.org/linux/man-pages/man3/dlsym.3.html
Potentially we could track:
- dlopen succeeding vs dlopen failing
- dlsym after dlclose
- double-'dlclose'
- pointers returned from dlsym becoming invalid after dlclose (e.g.
attempting to call a function after a 'dlclose')
(potentially create a region for the "dlopen", putting code/data within it,
so that we can track the memory regions that become invalid after dlclose)
Would be great to be able to do some kind of type-checking on the result of
"dlsym", but I'm not sure how we could reliably get at the actual type of the
symbol.