DMD crashes with a stack overflow when compiling this file: http://mainia.de/large_parser.d It's probably caused by a large array literal. Smaller parsers compile fine, for example: http://mainia.de/small_parser.d (this one needs http://mainia.de/container.d)
This doesn't happen if the array literals are initializers. In large_parser.d the large array literals appeared in the constructor - DMD crashes. The following example uses them as const initializers and it compiles without problems: http://mainia.de/large_parser2.d
Created attachment 332 [details] Reduced test case Reduced test case. Clearly shows it's caused by the large array literal. On my system, the smallest array literal which caused a stack overflow was 10776 elements. Needs to be inside a function. void main() { ubyte[] data = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ... 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0]; } --- Stack overflow.
Fixed DMD2.030 and 1.045
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル