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

fix Issue 14639 - Assigning init value to struct uses stack, causing … #6766

Merged
merged 1 commit into from Mar 28, 2020

Conversation

WalterBright
Copy link
Member

…segfault

@dlang-bot
Copy link
Contributor

dlang-bot commented May 10, 2017

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
14639 normal Assigning init value to struct uses stack, causing segfault

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#6766"

@UplinkCoder
Copy link
Member

@WalterBright fails in runnable/sdtor.d

@andralex
Copy link
Member

I'm unclear about this. The test seems to imply that .init is an rvalue for all types. Is that the case?

@PetarKirov
Copy link
Member

You can't get the address of .init so yes, it behaves like an rvalue, even though it's stored in the binary, AFAIK.

@Geod24
Copy link
Member

Geod24 commented Mar 28, 2020

You can safely ignore the C++ interop tests

@WalterBright
Copy link
Member Author

Howz about an approval, then? :-)

Copy link
Member

@Geod24 Geod24 left a comment

Choose a reason for hiding this comment

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

Does it still work to disable opAssign ? Do we have a test for that ?

src/dmd/aggregate.h Show resolved Hide resolved
@WalterBright
Copy link
Member Author

The hasBlitAssign only is set for generated opAssign, which won't happen for disabled opAssign.

@WalterBright
Copy link
Member Author

Thank you. It'll be good to put this old issue to rest.

@dlang-bot dlang-bot merged commit 9c05bf1 into dlang:master Mar 28, 2020
@WalterBright WalterBright deleted the fix14639 branch March 28, 2020 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants