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
Haxe 4.3.6
HashLink 1.14.0
Repro code: https://try.haxe.org/#F21Ca171
If I explicitly mark func as Dynamic it works without issues.
Other targets work as expected.
I also noticed that on Windows it'll throw an error instead.
source/Main.hx:7: Haxe is great!
Uncaught exception: Access violation
Called from $Main.testFunc(Main.hx:17)
Called from $Main.main(Main.hx:13)
Called from .init(?:1)
The text was updated successfully, but these errors were encountered:
NotHyper-474
changed the title
Segfault when calling local function made with Reflect.makeVarArgs on another function
Segfault when calling local function made with Reflect.makeVarArgs in another function
Dec 26, 2024
NotHyper-474
changed the title
Segfault when calling local function made with Reflect.makeVarArgs in another function
Segfault/Access Violation when calling local function made with Reflect.makeVarArgs in another function
Dec 30, 2024
I confirm that I can repro with your example with latest hashlink.
I note the example here just in case:
classMain {
staticfunctionmain() {
varfunc=function(args:Array<Dynamic>):Void {
trace("Haxe is great!");
};
varf2/*: Dynamic*/=Reflect.makeVarArgs(func);
f2([]); // Works as expectedtestFunc(f2);
}
staticfunctiontestFunc(func:Dynamic) {
func([]); // Segfaults if f2 is not type explicitly as Dynamic
}
}
It segfault for hl/c and hl/jit.
It also only fails if :Dynamic is present in testFunc(func:Dynamic). And will not fail if it's Dynamic->Void either.
Seems to be caused by f2's type, it's typed as Array<Dyn>->Void (caused by f2([])) and passed as Dyn, and hashlink somehow don't like it. I'll see if I can find some fix.
Haxe 4.3.6
HashLink 1.14.0
Repro code: https://try.haxe.org/#F21Ca171
If I explicitly mark
func
asDynamic
it works without issues.Other targets work as expected.
I also noticed that on Windows it'll throw an error instead.
The text was updated successfully, but these errors were encountered: