Am 11.10.2013 18:23, schrieb Stefan Jonasson:
http://dpaste.dzfl.pl/77b60e32
I must start by apologizing for the bad test program, since it's not
fully minimal and requires 2 external binary files in order to
reproduce. But any files seems to suffice, my test files are 8k and the
needle-file is not contained in the haystack-file.
// object.Error: Access Violation
algorithm.d(3609):
for (auto i = needle.save; !i.empty && !binaryFun!pred(i.back, needleBack);
DMD32 D Compiler v2.063.2
// This works fine
bool binaryFun_i(uint a, uint b) { return a==b; }
// object.Error: Access Violation
bool binaryFun_b(ubyte a, ubyte b) { return a==b; }
Also if compiling with -inline, the problem disappears, this is what
gave me the "wild codegen theory". Basically I'm wondering if this is
this a known issue, or if my program invalid?
Does this always happen or only when you specifiy -O?
Because I think I have a codegen bug too which only appears when
compiling with -O. It also involves a ubyte parameter.
Kind Regards
Benjamin Thaut