[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Assertion `loc.end.file' failed in bison
From: |
Youngseok Choi |
Subject: |
Assertion `loc.end.file' failed in bison |
Date: |
Tue, 4 Apr 2023 12:46:42 +0900 |
Hello, our fuzzer found a new assertion bug in bison. (Assertion
`loc.end.file' failed)
*Command*
bison -Tp poc_file
(poc_file is attached)
*Output (stderr)*
*...*
Reading a token
/home/youngseok/data/230327/asan_inter_30_30_shrink5_1_230308/bison/5_id:000199/poc_file:12.24:
error: an identifier expected
12 | %cid main (String args[]) throw IOlt-Exception
| ^
Error: popping token error
(/home/youngseok/data/230327/asan_inter_30_30_shrink5_1_230308/bison/5_id:000199/poc_file:10.1-12.17:
)
Stack now 0 2
Shifting token error
(/home/youngseok/data/230327/asan_inter_30_30_shrink5_1_230308/bison/5_id:000199/poc_file:10.1-12.24:
)
Entering state 4
Stack now 0 2 4
Next token is token invalid token
(/home/youngseok/data/230327/asan_inter_30_30_shrink5_1_230308/bison/5_id:000199/poc_file:12.24:
)
LAC: initial context established for invalid token
LAC: checking lookahead invalid token: Always Err
Error: discarding token invalid token
(/home/youngseok/data/230327/asan_inter_30_30_shrink5_1_230308/bison/5_id:000199/poc_file:12.24:
)
Error: popping token error
(/home/youngseok/data/230327/asan_inter_30_30_shrink5_1_230308/bison/5_id:000199/poc_file:10.1-12.24:
)
Stack now 0 2
LAC: initial context discarded due to error recovery
Shifting token error
(/home/youngseok/data/230327/asan_inter_30_30_shrink5_1_230308/bison/5_id:000199/poc_file:10.1-12.24:
)
Entering state 4
Stack now 0 2 4
Reading a token
Next token is token identifier ((empty location): args)
LAC: initial context established for identifier
LAC: checking lookahead identifier: Err
Error: discarding token identifier ((empty location): args)
Error: popping token error
(/home/youngseok/data/230327/asan_inter_30_30_shrink5_1_230308/bison/5_id:000199/poc_file:10.1-12.24:
)
Stack now 0 2
LAC: initial context discarded due to error recovery
Shifting token error (bison: src/location.c:169: location_print: Assertion
`loc.end.file' failed.
Aborted
*Stack Trace (gdb)*
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff6a677f1 in __GI_abort () at abort.c:79
#2 0x00007ffff6a573fa in __assert_fail_base (fmt=0x7ffff6bde6c0
"%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion@entry=0x5555556d4f00 "loc.end.file",
file=file@entry=0x5555556d4e80
"src/location.c", line=line@entry=169,
function=function@entry=0x5555556d52a0 <__PRETTY_FUNCTION__.6202>
"location_print") at assert.c:92
#3 0x00007ffff6a57472 in __GI___assert_fail (assertion=0x5555556d4f00
"loc.end.file", file=0x5555556d4e80 "src/location.c", line=169,
function=0x5555556d52a0 <__PRETTY_FUNCTION__.6202> "location_print") at
assert.c:101
#4 0x00005555555c9cab in location_print (loc=..., out=0x7ffff6e13680
<_IO_2_1_stderr_>) at src/location.c:169
#5 0x00005555555fac2a in yy_symbol_print (yyo=0x7ffff6e13680
<_IO_2_1_stderr_>, yykind=YYSYMBOL_YYerror, yyvaluep=0x7fffffffaad0,
yylocationp=0x7fffffffb7b0) at src/parse-gram.c:1299
#6 0x0000555555603d30 in gram_parse () at src/parse-gram.c:2779
#7 0x000055555561c6ab in reader (gram=0x608000000120
"/home/youngseok/data/230327/asan_inter_30_30_shrink5_1_230308/bison/5_id:000199/poc_file")
at src/reader.c:766
#8 0x00005555555d1f5a in main (argc=3, argv=0x7fffffffe038) at
src/main.c:118
*Environment*
OS: Ubuntu 18.04
gcc: 7.5.0
Bison: 3.8.2.46-9785 (git commit 97852f39f42a28abfcaf1c46b1f06920eae151c9)
Thank you
Youngseok Choi
poc_file
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Assertion `loc.end.file' failed in bison,
Youngseok Choi <=