Issue Details (XML | Word | Printable)

Key: PCC-416
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Antoine Leca
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

lexing of scan.l with pcc-built flex dumps core on amd64

Created: 20/Feb/13 05:55 PM   Updated: 29/Apr/14 09:54 PM
Component/s: amd64 target
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD amd64

 Description  « Hide
Using flex built with pcc, to compile scan.l, produces a core dump.
This works OK on i386, or if using the system lex built with either gcc or clang.

Steps to reproduce:
First, build and install pcc on NetBSD (by default pcc is not installed); NetBSD src includes pcc as of 20120325, but using 20121229 gives the same result.

Then, the easiest track is to try to build NetBSD building tools with the just-compiled pcc, like with
 $ sh -V HAVE_PCC=1 HOST_CC=pcc -V MKPCC=yes -V MKGCC=no -U tools
After a while, it breaks while recompiling pcc, at scan.l; it is using the just-built nblex... Segmentation fault

Another way to reach the same point is to build flex with pcc, install it (or passing LEX=/path/to/just/built/lex) and try to rebuild pcc

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 29/Apr/14 09:54 PM
Fixed now, it was a stack allocation that failed.
Tested with latest flex. Running flex test suite gives 7 failures, the same as if compiled with gcc.