If compiled with -version=dynamic, the code below segmentfaults. import std.stdio; int main(){ version(dynamic){ double[] a = new double[2]; double[] b = new double[2]; }else{ double[2] a; double[2] b; } a[0] = 4.0; a[1] = 2.0; b[0] = -0.5; b[1] = -0.25; writefln("a:\t%s\t%s", a[0], a[1]); writefln("b:\t%s\t%s", b[0], b[1]); asm{ movupd XMM0, a; movupd b, XMM0; emms; } writefln("-- asm finished --"); writefln("a:\t%s\t%s", a[0], a[1]); writefln("b:\t%s\t%s", b[0], b[1]); return 0; } test cases: http://dstress.kuehne.cn/run/o/odd_bug_05_A.d http://dstress.kuehne.cn/run/o/odd_bug_05_B.d http://dstress.kuehne.cn/run/o/odd_bug_05_C.d http://dstress.kuehne.cn/run/o/odd_bug_05_D.d
It segment faults because dynamic arrays are stored differently than static arrays. When using inline asm, one must account for this. For the dynamic arrays, using the following will work: asm{ mov EAX,a+4; movupd XMM0, [EAX]; mov EAX,b+4; movupd [EAX], XMM0; emms; }
dlang/dlang-bot pull request #271 "Fixes so far" was merged into master: - b0d4e55c19dc65b82920751bd4d1cc54194ba24d by Vladimir Panteleev: dlangbot: Add support for draft pull requests Fixes #234. https://github.com/dlang/dlang-bot/pull/271