Destructor17 opened issue #13817:
Steps to Reproduce
- Compile any WASM code (I tested only core modules yet) with
cargo run --features=all-arch -- compile --target aarch64-windows-msvc path/to/your.wasm- Inspect
.cwasmfor maximum alignment requirement (.textand.rodata.wasmshould have maximum one) usingreadelf path/to/your.cwasmExpected Results
Alignment requirement is 4KB
Actual Results
Alignment requirement is 65536 (64KB)
Versions and Environment
Tested on https://github.com/bytecodealliance/wasmtime/commit/11350e99f753c3c6c26bce41d5211cf8e5761df6, the most recent
mainat the time of wwritingOperating system: Ubuntu (but Windows target)
Architecture: x86_64 (but AArch64 target)
Extra Info
It looks like this function determines alignment requirement
This blogpost says that Windows always uses 4KB pages (with exception of Alpha AXP and Itanium). And
page_size_alignreturns 4KB for Windows in all cases but Arm64.I'm trying to put
.cwasmright into my embedder's.exeby wrapping it with COFF and linking it, and turns out COFF supports alignment requirement only up to 8KB.
Destructor17 added the bug label to Issue #13817.
Destructor17 edited issue #13817:
Steps to Reproduce
- Compile any WASM code (I tested only core modules yet) with
cargo run --features=all-arch -- compile --target aarch64-windows-msvc path/to/your.wasm- Inspect
.cwasmfor maximum alignment requirement (.textand.rodata.wasmshould have maximum one) usingreadelf -S path/to/your.cwasmExpected Results
Alignment requirement is 4KB
Actual Results
Alignment requirement is 65536 (64KB)
Versions and Environment
Tested on https://github.com/bytecodealliance/wasmtime/commit/11350e99f753c3c6c26bce41d5211cf8e5761df6, the most recent
mainat the time of wwritingOperating system: Ubuntu (but Windows target)
Architecture: x86_64 (but AArch64 target)
Extra Info
It looks like this function determines alignment requirement
This blogpost says that Windows always uses 4KB pages (with exception of Alpha AXP and Itanium). And
page_size_alignreturns 4KB for Windows in all cases but Arm64.I'm trying to put
.cwasmright into my embedder's.exeby wrapping it with COFF and linking it, and turns out COFF supports alignment requirement only up to 8KB.
fitzgen closed issue #13817:
Steps to Reproduce
- Compile any WASM code (I tested only core modules yet) with
cargo run --features=all-arch -- compile --target aarch64-windows-msvc path/to/your.wasm- Inspect
.cwasmfor maximum alignment requirement (.textand.rodata.wasmshould have maximum one) usingreadelf -S path/to/your.cwasmExpected Results
Alignment requirement is 4KB
Actual Results
Alignment requirement is 65536 (64KB)
Versions and Environment
Tested on https://github.com/bytecodealliance/wasmtime/commit/11350e99f753c3c6c26bce41d5211cf8e5761df6, the most recent
mainat the time of wwritingOperating system: Ubuntu (but Windows target)
Architecture: x86_64 (but AArch64 target)
Extra Info
It looks like this function determines alignment requirement
This blogpost says that Windows always uses 4KB pages (with exception of Alpha AXP and Itanium). And
page_size_alignreturns 4KB for Windows in all cases but Arm64.I'm trying to put
.cwasmright into my embedder's.exeby wrapping it with COFF and linking it, and turns out COFF supports alignment requirement only up to 8KB.
Last updated: Jul 29 2026 at 05:03 UTC