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

GC generational zombie tests failing with x64 MSVC and C++17 in debug mode #1060

Open
Aidan63 opened this issue Jul 1, 2023 · 0 comments
Open

Comments

@Aidan63
Copy link
Contributor

Aidan63 commented Jul 1, 2023

Originally spotted when the CI started failing in my #1047 request, but when running the hxcpp tests with haxe 4.3.1 on MSVC for HXCPP_M64 with the debug flag set and the msvc toolchain modified to enable C++17 <flag value="/std:c++17"/>, the testObject, testFunc, testCustomObject, and testBytes zombie tests start to fail. The last three of these seem to be a knock on from the first failing test.

testObject is failing with the zombie from the GC being null. Stepping through things with visual studio, when FindZombies is called during collection the object marked as do not kill is never moved into the zombie list as it's mark byte has been set.
Assuming that this is due to some new aggressive optimisation MSVC can now do I started to modify the code a bit, seeing that clearStack has a nothing argument which, as the name suggests, does nothing I added a few more assuming that it exists to avoid compiler optimisations. Adding four more nothing arguments to that clearStack function then gets all four of those tests to start passing again! It is odd that this only happens with the debug flag, I'd have though thses sort of optimisations would be reserved for release modes.

I'm planning on not requiring C++17 for #1047, but its something to be aware of atleast...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant