FS#22376 - Simple flex program. Segmentation fault. GCC or GLIBC bug?

Attached to Project: Arch Linux
Opened by Strephil (strephil) - Monday, 10 January 2011, 08:25 GMT
Last edited by Jan de Groot (JGC) - Monday, 10 January 2011, 09:16 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

Segmentation fault of very simple flex program. I think there is bug in gcc or in glibc. I think this is not bug in flex, because I could not reproduce this bug on OpenBSD with the same lex.yy.c.

Additional info:

flex 2.5.35
gcc (GCC) 4.5.2
glibc 2.12.2-1

Steps to reproduce:

$ flex evil.l
$ gcc lex.yy.c
$ cat evil_file | ./a.out
Segmentation fault
This task depends upon

Closed by  Jan de Groot (JGC)
Monday, 10 January 2011, 09:16 GMT
Reason for closing:  Not a bug
Comment by Jan de Groot (JGC) - Monday, 10 January 2011, 08:48 GMT
Can't reproduce it here. What architecture is this?
Comment by Strephil (strephil) - Monday, 10 January 2011, 09:12 GMT
I am sorry.
Mea culpa.

printf (yytext)… I should write printf ("%s", yytext)
Comment by Jan de Groot (JGC) - Monday, 10 January 2011, 09:16 GMT
I still can't reproduce it here. Prints the input file.

Loading...