|
2 | 2 | libhxcpp 6.0.0 (unreleased) |
3 | 3 | ------------------------------------------------------------ |
4 | 4 |
|
| 5 | +* 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 | +* 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 | +* 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 |
| 8 | +* Fixed an Emscripten build failing to link (undefined symbol: __wasm_lpad_context) when -D HXCPP_LINK_NO_EXCEPTIONS was added to a project built before without it: the define also compiles without -fwasm-exceptions, but the build tool took every HXCPP_LINK_ define for a link option and compiled nothing again. It recompiles now, and once back without it |
| 9 | +* Fixed `haxelib run hxcpp defines` failing with "Could not read" from any folder but tools/hxcpp: it opened the build tool's sources by name, relative to the caller's folder. It lists the defines the build tool reads again |
| 10 | +* Fixed an ARM64 Windows build with HXCPP_MSVC_VER naming the Visual Studio to use: on an x64 machine the setup looked for vcvarsx64_arm64.bat, which Visual Studio calls vcvarsamd64_arm64.bat, and stopped, and on an ARM64 machine it found the ARM64 script and then ran the x64 one, compiling for x64. It runs the ARM64 script for the host |
| 11 | +* Fixed a build whose strip or manifest step failed after the link succeeding when run again, with the output unstripped or without its manifest: the link was recorded as done before those steps ran, so the next build had nothing to do. A failure after the link now forgets it, and the next build links again |
| 12 | +* Each thread object no longer holds a 64 KB buffer below API level 500: only Haxe 5's hx::thread::Scratch uses it, yet with Haxe 4 every Haxe thread kept one while it ran, and so did every native thread that asked for its sys.thread.Thread, for as long as Haxe's own thread list holds it, which for a native thread is until the process ends |
| 13 | +* Fixed Socket.select returning at once with nothing ready for a timeout past 2^31 seconds, Math.POSITIVE_INFINITY included: the timeout overflowed an int of seconds. It is capped at 10^8 seconds (over three years), past which macOS' select fails, and a NaN timeout waits for nothing. Windows' Poll, which takes the same timeout, is fixed with it |
| 14 | +* Fixed Sys.sleep returning at once, or after a much shorter time, for a duration that did not fit the native call: on Windows from 2^32 milliseconds, about 49.7 days, and past 2^31 seconds elsewhere. Sys.sleep(Math.POSITIVE_INFINITY) returned at once instead of sleeping for good. A long sleep goes in parts that fit |
| 15 | +* Fixed Lock.wait, Semaphore.acquire, Semaphore.tryAcquire with a timeout and a blocking Deque.pop ending the process with "GCFree Zone mismatch" when called inside a GC-free zone the caller had entered, as with cpp.vm.Gc.enterGCFreeZone: when they blocked they left that zone, so the caller's own exit failed. They keep the caller's zone, as Mutex and Condition already did |
| 16 | +* Fixed Mutex and Condition ending the process with "Bad Allocation while collecting" when a thread used them inside a GC-free zone it had entered, as with cpp.vm.Gc.enterGCFreeZone, while another thread collected. Their uncontended paths stop at a pending collection, and that stop paused the thread as if it were outside the zone; between collections it could instead wait for ever for a release the collector never sends to a thread in a zone. A thread in a zone is already safe, so cpp.vm.Gc.safePoint and those stops now do nothing there |
| 17 | +* Fixed a malformed cppia file that calls the super constructor of a class with no constructor, in it or in a script class above it, crashing the loader, which read the constructor through a null pointer. It fails to load with "Super constructor call on a class with no constructor". The fuzz job found it (libhxcpp #257) |
| 18 | +* Fixed a malformed cppia file whose constructor was a bare return or, in an interface, had no body loading and then crashing: a super call into it crashed the loader, and a new of its class crashed when it ran, through the constructor's missing function. It fails to load with "Constructor is not a function" (libhxcpp #257) |
| 19 | +* Fixed a malformed cppia file that makes a new instance of a script interface loading and then crashing when it ran, interpreted and under the JIT: an interface has no host base to make the object from. It fails to load with "Could not link new" and the interface's name, as for a type with nothing to construct (libhxcpp #257) |
| 20 | +* Fixed a malformed cppia file whose dynamic function was a bare return loading and then crashing, at the next collection after its class booted or when it was called, interpreted and under the JIT: its value was a closure of no function. It fails to load with "Dynamic function is not a function" (libhxcpp #257) |
| 21 | +* Fixed _hx_gc_freeze copying none of a string of 4,000 bytes or more with HXCPP_GC_NURSERY, so the frozen string read past its copy: the size of a large allocation in the nursery was taken as 0 when its header had a flag, as a long string's hash slot or UTF-16 text sets |
| 22 | + |
| 23 | +* Fixed the collector freeing large buffers that the memory of a CFFI abstract made with create_abstract pointed to, and crashing: the collector sorts the large allocations into an index on the first lookups of a collection, and the marking threads, which mark an abstract's memory conservatively, could build it two at once. One thread builds it now. In a test holding 20,000 buffers through 8,000 abstracts, 10 to 14 collections in 16 lost buffers or the process crashed |
| 24 | + |
| 25 | +* Fixed a weak map's toString calling toString on keys the collector had already freed, and on whatever had taken their memory, which could crash: a collection during the walk, which allocates as it goes, unlinked the entries whose keys had died, and the walk went on from its entry's next, which still led to them. A weak map now holds its keys and values while a walk is on them, and lets them go at the next collection after it |
| 26 | +* Fixed *= and -= on an element of an Array<Int> under the cppia JIT giving -2147483648 when the result passed the Int range: the JIT did them in Float arithmetic and converted back, where compiled code and the interpreter wrap, so a hash kept in an array, h[i] *= 31, went wrong once it overflowed |
| 27 | +* Fixed cppia negating an Int as a Float wherever the result was not used as an Int, interpreted and under the JIT: -x with x = 0 printed as "-0", -(-2147483648) gave 2147483648 instead of wrapping, and Type.typeof gave TFloat, as Dynamic, in a String or as a Float |
| 28 | +* Fixed interpreted cppia giving contains and remove on an Array<Any> as an Int where they became Dynamic or a String: "" + a.contains(x) was "1" and Std.isOfType(a.remove(x), Bool) false. The fix for the typed arrays had missed Array<Any>'s builtins |
| 29 | +* Fixed concat with a null array under the cppia JIT ending the process where it throws Null Object Reference (with HXCPP_CHECK_POINTER, or HXCPP_CATCH_SEGV as the Cppia host has), on typed arrays and Array<Any>: the native call had no exception bridge. The script catches it, as it does interpreted |
| 30 | +* Fixed loading a cppia module crashing with HXCPP_GC_MOVING when a collection that moved objects came while the module was making its types: updating the loading module's pointers read the types not yet made |
| 31 | +* Fixed the heap growing to twice its working target, and with more churn to hundreds of megabytes, when a program churned objects bigger than a line (128 bytes) with little of them live. A collection that started because no free block could take an allocation counted the free rows of blocks that bigger allocations had already taken and filled as rows in use, so the heap looked full and its target doubled at every other collection, and the groups given back in between were faulted in again. Churning 2,000,000 Bytes of 2,000 bytes with 64 kept reserves 20 MB instead of 41 MB, the same churn of 2,000-character strings after it 20 MB instead of 83 MB (896 MB with HXCPP_GC_MOVING), and churning 200,000 such Bytes takes 16 ms instead of 91 ms (median of 5 processes); a program that churned 1,000 to 2,000-byte Bytes, strings and arrays peaked at 26 MB to 48 MB instead of 187 MB to 896 MB (libhxcpp #256) |
| 32 | + |
5 | 33 | libhxcpp 6.0.0-rc.2 |
6 | 34 | ------------------------------------------------------------ |
7 | 35 |
|
|
0 commit comments