mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 10:25:01 +00:00
083918d344
Currently we use dlsym on pthread_cond_wait$UNIX2003 to find a function that indicates that new_sem_from_pool is on the stack. This works on 10.5, but on 10.6 I could not find a single reliable indicator that would work with dlsym. The good news is that dladdr works with any symbol, not just exported ones. To find the address of new_sem_from_pool, we set up a malloc logger and force a call to new_sem_from_pool. From the logger callback we walk the stack trying dladdr on every address. To for a call to new_sem_from_pool, the initialization code has to be the first to use semaphores, so it is now run from NS_LogInit. This works on 10.6 and 10.5 (but we have to look for "pthread_cond_wait$UNIX2003"). In 10.7 the call to malloc is gone, so we don't have to worry about critical addresses on it anymore. |
||
---|---|---|
.. | ||
analysis | ||
base | ||
build | ||
components | ||
doc | ||
ds | ||
glue | ||
idl-parser | ||
io | ||
libxpt/xptcall | ||
proxy | ||
reflect | ||
sample | ||
string | ||
stub | ||
system | ||
tests | ||
threads | ||
tools | ||
typelib | ||
windbgdlg | ||
Makefile.in | ||
xpcom-config.h.in | ||
xpcom-private.h.in |