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

Returning null from callback invoked in CallbackFunction causes NullReferenceException #307

Open
ThisIsNoZaku opened this issue Jul 4, 2022 · 0 comments

Comments

@ThisIsNoZaku
Copy link

In Processor_InstructionLoop.cs, if the CLR function wrapped by a CallbackFunction returns null, that null is pushed on the value stack and the processor proceeds on to call Internal_CheckForTailRequests. In Internal_CheckForTailRequests, a check of the type is attempted, causeing a NullReferenceException to be thrown.

At the very least, I believe Internal_CheckForTailRequests should do a null check and give a explanatory message. A better solution, in my opinion, is that the null should cause Nil to be pushed onto the stack instead.

@ThisIsNoZaku ThisIsNoZaku changed the title Returning null from callback invoked in CallbackFunction Returning null from callback invoked in CallbackFunction causes NullReferenceException Jul 4, 2022
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