-
-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ldc crashes on excel-d tag v0.3.9 #2808
Comments
Please specify the failing LDC command line for simpler reproducibility. |
It doesn't get more reproducible than Anyway:
|
Reproducing with dub is always a PITA. I know that it's nice for you guys reporting issues, but we have to isolate the failing line in order to debug it, and the shorter it is/the less dependencies are needed, the more likely it is to get one of us motivated to have a look at it. |
The problem occurs when trying to create the nested context for extern(Windows) XLOPER12* DoubleArrayToAnyArray(scope XLOPER12* arg0) nothrow @trusted /* catch Error */ {
static import test.d_funcs;
import xlld.wrap.wrap: stringAutoFreeOper;
import xlld.memorymanager: gTempAllocator;
import nogc.conv: text;
import std.experimental.allocator.mallocator: Mallocator;
alias wrappedFunc = test.d_funcs.DoubleArrayToAnyArray;
static XLOPER12 errorRet;
try
return () @trusted {return wrapModuleFunctionImpl!wrappedFunc(gTempAllocator, arg0);}();
catch(Exception e)
errorRet = stringAutoFreeOper(text("#ERROR calling ", __traits(identifier, wrappedFunc), ": ", e.msg));
catch(Error e)
errorRet = stringAutoFreeOper(text("#FATAL ERROR calling ", __traits(identifier, wrappedFunc), ": ", e.msg));
return &errorRet;
} |
So this function is mixed into the unittest block; it's not static, so it's nested, and supposed to inherit the unittest context (as hidden context pointer argument), which apparently isn't available for unknown reason. |
Minimized: void foo()
{
extern(Windows) void DoubleArrayToAnyArray(void* arg0)
{
auto dg = () => { auto r = arg0; };
}
auto local = 123;
auto arg = () { return local; }();
DoubleArrayToAnyArray(null);
} Note: needs |
Nope, needs something other than |
Oh, only nested |
Works for me with #2809 on Win64:
|
excel-d v0.3.9 cannot be tested with ldc. I tried versions 1.7.0, 1.8.0, 1.9.0, 1.10.0. All of them crash.
This is on Arch Linux, but the ldc binaries I tried it with came from
install.sh
. The pacman version also acts the same.The text was updated successfully, but these errors were encountered: