Skip to content

[cppia] Exception control flow breaks with local functions in jit mode #1185

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

Closed
tobil4sk opened this issue Jan 31, 2025 · 1 comment
Closed

Comments

@tobil4sk
Copy link
Member

function other() {
	throw new haxe.Exception("hi");
}

function main() {
	sys.thread.Thread.create(() -> {
		other();
		trace("Continued past exception!");
	});
	Sys.sleep(1);
}

When the exception occurs in a different function, the program just continues running past it...

src/CppiaTest.hx:8: Continued past exception!

If the exception is instead thrown in the thread function, then the execution stops as expected.

@tobil4sk tobil4sk changed the title [cppia] Exception control flow breaks when threads are used in jit mode [cppia] Exception control flow breaks when lambdas are used in jit mode Jan 31, 2025
@tobil4sk tobil4sk changed the title [cppia] Exception control flow breaks when lambdas are used in jit mode [cppia] Exception control flow breaks with local functions in jit mode Jan 31, 2025
@tobil4sk
Copy link
Member Author

Turns out it's not specific to threads, it is reproducible with any local function, and was reported in the past in #876

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

1 participant