LIBC_DEBUG_MALLOC_OPTIONS not detecting memory corruptions

65 views
Skip to first unread message

Rush538

unread,
Aug 3, 2020, 10:17:21 AM8/3/20
to android-ndk
Hi, 

I am writing sample programming like following and using wrap.sh to find memory corruption in an android application that uses both java and native code.

char[] str = "Hello";
str[200] = 'c';
*(str-500) = 'd';

My wrap.sh content are like following.

#!/system/bin/sh
LIBC_DEBUG_MALLOC_OPTIONS=backtrace\ leak_track\ free_track\ guard=16384\ backtrace_enable_on_signal\ record_allocs "$@"

I am running it on an emulator whose details are as follows.
Type: Google API
API: 27

Is there any option i am missing or we can't the memory corruptions using wrap.sh?

Thanks

Andrew Esh

unread,
Aug 3, 2020, 10:33:28 AM8/3/20
to android-ndk
Reply all
Reply to author
Forward
0 new messages