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

rebis-dev: MachineState::new calling Heap::store_resource_error makes tests non-deterministic #2760

Open
adri326 opened this issue Jan 8, 2025 · 1 comment

Comments

@adri326
Copy link
Contributor

adri326 commented Jan 8, 2025

Should Heap::store_resource_error always store the value? Right now, if I run tests with hard-coded offsets within the heap in isolation, they tend to break, which isn't great and defeats the purpose of MockWAM.

@triska
Copy link
Contributor

triska commented Jan 8, 2025

As I understand it, a resource error term is stored on the heap in advance, so that a resource error can be thrown even if no more memory can be allocated. So, regarding the question, the answer seems yes, also because a test may itself run out of memory (for instance, try running a test with small ulimit) and is then expected to throw a clean resource error instead of crashing or other unexpected behaviour.

Maybe the tests can be adapted to use offsets relative to the first cell (index) that is available on the heap when the test starts?

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