Comments (3)
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.
from emscripten.
Sorry for the late, late reply.
It seems to happen when trying to pretty print anything that is an in-memory data structure (using pointers) (which is basically what CertiCoq translates a Coq inductive data types like list to).
If I compile with emcc
and add -fsanitize=undefined
and -sSAFE_HEAP
I get
load of misaligned address 0x00046ea4 for type 'unsigned long long', which requires 8 byte alignment
0x000471e4: note: pointer points here
b4 71 04 00 d4 71 04 00 00 08 00 00 a4 71 04 00 e0 71 04 00 00 00 00 00 00 00 00 00 00 00 00 00
^
Aborted(alignment fault)
The load happens in this function:
unsigned long long get_boxed_ordinal(value $v)
{
return (unsigned long long) *((unsigned long long *) $v + -1LL) & 255LL;
}
value
is typedef'd as int64_t
.
Compiling the C code with clang
also with -fsanitize=undefined
(and no optimizations) and running it doesn't give me an error.
If I add -O1
when compiling with emcc
, along with -fsanitize=undefined
and -sSAFE_HEAP
I still get the error about the misaligned load from the sanitizer, but it doesn't abort and it pretty prints correctly.
from emscripten.
Unaligned accesses are allowed in Wasm, so you can use -sSAFE_HEAP=2
to ignore the alignment fault.
from emscripten.
Related Issues (20)
- How to directly get context of WebGL2 from canvas when building with "-sOFFSCREENCANVAS_SUPPORT=1 -sOFFSCREEN_FRAMEBUFFER=1" flags?
- ASYNCIFY and INCOMING_MODULE_JS_API HOT 3
- thread wasm64 HOT 2
- Multithreading worker issue HOT 3
- Improve support for keyboard input on mobile browsers HOT 4
- emcc/wasm-ld fails autoconf sanity check HOT 3
- Error after setting GL_UNPACK_ROW_LENGTH HOT 10
- emconfigure sets both, CROSS_COMPILE and CC to absolute path, which seems to fail with man projects HOT 2
- Dynamic linking broken in 3.1.57
- `alignof(long double) == 8` even though `sizeof(long double) == 16`—why? HOT 2
- `FS.stat` has inconsistent `[a/m/c]time` values in WasmFS HOT 4
- pthread workers fail to run when ENVIRONMENT=worker only HOT 7
- Component model support in Emscripten HOT 1
- --emit-tsd does not output function argument names HOT 2
- Can't preload files/shared libs in service worker due to lack of XHR [PR OPEN]
- isinf() can return -1 HOT 4
- missing FE_xx defines HOT 7
- Building failure after switching from 3.1.47 to 3.1.57 HOT 5
- Passing array of arrays to emscripten HOT 1
- --extern-pre-js no longer accessible in Workers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emscripten.