You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If malloc is called in libstdc++ while loading before preeny_mallocwatch_orig has been called from call_init.part it crashes as such
Program received signal SIGSEGV (fault address0x0)
pwndbg> bt
#0 0x0000000000000000 in ?? ()#1 0x00007ffff77d0ea6 in malloc (size=72704) at /tmp/preeny/src/mallocwatch.c:30#2 0x00007ffff72d59c0 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6#3 0x00007ffff7de879a in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffdff8, env=env@entry=0x7fffffffe008) at dl-init.c:72#4 0x00007ffff7de88ab in call_init (env=0x7fffffffe008, argv=0x7fffffffdff8, argc=1, l=<optimized out>) at dl-init.c:30#5 _dl_init (main_map=0x7ffff7ffe170, argc=1, argv=0x7fffffffdff8, env=0x7fffffffe008) at dl-init.c:120#6 0x00007ffff7dd9c5a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2#7 0x0000000000000001 in ?? ()#8 0x00007fffffffe33d in ?? ()#9 0x0000000000000000 in ?? ()
Fix should be pretty simple, checking if original_mallocand family is actually set or not and then calling preeny_mallocwatch_orig
If
malloc
is called in libstdc++ while loading beforepreeny_mallocwatch_orig
has been called fromcall_init.part
it crashes as suchFix should be pretty simple, checking if
original_malloc
and family is actually set or not and then callingpreeny_mallocwatch_orig
preeny/src/mallocwatch.c
Line 30 in 36b1874
I'll send a PR.
The text was updated successfully, but these errors were encountered: