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
Behavior differs from x86-64 binary #21846
Comments
If possible, I think think would be a lot more actionable if you could narrow this down. In doing so you could also reveal more about the divergence. |
Sorry for the late, late reply. If I compile with
The load happens in this function: unsigned long long get_boxed_ordinal(value $v)
{
return (unsigned long long) *((unsigned long long *) $v + -1LL) & 255LL;
}
Compiling the C code with If I add |
Unaligned accesses are allowed in Wasm, so you can use |
I have some C code generated through the CertiCoq project and the behavior (printed result) of running the Wasm module via the generated js scaffolding (w/ node v.20.12.2) differs from the output of running the x86-64 binary (compiled w/ clang v.17.0.6).
The code is supposed to prettyprint a functional list of booleans (result of the Coq expression
List.app (List.repeat true 500) (List.repeat false 300)
in s-expression form.I have attached a zip with the C files needed for running the
emcc
command:demo1.zip
Output of running the x86-64 binary:
Output of running the Wasm module through node via the generated js scaffolding:
If I add the
-O1
optimization flag, the correct result is printed.Emscripten version:
Full command:
Output:
The text was updated successfully, but these errors were encountered: