Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C Moderated > calloc interpos...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1055 of 1099
Post > Topic >>

calloc interposing issue

by reachanil@[EMAIL PROTECTED] Mar 8, 2008 at 12:21 PM

Hi,

We've interposed malloc/calloc/realloc/memalign/valloc in our
application. While all of our application calls our own implementation
of these functions, there seems to be some issue with the dl.so shared
library (Windriver, ppc, linux 32 bit). The dl.so library defines a
function called - _dl_tls_setup and another one - _dl_deallocate_tls.
When our application that linked in -ldl and -lpthread, was shutting
down, we saw a crash with the backtrace pointing to
_dl_deallocate_tls. Upon further investigation we found that
_dl_tls_deallocate was calling 'free' which was our own implementation
(Not libc's) However, the chunk was got using malloc/calloc from
libc!!!!!. I put a breakpoint at _dl_tls_setup and found that it was
getting memory from the libc calloc.

I'm not sure how the dl library could have got calloc from libc and
free from our application. Please help!!!

thanks,
-Anil
-- 
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
 -- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line.  Sorry.




 1 Posts in Topic:
calloc interposing issue
reachanil@[EMAIL PROTECTE  2008-03-08 12:21:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue May 13 14:51:15 CDT 2008.