Debugging dlopen
by NevemTeve from LinuxQuestions.org on (#4YMZ6)
I have found an interesting problem on SO, that includes php, php-ffi, libffi, a large shared object, and results in a message from dlopen:
Code:Inconsistency detected by ld.so: dl-minimal.c: 136:
realloc: Assertion `ptr == alloc_last_block' failed!Sure, I don't know what the actual problem is, but I'd like to collect some notes about the possible debugging ideas.
First ideas:
Code:LD_DEBUG=all php testscript.php
LD_PRELOAD=/usr/lib/libefence.so php testscript.php
LD_DEBUG=all LD_PRELOAD=/usr/lib/libefence.so php testscript.php
gdb --args $(which php) testscript.php
set exec-wrapper env 'LD_PRELOAD=/usr/lib/libefence.so' 'LD_DEBUG=all'Disclaimer: I'm not the Problem Owner, but could reproduce the error on my computer.


Code:Inconsistency detected by ld.so: dl-minimal.c: 136:
realloc: Assertion `ptr == alloc_last_block' failed!Sure, I don't know what the actual problem is, but I'd like to collect some notes about the possible debugging ideas.
First ideas:
Code:LD_DEBUG=all php testscript.php
LD_PRELOAD=/usr/lib/libefence.so php testscript.php
LD_DEBUG=all LD_PRELOAD=/usr/lib/libefence.so php testscript.php
gdb --args $(which php) testscript.php
set exec-wrapper env 'LD_PRELOAD=/usr/lib/libefence.so' 'LD_DEBUG=all'Disclaimer: I'm not the Problem Owner, but could reproduce the error on my computer.