-
-
Notifications
You must be signed in to change notification settings - Fork 416
fix Issue 14423 - struct destructors not finalized for AA values #1212
Conversation
Failure caused by a bad test in the dmd test suite: dlang/dmd#4585 |
thx |
Auto-merge toggled on |
I have no idea what's going on in the failing test, but here are some observations:
Maybe CowArray does not expect to be called from the GC? |
A few more observations:
|
I also noticed, the failing test passes in release mode, only fails in debug mode:
|
That's probably because the failure is caused by an assert that is not compiled into the release build. I guess that's also why Win32 passes. |
It's a bit ugly because the traceback is missing. |
As far as I have investigated, the CodepointSet memoized in std.regex.internel.ir.wordCharacter() contains a released CowArray after a GC collection due to bad reference counting. My current guess is this PR uncovers an unrelated bug with respect to postblits that didn't show up so far because the CowArrays just leaked. |
@rainers that makes a lot of sense. |
Might also be https://issues.dlang.org/show_bug.cgi?id=14443. |
I finally figured that there is a missing postblit when adding key values with I also added comments to |
fix Issue 14423 - struct destructors not finalized for AA values
Let's rather not add it to the next point release though, as it might cause trouble for some people. |
This builds an appropriate TypeInfo_Struct for aaA.Entry at runtime whenever a new Impl is created.
I've removed the old unused _aaGetX as it doesn't provide enough type info, and disabled the future yet unused _aaGetZ for the same reason.