help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Segfault in bison.


From: Massimiliano Masi
Subject: Segfault in bison.
Date: Fri, 7 Nov 2003 21:43:53 +0100
User-agent: Mutt/1.4i

Hi all !!!

I'm using bison (GNU Bison) 1.35
and flex version 2.5.4. I've a function that call yyparse() in a .o
file. When I call this function, after some check, this call
yyparse. Then return the value of the parsing to the caller. 
Here, I receive the SEGFAULT. gdb says:

(gdb)
parse_configuration_file (fp=Cannot access memory at address
0x2e74636d
) at conf_utils.c:86
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
0x0804ae15 in parse_configuration_file (fp=Cannot access memory at
address 0x2e74636d
) at conf_utils.c:86
(gdb)

parser:
        yacc -d grammar.y
        flex -p parser.lex
        gcc -ggdb -c lex.yy.c y.tab.c

And I don't use the -ll and -ly when linking. 

If I try to substitute the function with a main
(ie: int main(int argc, char *argv[]); everything works well. 

Any ideas?

Thank you, and sorry for my english.


-- 
Massimiliano Masi - http://gauss.comunidelchianti.it/~max

"In un mondo di incertezza, chi la sa misurare ha la carta vincente"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]