[cfe-dev] stack overflow detection?

Greg Fitzgerald garious at gmail.com
Fri Oct 4 10:13:32 PDT 2013


On Thu, Oct 3, 2013 at 9:58 PM, Kostya Serebryany <kcc at google.com> wrote:
> Meanwhile, could you try to reverse the order of these two call in
> asan/asan_rtl.cc and see if it helps?
>   InstallSignalHandlers();
>   AsanTSDInit(AsanThread::TSDDtor);

That change fixes the assertion problem, but the stack overflow is
still not detected.  Here's the code:

static void loop() {
  loop();  // BOOM
}

int main() {
  loop();
  return 0;
}


And here's how I execute it:

$ adb  shell
# cd /data/data
# ASAN_OPTIONS=use_sigaltstack=1
LD_PRELOAD=/data/data/libclang_rt.asan-arm-android.so
./example_StackExhaustion


-Greg



More information about the cfe-dev mailing list