Bug 6321 – stack overflow error while compiling with DMD

Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86_64
OS
Windows
Creation time
2011-07-14T23:04:00Z
Last change time
2014-02-15T02:19:01Z
Assigned to
nobody
Creator
anteusz

Comments

Comment #0 by anteusz — 2011-07-14T23:04:43Z
WHile running this... D:\standalone\dmd.2.054\dmd2\windows\bin\dmd -debug -O -ID:\src\antlr-3.3\antlr-3.3\runtime\D D:\m\antlr\backendd\runparser.d D:\m\antlr\PLSQL3_2_DLexer.d D:\m\antlr\PLSQL3_2_DParser.d ofD:\m\antlr\backendd\plsqlparser.exe %runtime%\BaseRecognizer.d %runtime%\BaseRecognizerConnector.d %runtime%\BitSet.d %runtime%\CharStream.d %runtime%\CommonToken.d %runtime%\EarlyExitException.d %runtime%\FailedPredicateException.d %runtime%\IntStream.d %runtime%\JavaExceptions.d %runtime%\Lexer.d %runtime%\MismatchedNotSetException.d %runtime%\MismatchedRangeException.d %runtime%\MismatchedSetException.d %runtime%\MismatchedTokenException.d %runtime%\MismatchedTreeNodeException.d %runtime%\MissingTokenException.d %runtime%\NoViableAltException.d %runtime%\RecognitionException.d %runtime%\RecognizerSharedState.d %runtime%\Token.d %runtime%\TokenSource.d %runtime%\TokenStream.d %runtime%\UnwantedTokenException.d %runtime%\tree\BaseTree.d %runtime%\tree\CommonTree.d %runtime%\tree\Tree.d %runtime%\tree\TreeAdaptor.d %runtime%\tree\TreeNodeStream.d %runtime%\ANTLRStringStream.d %runtime%\CharStreamState.d %runtime%\Parser.d %runtime%\CommonTokenStream.d %runtime%\BufferedTokenStream.d %runtime%\dfa.d %runtime%\RuleReturnScope.d %runtime%\tree\CommonTreeAdaptor.d %runtime%\tree\BaseTreeAdaptor.d %runtime%\ParserRuleReturnScope.d %runtime%\tree\CommonErrorNode.d %runtime%\tree\RewriteRuleTokenStream.d %runtime%\tree\RewriteRuleSubtreeStream.d %runtime%\tree\RewriteRuleElementStream.d %runtime%\tree\RewriteCardinalityException.d %runtime%\tree\RewriteEmptyStreamException.d -debug=trace_consume if you have a debug version of DMD, please give it to me,,,, let us get it over quickly.
Comment #1 by anteusz — 2011-07-14T23:05:19Z
So I get a very simple error: Stack overflow
Comment #2 by anteusz — 2011-07-14T23:08:47Z
Version 2.054
Comment #3 by hoganmeier — 2011-07-15T05:17:07Z
This doesn't help much, if you don't even specify what exact source files you've used (I mean where you got them etc). Also a stacktrace would be helpful if you can manage to get that.
Comment #4 by anteusz — 2011-07-15T05:39:44Z
(In reply to comment #3) > This doesn't help much, if you don't even specify what exact source files > you've used (I mean where you got them etc). > > Also a stacktrace would be helpful if you can manage to get that. How do I get a stacktrace from dmd?
Comment #5 by anteusz — 2011-07-15T05:41:03Z
I know it does not ctfe.
Comment #6 by hoganmeier — 2011-07-15T05:46:07Z
On Linux you would typically use GDB, but on Windows it's another question. You could debug it with Visual Studio (or WinDbg maybe) or use some other tool/code. http://stackoverflow.com/questions/105659/how-can-one-grab-a-stack-trace-in-c
Comment #7 by dmitry.olsh — 2011-07-15T06:24:53Z
Another thing to try is to run dmd in verbose mode: dmd -v <...>
Comment #8 by anteusz — 2011-07-15T06:38:06Z
running with -v .... function toString function toString function fill function clear code DFA function predict function noViableAlt function error function specialStateTransition function getDescription function unpackEncodedString function unpackEncodedStringToUnsignedChars function writeln function __dgliteral1522 function writeln function __dgliteral1529 function writeln function __dgliteral1534 function writeln function __dgliteral1556 function writeln function __dgliteral1560 function writeln function __dgliteral1564 function writeln function __dgliteral1568 function write function writeln function __dgliteral1571 code RuleReturnScope function getStart function getStop function getTree function getTemplate code CommonTreeAdaptor function dupNode function create function createToken function createToken function setTokenBoundaries function getTokenStartIndex function getTokenStopIndex function getText function getType function getToken function getChild function getChildCount function getParent function setParent function getChildIndex function setChildIndex function replaceChildren code BaseTreeAdaptor function nil function errorNode function isNil function dupTree function dupTree function addChild function becomeRoot function rulePostProcessing function becomeRoot function create function create function create function create function getType function setType function getText function setText function getChild function setChild function deleteChild function getChildCount function getUniqueID code ParserRuleReturnScope function getStart function getStop code CommonErrorNode function this function isNil function getType function getText function toString code RewriteRuleTokenStream function this function this function this function nextNode function nextToken function toTree function dup code RewriteRuleSubtreeStream function this function this function this function nextNode function dup code RewriteRuleElementStream function this function this function this function reset function add function nextTree function _next function toTree function hasNext function size function getDescription code RewriteCardinalityException function this function getMessage code RewriteEmptyStreamException function this Stack overflow I guess it mean the problem is in the linker? RewriteEmptyStreamException is the last file...
Comment #9 by dmitry.olsh — 2011-07-15T06:43:49Z
Now that's something.. but I'm not the one to ask about these logs really. To check if it's linker try: dmd -c <...> that should skip the linking stage and get you a huge object file. Other then that let me recommend you a tool for striping down test cases: https://github.com/CyberShadow/DustMite/wiki And make sure you did a good test condition, mine first attempts produced mostly empty files :)
Comment #10 by anteusz — 2011-07-15T09:48:11Z
Hi, figured out.. It was caused by ofD:\m\antlr\backendd\plsqlparser.exe Can you see - is missing there? That caused the error.
Comment #11 by andrej.mitrovich — 2012-01-21T16:37:33Z
I can reproduce in 2.054, but in 2.057 the stack overflow does not appear anymore and an app will be built. Closing.