Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
libhxcpp 6.0.0 (unreleased)
------------------------------------------------------------

* Fixed a malformed cppia file that calls a static function on a host interface crashing the loader: it looked the function up in the interface's script glue, which an interface does not have. The fuzz job found it
* Added timedWait to hx::thread::ConditionVariable, which Haxe 5's sys.thread.Condition.timedWait calls: with the Haxe nightly, every program that used Condition failed to compile. It returns true once a signal or broadcast came and false when the time ran out, and it waits out the wakeups MSVC's timed waits give just before the deadline with nothing signalled
* Fixed an exception from blit, setSize or resize under the cppia JIT ending the process instead of reaching the script's catch, on typed arrays and on Array<Dynamic>: their native calls had no exception bridge. The script catches it, as it does interpreted and in compiled code (libhxcpp #404)
* Fixed resize() and cpp.NativeArray.setSize() on an Array<Dynamic> under the cppia JIT evaluating the array expression twice, so a call in it ran twice and the array it returned the second time was the one resized. The JIT evaluates it once (libhxcpp #411)
Expand Down
4 changes: 3 additions & 1 deletion src/hx/cppia/Cppia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2141,7 +2141,9 @@ struct CallStatic : public CppiaExpr

if (!replace && type->haxeClass.mPtr)
{
ScriptNamedFunction func = type->haxeBase->findStaticFunction(field);
// A host interface has a class but no script glue, and only a
// malformed file calls a static on one
ScriptNamedFunction func = type->haxeBase ? type->haxeBase->findStaticFunction(field) : ScriptNamedFunction();
if (func.signature)
{
//CPPIALOG(" found function %s\n", func.signature );
Expand Down
Binary file not shown.
Loading