-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Too aggressive duplicate code culling #2336
Comments
I don't think that mechanism can directly lead to crashes. |
for getTypeInfoType(type, nullptr);
TypeInfoDeclaration *tidecl = type->vtinfo;
assert(tidecl);
Declaration_codegen(tidecl); // no codegen - 'speculative type'
assert(getIrGlobal(tidecl)->value != NULL); // asserts in getIrGlobal(), as tidecl->ir->irGlobal is null
LLConstant *c = isaConstant(getIrGlobal(tidecl)->value); // crashes |
|
Obviously it can cause a crash, sorry. What I meant to say is that the bugs in the logic that cause the other problems shouldn't be more than coincidentally related to any crashes – those issues (e.g. as reported on the DMD Bugzilla) are caused by the compiler correctly executing an incorrect decision to discard a symbol. This, on the other hand, looks like an inconsistency between various parts of the AST – |
|
I added some printfs in the |
|
From the backtrace you posted, it looks like the |
|
Just for clarification, the type whose TypeInfo is required is a class, not a struct. |
|
The TypeInfo thingy was a more general issue and has been fixed in the meantime. The rest is too vague and most likely a general front-end issue. |
As we know since #2168 at least, there's too much code culling going on. There, it was part of a performance problem due to less inlining opportunities. Weka apparently need to weaken the culling to get around missing symbols. Even non-unittest Phobos needs to be compiled all-at-once to prevent missing symbols since 2.074.
And now it appears to cause a crash for another code base due to a required TypeInfo being wrongly discarded as speculative, once again only when compiling that module separately. It compiles fine with DMD 2.074.0 though.
The text was updated successfully, but these errors were encountered: