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
$ ./src/frontend/parser/parser_test examples/a.glx
Lexical Analysis:
-----------------
Line 1, Column 1-4: TYPE INTEGER "int"
Line 1, Column 5-7: IDENTIFIER "oi"
Line 1, Column 8-10: ASSIGN ":="
Line 1, Column 10-11: NUMBER "3"
Line 1, Column 11-12: SEMICOLON ";"
Line 1, Column 12-12: END OF FILE "EOF"
Parsing:
-----------------
AST:
Node Type: Program
Program has 1 statements
Node Type: Variable Declaration
Variable Name: oi
Is Pointer: false
Is Constant: false
Type: int
Value:
Node Type: Numeric Literal
Value: 3.000000
free(): double free detected in tcache 2
Aborted (core dumped)
running the backtrace on gdb:
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
warning: 44 ./nptl/pthread_kill.c: No such file or directory
(gdb) backtrace
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44#1 0x00007ffff7e44ebf in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78#2 0x00007ffff7df0c82 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26#3 0x00007ffff7dd94f0 in __GI_abort () at ./stdlib/abort.c:79#4 0x00007ffff7dda32d in __libc_message_impl (fmt=fmt@entry=0x7ffff7f5c303 "%s\n") at ../sysdeps/posix/libc_fatal.c:132#5 0x00007ffff7e4e9e5 in malloc_printerr (str=str@entry=0x7ffff7f5f6a8 "free(): double free detected in tcache 2") at ./malloc/malloc.c:5772#6 0x00007ffff7e50e59 in _int_free (av=0x7ffff7f98ac0 <main_arena>, p=<optimized out>, have_lock=have_lock@entry=0) at ./malloc/malloc.c:4541#7 0x00007ffff7e534ff in __GI___libc_free (mem=<optimized out>) at ./malloc/malloc.c:3398#8 0x000055555555e2f5 in freeTokens (tokens=0x555555565bd0, tokenCount=6) at /root/C/galaxy/src/frontend/freeTokens.c:19#9 0x00005555555554e5 in main (argc=2, argv=0x7fffffffda68) at /root/C/galaxy/src/frontend/parser/parser.test.c:59
(gdb)
as said on gdb, the line 19 of freeTokens.c is: free(tokens[i].lexeme);
The text was updated successfully, but these errors were encountered:
running the backtrace on gdb:
as said on gdb, the line 19 of freeTokens.c is:
free(tokens[i].lexeme);
The text was updated successfully, but these errors were encountered: