Closed allenbarnett5 closed 1 year ago
@allenbarnett5 thanks for the bug report! I'll take a look at it.
I installed GCC 12 and its headers on my box and it works OK with that version.
@allenbarnett5, I fixed it. Thank you for the fine contribution!
Thanks for fixing this!
Hi: If my source input has a syntax error, then activating --trace in peglint results in a segfault. For example, the grammar:
a <- 'a'
and the input:b
yields:This is on Pop!_OS (which is currently mostly Ubuntu 22.04 LTS) with both GCC 11 and Clang-14. Although they are both using the same libstdc++-11 headers. The segfault is at line 442, but the actual error is buried deep in the unwinding code at the end of a lambda expression which starts at line 4681. For some reason, the compiler is overwriting the pointer "const char* s" in that lambda's cleanup!
This library is really great! So much easier to use than lex and yacc :-)
Thanks, Allen