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 14708 - destructor for temporary not called during stack un… #11676

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

WalterBright
Copy link
Member

…winding

This is working for me, so to be sure this PR adds the test case for it.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
14708 major destructor for temporary not called during stack unwinding

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#11676"

@WalterBright
Copy link
Member Author

Looks like it ain't working on Win64.

@WalterBright
Copy link
Member Author

So, why does the autotester dmd build of Win64 work, but the Azure dmd builds fail? The object files generated by each build of dmd should be identical. Can someone email one of the failing Azure dmd builds, so I can compare its output?

@WalterBright
Copy link
Member Author

Here's what the various builds are: https://issues.dlang.org/show_bug.cgi?id=21133

@wilzbach
Copy link
Member

wilzbach commented Sep 3, 2020

So, why does the autotester dmd build of Win64 work, but the Azure dmd builds fail? The object files generated by each build of dmd should be identical.

Because we stopped testing on auto-tester and stubbed the output for the windows machines until we get a full replication of all other builds.

Can someone email one of the failing Azure dmd builds, so I can compare its output?

Did it pass locally on your machine?

@rmanthorpe
Copy link
Contributor

rmanthorpe commented Sep 3, 2020

This highlights an asymmetry that has been introduced between constructor and destructor calls. Now temporaries have their destructors called but they are never constructed to begin with. This is a disaster for RAII.

@UplinkCoder
Copy link
Member

When has the compiler changed happened that made this work?

@WalterBright
Copy link
Member Author

Did it pass locally on your machine?

No. But at least now I know that Win64 is the only platform where it fails. Kenji's assessment of the cause is likely correct. I have my work cut out for me on this one.

@WalterBright
Copy link
Member Author

Why should everything else pass but buildkite/dmd dlang/phobos fail with:

../dmd/generated/linux/release/64/dmd  -conf= -I../druntime/import  -w -de -preview=dip1000 -preview=dtorfields -m64 -fPIC -transition=complex -O -release -unittest -version=StdUnittest -c -ofgenerated/linux/release/64/unittest/std/traits.o std/traits.d
--
  | posix.mak:379: recipe for target 'generated/linux/release/64/unittest/std/traits.o' failed
  | make[1]: *** [generated/linux/release/64/unittest/std/traits.o] Segmentation fault (core dumped)

which is a linux build yet this change is specific to win64?

@WalterBright WalterBright merged commit ec43114 into dlang:master Sep 9, 2020
@WalterBright WalterBright deleted the fix14708 branch September 9, 2020 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants