You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ gdb --args ./9cc yo.c
Reading symbols from ./9cc...done.
(gdb) run
Starting program: /tmp/9cc/9cc yo.c
Program received signal SIGSEGV, Segmentation fault.
0x000055555555e5ab in vec_push (v=0x0, elem=0x55555556a990) at util.c:29
29 if (v->len == v->capacity) {
(gdb) bt
#0 0x000055555555e5ab in vec_push (v=0x0, elem=0x55555556a990) at util.c:29
#1 0x000055555555b728 in add_lvar (ty=0x55555556a7d0, name=0x555555569a80 "n") at parse.c:81
#2 0x000055555555d827 in param_declaration () at parse.c:717
#3 0x000055555555e0df in toplevel () at parse.c:895
#4 0x000055555555e3b5 in parse (tokens_=0x555555569fa0) at parse.c:961
#5 0x000055555555b4c4 in main (argc=2, argv=0x7fffffffe688) at main.c:34
(gdb)
The text was updated successfully, but these errors were encountered:
Ace17
changed the title
segfault on: "void f(int n) { int tab[n]; }"
segfault on: "void f(int n) {}"
Dec 20, 2018
Compilation:
Backtrace:
The text was updated successfully, but these errors were encountered: