[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Assertion failure in AnnotationList.c on IELR grammar with a useless non
Assertion failure in AnnotationList.c on IELR grammar with a useless nonterminal
Wed, 16 Dec 2020 17:09:35 -0600
I have reproduced this error with Bison 3.7.4, but it is also present
in versions as old as 3.0.4, the oldest version I have tried.
I am attaching the smallest grammar I was able to produce that
generates the error. I'm aware that this grammar is rather contrived.
It was generated by minimizing a larger, self-contained, real-world
grammar which I can provide on request, but I figured you would rather
work with a minimized grammar.
The bug manifests with the following assertion failure, followed by a SIGABRT:
`!Sbitset__isEmpty (annotation_node->contributions[ci], s->nitems)'
Note that the terminal output mentions that C is a useless
nonterminal, but if C is removed from the grammar, the error
disappears. While I am aware that the problem could be solved by
simply removing the useless nonterminal from the grammar (and have
been able to reproduce this behavior on my real-world example), the
real-world grammar is autogenerated and it would be nice if this just
worked and the useless nonterminal was ignored. Regardless, I figured
an assertion error is probably not an appropriate failure mode, so I
wanted to report the error to you.
We have plans to modify our grammar generator on our end to fix the
issue in the way I described above, so this is not terribly high
priority for us, since by the time bison releases trickle out into
Linux distros, we will have already worked around the issue. But I
have seen this same error message in other contexts in the past, so
it's possible we may run into it again in a situation where it will be
harder for us to simply work around it, so a fix would still be
helpful to us long-term.
I should have already completed a copyright assignment form that is
applicable for changes to Bison, and am happy to follow any steps you
have in mind in order to incorporate this minimized test into your
test suite. Just let me know what you need.
Director of Engineering
Description: Binary data
- Assertion failure in AnnotationList.c on IELR grammar with a useless nonterminal,
Dwight Guth <=