Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probleme d'analyse syntaxique #10

Closed
gguichard opened this issue Mar 31, 2019 · 1 comment
Closed

Probleme d'analyse syntaxique #10

gguichard opened this issue Mar 31, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@gguichard
Copy link
Collaborator

gguichard commented Mar 31, 2019

La commande "1>" provoque un segfault au niveau de l'analyse syntaxique (token_analyzer.c).

Voici la trace fsanitize depuis master :

AddressSanitizer:DEADLYSIGNAL

==82974==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000108496abe bp 0x7ffee77732f0 sp 0x7ffee7773140 T0)
==82974==The signal is caused by a READ memory access.
==82974==Hint: address points to the zero page.
#0 0x108496abd in token_analyser token_analyzer.c:60
#1 0x1084b900c in read_complete_command cmdline.c:98
#2 0x1084b872b in read_cmdline cmdline.c:114
#3 0x10848fd9c in main main.c:50
#4 0x7fff7d4573d4 in start (libdyld.dylib:x86_64+0x163d4)

==82974==Register values:
rax = 0x0000000000000000 rbx = 0x00007ffee7773180 rcx = 0x0000100000000000 rdx = 0x00007ffee7773160
rdi = 0x0000100000000000 rsi = 0x00001fffdceee62c rbp = 0x00007ffee77732f0 rsp = 0x00007ffee7773140
r8 = 0x0000200000000000 r9 = 0x00000fffffffffff r10 = 0x0000000000000000 r11 = 0xffffffffffffffff
r12 = 0x0000000000000000 r13 = 0x0000000000000000 r14 = 0x00001fffdceee664 r15 = 0x0000000000000004
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV token_analyzer.c:60 in token_analyser
==82974==ABORTING
Abort trap: 6

@gguichard gguichard added the bug Something isn't working label Mar 31, 2019
@tcollard
Copy link
Owner

Fix erreur sur un get_tk(list->next) quand il est nul, j'essayais d'envoyer le token qu'il contenait dans syntax_error().
J'envois directement l'element maintenant et je verifie si il est null ou non.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants