On 08/01/2013 01:19 PM, Alexander Monakov wrote:
> 
> 
> On Thu, 1 Aug 2013, Alexander Monakov wrote:
> 
>> Okay, one more hack :)
>>
>> Recurse *once* by calling dlsym inside your calloc, and terminate recursion 
>> by
>> obtaining memory from mmap.
> 
> Correction: since there's no guarantee that the very first calloc invocation
> will happen from inside dlsym, you have to recurse twice, not once, to be sure
> that there are two dlsyms on the stack.

I don't think any of this works. The ultimate problem is the one Jérémie
reported initially: dlsym will eventually call free() on the memory
calloc() returned, so my calloc fallback needs to return something that
can actually be freed.

        Stefan

-- 
Stefan Seefeld
CodeSourcery / Mentor Graphics
http://www.mentor.com/embedded-software/

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to