-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
segmentation fault when using tuple over member variable in more than one method #266
Comments
Thanks for the solid bug report. Unfortunately, I won't be able to work on LDC during the next two weeks, but I'll try to have a look at it as soon as possible in February. |
Here is the whole stacktrace: 0 in getParentFunc of /home/smunix/programming/d-projects/ldc/gen/nested.cpp:30 |
As we can see, in frame 1 the ThisExp ("this.i") is being evaluated from function is "void b()". "getParentFunc" tries its best to put a hand on "this" parent while checking that it's function "void b()", but this never happens. At some point before, in function "void a()", I suspect that the ThisExp was given "void a()" as its parent symbol, and that never changed since then. (gdb) fr 12 (gdb) fr 1 As the following excerpt (func=DtoNestedVariable, file nested.cpp) from the code shows it, we are in function b and we check whether we can assess the needed frame or not. "assert(fd)". Since this->parent is "a" and not "b", we'll never reach "b"'s frame from the this pointer. At one point, fd turns out to be null and the assertion fails.
|
I still need to figure out why "this" keeps saying that its parent function is "void a() {}" while being accessed from function "void b() {}". |
Gdc also ICEs on this: http://bugzilla.gdcproject.org/show_bug.cgi?id=49 |
relevant: dlang/dmd#1880 and dlang/dmd#1881 |
@John-Colvin: Thanks a lot for revisiting the open issues! Wish I could spend more time actually hacking on LDC right now… |
Upstream is fixed and merged. |
@safe pure nothrow attributes in core.bitop.
test.d:
ldc2 -c test.d
:The text was updated successfully, but these errors were encountered: