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

Figure out why loom fails on tests with large messages #12

Open
faern opened this issue May 9, 2020 · 0 comments
Open

Figure out why loom fails on tests with large messages #12

faern opened this issue May 9, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@faern
Copy link
Owner

faern commented May 9, 2020

Currently the test that sends a [u8; 4096] is gated to run only when not under loom. This causes invalid memory access under loom and I have no idea why.

The invalid memory access happens when the receiver.recv() method is called. The weird thing is that it happens before the method even runs:

    ...
    eprintln!("This is printed");
    receiver.recv();
}
impl Receiver {
    fn recv() {
        eprintln!("This is NOT printed");

So it's like if just calling the function is invalid memory access. Access to undefined memory is more exactly what it says.

Another weird thing is that this depends on the amount of code in the recv method and the size of the message. When writing this it's triggered when the message reach around 500 bytes. But if I start removing code from the recv method it starts working again.

@faern faern added the bug Something isn't working label May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant