LIBC_DEBUG_MALLOC_OPTIONS not detecting memory corruptions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

LIBC_DEBUG_MALLOC_OPTIONS not detecting memory corruptions

Rush538
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

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/da6a94e3-affc-4375-b7a4-274109b8da20o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: LIBC_DEBUG_MALLOC_OPTIONS not detecting memory corruptions

Andrew Esh-3
Have you seen this?  https://android.googlesource.com/platform/bionic/+/master/libc/malloc_debug/README.md  

On Monday, August 3, 2020 at 9:17:21 AM UTC-5 Rush538 wrote:
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

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/0207a4eb-d1cf-4b1f-9b68-5ce529a9a5e1n%40googlegroups.com.