Skip to content
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

Issue 7437,7980,8053 - Partial fix for stack overflow with recursive alias this #1028

Merged
merged 8 commits into from Mar 7, 2013

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Jun 28, 2012

Issue 7437 - DMD enters infinite loop during overload resolution
Issue 7980 - Stack overflow / recursive expansion with alias this
Issue 8053 - Recursive alias this causes infinite loop

Compiler should detect recursive alias this dependencies and avoid stack overflow / infinite loop.

This pull request is not complete (there is still problems around CastExp and castTo), but able to detect many cases.

@@ -1904,6 +1904,9 @@ int typeMerge(Scope *sc, Expression *e, Type **pt, Expression **pe1, Expression
assert(t1);
Type *t = t1;

Type *att1 = NULL;
Copy link
Member

Choose a reason for hiding this comment

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

Please, some comments for what these variables represent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. WIll do.

@WalterBright
Copy link
Member

Basically, I find the intrusiveness of this a bit intimidating. I hope there's a simpler way.

@9rnsr
Copy link
Contributor Author

9rnsr commented Jun 29, 2012

Add two commits: improve comments, reduce TypeStruct and TypeClass size with packing field, and use enum.

Basically, I find the intrusiveness of this a bit intimidating. I hope there's a simpler way.

I think this is difficult...

@9rnsr
Copy link
Contributor Author

9rnsr commented Jun 30, 2012

Now, auto tester fails only in Windows platform, and it is reproduced in my PC.
From error message, it fails in Outbuffer::reserve, but I cannot understand why this occurs...

WalterBright added a commit that referenced this pull request Mar 7, 2013
Issue 7437,7980,8053 - Partial fix for stack overflow with recursive alias this
@WalterBright WalterBright merged commit ef9a73c into dlang:master Mar 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants