//Compiling this results in a DMD crash. void main() { int i; scope(exit) i++; with(new RegExp(``)) {} } E:\D\src\tmp>dmd -v bug002.d parse bug002 semantic bug002 import object (E:\D\dmd\bin\..\src\phobos\object.d) semantic2 bug002 semantic3 bug002 bug002.d(5): Error: identifier 'RegExp' is not defined bug002.d(5): Error: RegExp is used as a type bug002.d(5): Error: new can only create structs, dynamic arrays or class objects , not void's bug002.d(5): Error: with expressions must be class objects, not 'void*' <crash>
Added to DStress as http://dstress.kuehne.cn/run/s/scope_19_A.d http://dstress.kuehne.cn/nocompile/s/scope_19_B.d http://dstress.kuehne.cn/run/s/scope_19_C.d http://dstress.kuehne.cn/run/s/scope_19_D.d http://dstress.kuehne.cn/nocompile/s/scope_19_E.d http://dstress.kuehne.cn/nocompile/s/scope_19_F.d
a patch to fix statement.c 3213 int TryFinallyStatement::fallOffEnd() { if (body) return body->fallOffEnd(); else return TRUE; }
This error had been fixed in DMD 1.029 or before by applying the patch. A version between 1.030 and 1.033 has introduced the regression that http://dstress.kuehne.cn/nocompile/s/scope_19_B.d segfaults on invalid again.
Fixed dmd 1.038 amd 2.022
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル