-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
backend:WebAssemblyquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
UPD: here is a slightly improved example.
Here is a simple C++ program:
struct BigClass {
char data[400000];
};
struct Class {
char big_data[400000];
int value{33};
};
Class glob{};
extern "C" int _start() {
glob.value = 42;
BigClass s1{};
return glob.value;
}
When compiled and ran with wasmer runtime, it outputs "0" instead of expected "42":
+ clang-17 --version
clang version 17.0.6
Target: aarch64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /nix/store/glzjy0xq2xhmwg6pc8c1pdk7gln127wj-clang-17.0.6/bin
+ clang-17 -std=c++20 -pedantic -Wall -Wno-unused-variable --target=wasm32 --no-standard-libraries -mbulk-memory -O0 -o main.wasm main.cpp
+ wasmer main.wasm
0
Metadata
Metadata
Assignees
Labels
backend:WebAssemblyquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!