This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dlmopen in LD_PRELOAD


* Baojun Wang:

>> Does the library you load via dlmopen contain its own definition of
>> malloc, perhaps indirectly?
>
> I don't think so, though the dynamic library does depends on libc.so.

The malloc loaded from glibc's libc.so.6 should work in this scenario,
and we have tests for basic dlmopen usage to prove this.

> Also worth mentioning is if I manually patch `__get_nprocs`, which is
> called `area_get2`, then I can see the stack overflow any longer. the
> pseudo assembly used to patch `__get_nprocs`:

Hmm.  Do you have a small reproducer which only uses C libraries?

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]