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

Function map can provoke OOM #411

Open
Acaccia opened this issue May 20, 2024 · 1 comment
Open

Function map can provoke OOM #411

Acaccia opened this issue May 20, 2024 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@Acaccia
Copy link
Collaborator

Acaccia commented May 20, 2024

It seems like map does not allocate space for its result, which might lead to OOM.

Here is an example of a failing program:

#[test]
fn foo() {
    let snippet = "(map + (list 1 2 3) (list 1 2 3) (list 1 2 3))".repeat(700);

    let expected = Value::Sequence(SequenceData::List(ListData {
        data: vec![Value::Int(3), Value::Int(6), Value::Int(9)],
        type_signature: ListTypeData::new_list(TypeSignature::IntType, 3).unwrap(),
    }));

    crosscheck(&snippet, Ok(Some(expected)))
}
@Acaccia Acaccia added the bug Something isn't working label May 20, 2024
@smcclellan
Copy link
Collaborator

Related to #407.

@smcclellan smcclellan added this to the WASM Phase 1 milestone May 28, 2024
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
Status: Status: 📋 Backlog
Development

No branches or pull requests

2 participants