[antlr-interest] AST and test data size problem
Harsh Deshmane
hdeshmane at montalvosystems.com
Mon Oct 3 10:33:48 PDT 2005
Hi,
I am using 2.7.5 for C++ code.
I have a lexer/parser built. When compiled,
I tested with increasing sizes of datafile - ~100, ~1000, ~135K, upto
1.1 M lines of text. Didnt try beyond that.
Subsequently, I defined a treeparser, and
changed the grammar to use tree-grammar.
I invoked it the same way as described in transform example.
This time, it works and displays the tree upto
~100lines, ~1000 lines testcases, upto 50K lines but core dumps on ~124K
testcase(
I increased the size gradually from 50K to 123K, it exited normally.
At ~124K(precisely 123876, 123875 exits normally)., it coredumped. I havent
introduced any of my own classes to the
trees or other antlr produced code.
Any suggestions welcomed..
thanks,
-harsh
This is the gdb message:
Program received signal SIGSEGV, Segmentation fault.
0x00000000004168b4 in antlr::ASTRef::~ASTRef ()
(gdb) bt 5
#0 0x00000000004168b4 in antlr::ASTRef::~ASTRef ()
#1 0x000000000041c7c6 in antlr::CommonAST::~CommonAST$delete ()
#2 0x00000000004168b7 in antlr::ASTRef::~ASTRef ()
#3 0x000000000041c7c6 in antlr::CommonAST::~CommonAST$delete ()
#4 0x00000000004168b7 in antlr::ASTRef::~ASTRef ()
Running bt -10 gives:
(gdb) bt -10
#326959 0x00000000004168b7 in antlr::ASTRef::~ASTRef ()
#326960 0x000000000041c7c6 in antlr::CommonAST::~CommonAST$delete ()
#326961 0x00000000004168b7 in antlr::ASTRef::~ASTRef ()
#326962 0x000000000041c7c6 in antlr::CommonAST::~CommonAST$delete ()
#326963 0x00000000004168b7 in antlr::ASTRef::~ASTRef ()
#326964 0x000000000041c7c6 in antlr::CommonAST::~CommonAST$delete ()
#326965 0x00000000004168b7 in antlr::ASTRef::~ASTRef ()
#326966 0x0000000000412167 in ~ASTRefCount (this=0x7fbfffa750)
at <$TOOLSDIR>/antlr/2.7.5/include/antlr/ASTRefCount.hpp:60
#326967 0x00000000004122b5 in ~SpiceParser (this=0x7fbfffa730)
at <$USER>/antlr/spiceparser/src/NetParser.cpp:28
#326968 0x00000000004142b8 in main (argc=2, argv=0x7fbfffab28)
at <$USER>/antlr/spiceparser/src/NetParser.cpp:37
I have manually edited the path to refer to <$USER>, <$TOOLSDIR> in the
debug messages above.
Running at 135K produced a different message.
Program received signal SIGSEGV, Segmentation fault.
0x0000002a9581ac44 in std::string::_Rep::_M_destroy ()
from /usr/lib64/libstdc++.so.5
(gdb) bt 10
#0 0x0000002a9581ac44 in std::string::_Rep::_M_destroy ()
from /usr/lib64/libstdc++.so.5
#1 0x000000000041c7d5 in antlr::CommonAST::~CommonAST$delete ()
#2 0x00000000004168b7 in antlr::ASTRef::~ASTRef ()
#3 0x000000000041c7c6 in antlr::CommonAST::~CommonAST$delete ()
#4 0x00000000004168b7 in antlr::ASTRef::~ASTRef ()
#5 0x000000000041c7c6 in antlr::CommonAST::~CommonAST$delete ()
#6 0x00000000004168b7 in antlr::ASTRef::~ASTRef ()
#7 0x000000000041c7c6 in antlr::CommonAST::~CommonAST$delete ()
#8 0x00000000004168b7 in antlr::ASTRef::~ASTRef ()
#9 0x000000000041c7c6 in antlr::CommonAST::~CommonAST$delete ()
More information about the antlr-interest
mailing list