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

Error adding data segments #221

Open
chenyan2002 opened this issue Nov 30, 2021 · 0 comments
Open

Error adding data segments #221

chenyan2002 opened this issue Nov 30, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@chenyan2002
Copy link

Describe the Bug

Adding a new data segment produces bad Wasm binary.

Steps to Reproduce

    let mut m = Module::with_config(ModuleConfig::new());
    m.data.add(DataKind::Passive, vec![1,2,3,4]);
    m.emit_wasm_file("out.wasm").unwrap();

Running wasm2wat out.wasm -o out.wat gets the following error

000000e: error: invalid section code: 12

Expected Behavior

wasm2wat should produce no error.

@chenyan2002 chenyan2002 added the bug Something isn't working label Nov 30, 2021
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