Skip to content

Comments

[stable] Fix Issue 24139 - 'this' corruption in extern(C++) dtor when destructing via TypeInfo_Struct#15598

Merged
RazvanN7 merged 1 commit intodlang:stablefrom
kinke:fix24139
Sep 11, 2023
Merged

[stable] Fix Issue 24139 - 'this' corruption in extern(C++) dtor when destructing via TypeInfo_Struct#15598
RazvanN7 merged 1 commit intodlang:stablefrom
kinke:fix24139

Conversation

@kinke
Copy link
Contributor

@kinke kinke commented Sep 10, 2023

For the TypeInfo_Struct.xdtor field, the linkage of the aggregate itself plays no role; it's the linkage of the destructor that matters.

A real-life example for this is DMD's own OutBuffer.

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
24139 major 'this' corruption in extern(C++) dtor when destructing via TypeInfo_Struct

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 "stable + dmd#15598"

…ing via TypeInfo_Struct

For the `TypeInfo_Struct.xdtor` field, the linkage of the aggregate
itself plays no role; it's the linkage of the destructor that matters.

A real-life example for this is DMD's own `OutBuffer`.
@RazvanN7 RazvanN7 merged commit fbafba8 into dlang:stable Sep 11, 2023
@kinke kinke deleted the fix24139 branch September 11, 2023 10:02
@ibuclaw ibuclaw mentioned this pull request Sep 15, 2023
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.

3 participants