Skip to content

Issue 11629 - [CTFE] crash on AA.rehash #2893

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

Merged
merged 1 commit into from
Dec 10, 2013
Merged

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Nov 28, 2013

@yebblies
Copy link
Member

toBuiltinAAType isn't actually called from anywhere at the moment, is it possible the rest of the code takes other steps to preserve the type?

@9rnsr
Copy link
Contributor Author

9rnsr commented Nov 28, 2013

Maybe impossible. The type AssociativeArray!(K, V) is set in TypeAArray::dotExp, for rehash member function call. But CTFE will generate pure AA literal, and it should be typed as Taarray. So I think that using toBuiltinAAType in scrubReturnValue would be the most better way.

@9rnsr
Copy link
Contributor Author

9rnsr commented Nov 28, 2013

@donc How about this change?

@yebblies
Copy link
Member

I'm not sure about this. The bug is arguably that hasNonConstPointers assumes TOKassocarrayliteral's type is always TypeAArray. I wouldn't be surprised to find other places that assume this (these will be fixed by changing the type during scrubbing of course), and places inside ctfe as well.

Of course, pull #2856 fixes this as well.

WalterBright added a commit that referenced this pull request Dec 10, 2013
Issue 11629 - [CTFE] crash on AA.rehash
@WalterBright WalterBright merged commit cf0a8a4 into dlang:master Dec 10, 2013
@9rnsr 9rnsr deleted the fix11629 branch December 10, 2013 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants