You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ec235c6
Browse filesBrowse the repository at this point in the historyBrowse files
Mark only what the collector made from a default closure (#476)
A class's __register copies its vtable from an instance made on the stack, whose constructor gives each dynamic function a default closure holding it. A stale word a stack scan found could reach that closure, and marking it followed the stack address as if it were an object, which crashed the release telemetry test on Windows x64. The default closure now marks and visits its instance only when the collector manages that memory.
* Fixed a collection that could fault in a marking thread, or write a mark byte into a thread's stack, in a program with a class that has a dynamic method. A class's registration copies its vtable from an instance made on the stack, whose constructor gives each dynamic method a default closure holding that instance; a stale word a stack scan found could reach the closure, and marking it followed the stack address as if it were an object. The default closure now marks only what the collector made. The telemetry test crashed this way on Windows x64 every run, and stock hxcpp does too
5
6
* Fixed a Haxe 4 haxe.atomic.AtomicInt kept in a field reading freed memory after a collection: Haxe 4's AtomicInt on C++ is a cpp.Pointer into a one-element array nothing else holds, and the collector ignored cpp.Pointer fields, so it freed the array (HaxeFoundation/hxcpp#1225; Haxe 5 changed AtomicInt instead, in HaxeFoundation/haxe#12236). A cpp.Pointer field, or a pointer boxed in a Dynamic, now keeps what it points into in the GC heap, as a pointer on the stack does, and pins it under HXCPP_GC_MOVING. Of 10,000 atomics in fields, 9,999 read freed memory after a collection and none do now
6
7
* Fixed HXCPP_GC_INCREMENTAL failing to compile ("Incremental GC requires regenerated C++") with libhxcpp installed from a release, 6.0.0-rc.2 among them: the release workflow rewrote extraParams.hxml with the version and dropped its other line, the macro that turns on the generated write barriers the incremental collector needs. Only the version lines are rewritten now
7
8
* Fixed a change of link flags or libraries alone leaving the program as it was: the build tool linked again only when an object or library file had changed, so -D HXCPP_LINK_STACK_SIZE, HXCPP_LINK_NO_MEMORY_GROWTH, HXCPP_LINK_NO_EMBIND or HXCPP_LINK_NODERAWFS on an Emscripten build, which change nothing that is compiled, or a flag or library added to a target in Build.xml, did nothing until the objects changed. The flags, libraries and library paths are now part of what a link is checked against, so each program links once more after updating
0 commit comments