I’m attempting to use ANTLR4’s C++ target from Rust. Everything is hidden behind a
uint8_t function(const char * input), and I’m not explicitly using global state anywhere, yet I see all of the signs of a race condition. Segfaults, SIGABRTs, random parse errors when the input hasn’t changed, etc. Wrapping the function call in a mutex lock makes the problem go away.
Everything points to this being an issue on the ANTLR runtime’s end, but I figured I’d have someone from the Rust side take a peek as well to make sure I’m not crazy and to cover all of my bases.
My convo with the ANTLR guys thus far + link to example code: https://groups.google.com/forum/#!topic/antlr-discussion/ppulI_Z-Tf8