Hi,
I encountered a recursive call problem between libmudflap and emutls
when testing libmudflap for Blackfin. But I think this issue affects all
targets without TLS.
One libmudflap test case in the testsuite calls __wrap_calloc. In
__wrap_calloc, __mf_state_1 is looked by __mf_get_state to see if it's
in_malloc, reentrant or active. With emutls, HAVE_TLS is defined as 1
now. So __mf_state_1 has type of __thread. When emults tries to simulate
TLS for __mf_state_1, it recursively calls __wrap_calloc in
__emutls_get_address. To break the recursive loop, one solution is to
force emutls to call the real calloc. But I don't know how to do this.
Could someone help me on this?
Thanks!
Jie
- libmudflap and emutls question Jie Zhang
-