[antlr-interest] ANTLR 2.7.6 C# race condition fix

Philip Heede philip at catinet.dk
Wed Mar 1 04:10:17 PST 2006


Hi all,
 
We are using ANTLR in an ASP.NET (C#) application with great success.
However, we are experiencing some random crashes in situations with high
memory usage, where the stack trace indicates that the crash originated
in

antlr.ASTFactory.makeASTRoot(ASTPair currentAST, AST root)
 
We've been tracking the problem for some time now without any ideas to
what might be causing it besides the fact that the servers are being
stressed when the problem occurs. The general consensus so far has been,
that the problem is because of the high memory usage rather than ANTLR
(even though the exception originates here).

However, we are at v2.7.5 and I've just noticed the following entry in
the 2.7.6 changelog regarding C#-specific changes:
 
***BREAKING CHANGE*** ASTPair object pool had a race condition in
multi-threaded environments. ASTPair is now a struct.

I wanted to hear if anyone could give some more information on this fix
before I get my hopes up. Does our problem sound like it might be caused
by the race condition mentioned in this fix? We'll be testing 2.7.6
shortly, but I hope to hear any comments you might have. Thanks! 
 
-- 
Sincerely
Philip



More information about the antlr-interest mailing list