Skip to content

fix Issue 16188 - [REG2.069] ICE on invalid code#5925

Closed
WalterBright wants to merge 1 commit intodlang:masterfrom
WalterBright:fix16188
Closed

fix Issue 16188 - [REG2.069] ICE on invalid code#5925
WalterBright wants to merge 1 commit intodlang:masterfrom
WalterBright:fix16188

Conversation

@WalterBright
Copy link
Member

Unsure if this is the right fix. Let's see what the autotester says.

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
16188 [REG2.069] ICE on invalid code

@WalterBright
Copy link
Member Author

The code in AliasDeclaration.semantic() is the most unholy mess I've ever seen.

@WalterBright
Copy link
Member Author

I'm not real happy with this fix, as the wrong error message is generated, as described in the attached test case. The whole AliasDeclaration.semantic() needs to be redone to make it fully lazy. But this fix at least takes care of the seg fault regression.

overnext = null;
if (!overloadInsert(sx))
ScopeDsymbol.multiplyDefined(Loc(), sx, this);
semanticRun = PASSsemanticdone;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving semanticRun here means repeated semantic for the error case. Is this intended?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change of src/declaration.d seems unrelated to the segfault fix, can we remove it?
If you intended to rerun semantic to produce the right error message, that apparently didn't work anyhow.

@MartinNowak
Copy link
Member

The overcomplicated alias stuff implementations are also the reason why I got stuck with #5847.

@MartinNowak
Copy link
Member

d_do_test doesn't check the return code and silently let's a segfault in fail_compilation pass.

@MartinNowak
Copy link
Member

MartinNowak commented Jul 9, 2016

See #5927 which addresses stable.

@MartinNowak MartinNowak closed this Jul 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Severity:Regression PRs that fix regressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants