Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crash due to "stack corruption detected: aborted"

I recently received complaint from a user that my app was crashing. I've extracted the following from the user's error logs and was able to see why issues where happening:

12-17 10:31:12.446 I/PLAYLIST( 3158): PreparePlaylist
12-17 10:31:12.446 I/PLAYLIST( 3158): URL: http://f69cbd7a-3d91-4bf5-b4c6-ddb1175cf9e9.d40f2093-2013-4ad9-aec2-e99b015d61ca.070305e7-a706-4626-9ecb-777835065841.groovera.com/listen.pls
12-17 10:31:12.456 F/unknown ( 3158): stack corruption detected: aborted
12-17 10:31:12.466 D/Zygote  ( 2204): Process 3158 terminated by signal (6)
12-17 10:31:12.471 I/ActivityManager( 2256): Process com.android.Player:remote (pid 3158) has died.

There was a stack corruption detected. Great, so how do I find out why that's happening?

I think the issue is happening at this particular class since I was expecting more log output from it before it died. This class uses sockets to download playlist and parse it. How could I be corrupting the stack? I have dealt with stack overflows in C/C++, but how do I handle it in Java?

Thanks for your help!

like image 204
Jona Avatar asked Dec 17 '10 15:12

Jona


1 Answers

The message indicates corruption of the native stack. Code to detect stack buffer overflows is inserted when the gcc flag "-fstack-protector" is used.

If your app doesn't have any JNI code, then this could very well be a bug in the Android platform.

If you have a way to reproduce this, please file a bug on b.android.com with the details.

like image 195
fadden Avatar answered Sep 19 '22 02:09

fadden