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

Phantom fields appear in typedef argument in 64-bit Hashlink #491

Closed
Cleod9 opened this issue Nov 14, 2021 · 1 comment
Closed

Phantom fields appear in typedef argument in 64-bit Hashlink #491

Cleod9 opened this issue Nov 14, 2021 · 1 comment

Comments

@Cleod9
Copy link

Cleod9 commented Nov 14, 2021

Created a repo to demonstrate the issue: https://github.com/Cleod9/hashlink-typedef-bug

In short, when certain conditions are met, a relatively harmless method such as this can have a phantom field appear in the passed object:

public function myFunc(obj:MyTypedef) {
	// obj may contain an addtional field that you didn't set!!!
}

I've only been able to narrow it down to the following conditions:

  • The typedef needs to contain many fields
  • The amount of fields affects whether the bug occurs or not
  • The names of the fields affects whether the bug occurs or not
  • The bug only occurs in the 64-bit version of hashlink

It was extremely difficult to break this down to a generalized example because of the volatile conditions. Unfortunately I was unable to identify where this might be caused in Hashlink's code base as it's unclear which part of the code would be responsible for this behavior, and it seems this issue has existed since 64-bit support was first introduced.

Any help on this issue would be greatly appreciated!

@ncannasse
Copy link
Member

Thanks for the repro !

crazyjul pushed a commit to playdigious/hashlink that referenced this issue Jan 18, 2024
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