mirror of
https://github.com/frida/tinycc
synced 2024-11-28 18:43:07 +03:00
bd489a4815
This test obviously shouldn't segfault, but currently does so. The problem is in the VLA code, which fails to save the stack pointer before taking a conditional branch in some cases. See this thread: http://lists.nongnu.org/archive/html/tinycc-devel/2015-04/msg00130.html
22 lines
230 B
C
22 lines
230 B
C
#include <stdio.h>
|
|
|
|
/* This test segfaults as of April 27, 2015. */
|
|
|
|
void f(int argc)
|
|
{
|
|
char test[argc];
|
|
if(0)
|
|
label:
|
|
printf("boom!\n");
|
|
if(argc-- == 0)
|
|
return;
|
|
goto label;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
f(2);
|
|
|
|
return 0;
|
|
}
|