Bonjour
Je suis entrain de finaliser mon projet qui est un petit compilateur, et le problème que j'ai est que j'ai encore des blocs atteignables.
Le problème est que ces blocs en questions viennent de fichier générer par lex et yacc, donc je ne sais pas trop comment résoudre ce problème. J'ai déjà essayé de les supprimer puis de les re-générer mais rien n'y fait, le problème persiste.
Pourriez vous m'éclaircir sur ce point ?
Voici le log de valgrind :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 ==7766== ==7766== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 8 from 1) ==7766== malloc/free: in use at exit: 16,458 bytes in 3 blocks. ==7766== malloc/free: 65 allocs, 62 frees, 18,828 bytes allocated. ==7766== For counts of detected errors, rerun with: -v ==7766== searching for pointers to 3 not-freed blocks. ==7766== checked 73,648 bytes. ==7766== ==7766== 8 bytes in 1 blocks are still reachable in loss record 1 of 3 ==7766== at 0x4C278AE: malloc (vg_replace_malloc.c:207) ==7766== by 0x403E24: yyalloc (lex.yy.c:2104) ==7766== by 0x403950: yyensure_buffer_stack (lex.yy.c:1803) ==7766== by 0x401F8B: yylex (lex.yy.c:778) ==7766== by 0x406E4F: yyparse (y.tab.c:1465) ==7766== by 0x408265: main (LSD09-BDP.y:220) ==7766== ==7766== ==7766== 64 bytes in 1 blocks are still reachable in loss record 2 of 3 ==7766== at 0x4C278AE: malloc (vg_replace_malloc.c:207) ==7766== by 0x403E24: yyalloc (lex.yy.c:2104) ==7766== by 0x4034B8: yy_create_buffer (lex.yy.c:1639) ==7766== by 0x401FB2: yylex (lex.yy.c:779) ==7766== by 0x406E4F: yyparse (y.tab.c:1465) ==7766== by 0x408265: main (LSD09-BDP.y:220) ==7766== ==7766== ==7766== 16,386 bytes in 1 blocks are still reachable in loss record 3 of 3 ==7766== at 0x4C278AE: malloc (vg_replace_malloc.c:207) ==7766== by 0x403E24: yyalloc (lex.yy.c:2104) ==7766== by 0x4034EC: yy_create_buffer (lex.yy.c:1648) ==7766== by 0x401FB2: yylex (lex.yy.c:779) ==7766== by 0x406E4F: yyparse (y.tab.c:1465) ==7766== by 0x408265: main (LSD09-BDP.y:220) ==7766== ==7766== LEAK SUMMARY: ==7766== definitely lost: 0 bytes in 0 blocks. ==7766== possibly lost: 0 bytes in 0 blocks. ==7766== still reachable: 16,458 bytes in 3 blocks. ==7766== suppressed: 0 bytes in 0 blocks.
la ligne 220 du fichire LSD09-BDP.y fait un appel à yyparse();.
Merci bien
Dasson
Partager