flex
flex copied to clipboard
build crashes with address sanitizer
Hi,
when I configure flex 2.6.4 with CFLAGS="-ggdb -O0 -fsanitize=address" ./configure --disable-nls the build crashes:
./stage1flex -o stage1scan.c ./scan.l
AddressSanitizer:DEADLYSIGNAL
=================================================================
==261776==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000cd0 (pc 0x7f9edb9cea7d bp 0x7ffde593ae30 sp 0x7ffde593ae18 T0)
==261776==The signal is caused by a WRITE memory access.
==261776==Hint: address points to the zero page.
#0 0x7f9edb9cea7d in __memset_avx2_unaligned_erms (/usr/lib/libc.so.6+0x164a7d)
#1 0x557504374523 in yyensure_buffer_stack /flex-2.6.4/src/scan.c:4836
#2 0x55750435d945 in flexscan /flex-2.6.4/src/scan.c:2212
#3 0x5575043b36c5 in yylex /flex-2.6.4/src/yylex.c:51
#4 0x55750439c507 in yyparse /flex-2.6.4/src/parse.c:1405
#5 0x557504392ed4 in readin /flex-2.6.4/src/main.c:1475
#6 0x55750438ed94 in flex_main /flex-2.6.4/src/main.c:170
#7 0x55750438efda in main /flex-2.6.4/src/main.c:209
#8 0x7f9edb891b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
#9 0x55750435d67d in _start (/flex-2.6.4/src/stage1flex+0x5867d)