Thread overview
[Issue 18953] Win32: extern(C++) struct destructor not called correctly through runtime
Jun 07, 2018
Rainer Schuetze
Jun 07, 2018
Manu
Jun 15, 2018
Manu
Jun 15, 2018
Manu
Jun 15, 2018
Rainer Schuetze
June 07, 2018
https://issues.dlang.org/show_bug.cgi?id=18953

--- Comment #1 from Rainer Schuetze <r.sagitario@gmx.de> ---
Probalby happens because TypeInfo_Struct.destroy doesn't use the expected __thiscall calling convention: https://github.com/dlang/druntime/blob/master/src/object.d#L2010

--
June 07, 2018
https://issues.dlang.org/show_bug.cgi?id=18953

Manu <turkeyman@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |turkeyman@gmail.com
           Assignee|nobody@puremagic.com        |turkeyman@gmail.com

--- Comment #2 from Manu <turkeyman@gmail.com> ---
This sounds like a job for that proposal you had where assigning a C++ method to a delegate would imply a shim function to perform the adaptation.

I don't really know how/where to hack that in, would you mind looking into that?

--
June 15, 2018
https://issues.dlang.org/show_bug.cgi?id=18953

--- Comment #3 from Manu <turkeyman@gmail.com> ---
Was this fixed by your last merged patch?

--
June 15, 2018
https://issues.dlang.org/show_bug.cgi?id=18953

Manu <turkeyman@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |C++, industry

--
June 15, 2018
https://issues.dlang.org/show_bug.cgi?id=18953

--- Comment #4 from Rainer Schuetze <r.sagitario@gmx.de> ---
I added a test for this in some iteration, but it seemed it failed/crashed on Linux, so I removed it immediately to not complicate the PR.

I'll open a new PR with a test case...

--
June 25, 2018
https://issues.dlang.org/show_bug.cgi?id=18953

--- Comment #5 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/3a4707b4b15743ff4a068fe5ac6b983b6ce042c4 fix issue 18953 - extern(C++) struct destructor not called correctly through runtime

Win32 already fixed by d08e0fb3bff6767bd28516f53393083d86f63045 other 32-bit platforms have the same issue

https://github.com/dlang/dmd/commit/f95b301a78a4124904e85622f63215b8ce248e67 Merge pull request #8359 from rainers/issue18953

fix issue 18953 - 32-bit: extern(C++) struct destructor not called cor…

--
June 25, 2018
https://issues.dlang.org/show_bug.cgi?id=18953

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--