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

Fix use of context malloc in VM creation. #58

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

davidchisnall
Copy link
Contributor

The first malloc call that allocates the VM structure was passed a null VM and so crashed on attempting to access is context field. This is hidden in uses that don't use the context malloc because the compiler will remove the dead load.

The first malloc call that allocates the VM structure was passed a null
VM and so crashed on attempting to access is context field.  This is
hidden in uses that don't use the context malloc because the compiler
will remove the dead load.
@davidchisnall
Copy link
Contributor Author

FYI: We now have enough plumbing in CHERIoT RTOS to use this feature and have separate quotas for different JavaScript heaps that use Microvium, with the code shared. With this fix, it all works.

@coder-mike
Copy link
Owner

Thanks. That makes sense.

@coder-mike coder-mike merged commit e03a3cf into coder-mike:main Mar 7, 2023
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

Successfully merging this pull request may close these issues.

2 participants