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 load_context_module triggering unreachable!() #2756

Merged
merged 2 commits into from
Jan 12, 2025

Conversation

adri326
Copy link
Contributor

@adri326 adri326 commented Jan 7, 2025

Loading a file with the following triggers a panic, caused by Machine::load_context_module calling Machine::unify_atom with un-derefed Vars:

:- initialization((M = user, loader:load_context(M))).

This changes the code in dispatch.rs to first dereference the register before calling load_context_module.

@adri326 adri326 changed the base branch from master to rebis-dev January 7, 2025 17:09
@adri326 adri326 force-pushed the fix-load-context-unreachable branch from 279c2a6 to 0f1d816 Compare January 7, 2025 17:21
@adri326 adri326 marked this pull request as ready for review January 7, 2025 17:24
adri326 added a commit to adri326/scryer-prolog that referenced this pull request Jan 7, 2025
@adri326 adri326 force-pushed the fix-load-context-unreachable branch from 0f1d816 to fad3ecd Compare January 7, 2025 18:28
@triska
Copy link
Contributor

triska commented Jan 7, 2025

This looks good, thank you a lot!

@adri326
Copy link
Contributor Author

adri326 commented Jan 8, 2025

Rebasing to master, since this is where I need this PR first for #2738

@adri326 adri326 changed the base branch from rebis-dev to master January 8, 2025 16:56
@adri326 adri326 force-pushed the fix-load-context-unreachable branch from fad3ecd to eff094c Compare January 8, 2025 16:57
@mthom mthom merged commit 1ed4fe6 into mthom:master Jan 12, 2025
13 checks passed
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.

3 participants