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

Access violation in haxe #289

Closed
neimanpinchas opened this issue Jun 5, 2024 · 3 comments
Closed

Access violation in haxe #289

neimanpinchas opened this issue Jun 5, 2024 · 3 comments

Comments

@neimanpinchas
Copy link
Contributor

Not sure if this is hashlink or thx related

posted there
https://community.haxe.org/t/hashlink-access-violation-when-abstract-is-used-as-inerface/4250

I am suffeing from a Access Violation error in hashlink.
In thx.core

Big.hx
public function multiply(that:BigIntImpl):BigIntImpl {
if (that.isZero()) //<--- Excpetion here
return Small.zero;
return that.isSmall ? multiplySmall(cast that) : multiplyBig(cast that);
}
BigIntImpl is a interface, and that is a BigInt abstract backed by the BigIntImpl, the method is being invoked by the * operator torough the abstract.

The base class is Big which extens BigIntImpl.

When I check it in the hashlink debugger it seems like that is now a simple int array hashlink debugger says Unknown value isZero.

How can I get past such a problem?

@fponticelli
Copy link
Owner

When I wrote thx.core I do not believe hashlink existed yet so it has definitely not being tested there. I have not used Haxe for a minute. If you figure it out I will certainly merge a PR.

@neimanpinchas
Copy link
Contributor Author

Hi

Please see the following

HaxeFoundation/hashlink#688 (comment)

Would you accept a fix that removes the inline keword? we could do #if !hl

@fponticelli
Copy link
Owner

Of course, I like the conditional inline idea, feel free to make a PR for it.

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

2 participants