dmd
dmd copied to clipboard
fix Issue 20809 - return statement might access memory from destructe…
…d temporary
Shouldn't take a pointer into an object about to be destructed.
Thanks for your pull request, @WalterBright!
Bugzilla references
Auto-close | Bugzilla | Severity | Description |
---|---|---|---|
✓ | 20809 | regression | return statement might access memory from destructed temporary |
⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️
- Regression or critical bug fixes should always target the
stable
branch. Learn more about rebasing tostable
or the D release process.
To target stable
perform these two steps:
- Rebase your branch to
upstream/stable
:
git rebase --onto upstream/stable upstream/master
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#14358"
FYI @kinke, this is a fix in the codegen pass. As far as I can tell, GDC is unaffected by the bug, so I'd assume LDC is safe too.
Thx for the ping Iain; LDC (v1.29 on run.dlang.io) is apparently fine for the runnable testcase.
This pull request introduced a regression: https://issues.dlang.org/show_bug.cgi?id=24050
@WalterBright Kind ping, the above is a codegen regression.
BuildKite is currently red because of this regression.
@WalterBright @RazvanN7