Skip to content

Conversation

soxfox42
Copy link
Contributor

@soxfox42 soxfox42 commented Aug 7, 2023

Building the C template with recent (>=16) WASI SDKs caused the following error:

[wasm-validator error in function 1] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on
(memory.fill
 (i32.const 100836)
 (i32.const 0)
 (i32.const 66)
)
[wasm-validator error in function 31] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on
(memory.copy
 (local.get $0)
 (local.get $1)
 (local.get $2)
)
[wasm-validator error in function 32] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on
(memory.fill
 (local.get $0)
 (local.get $1)
 (local.get $2)
)

This is due to WASI libc now using bulk memory operations. Building with --strip-all was removing the WebAssembly target features section, causing the validator to complain about bulk memory operations.

@nesbox nesbox merged commit 02fd0eb into nesbox:main Aug 8, 2023
@soxfox42 soxfox42 deleted the c-build-fix branch August 8, 2023 22:01
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

Successfully merging this pull request may close these issues.

2 participants