Skip to content

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

@faern

Description

@faern

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions