Comments (6)
Just the one. You can see it in the name of the test test_asyncify_indirect_lists_add
(the paramaterized part of the name is the last part, so this the add
verison.
You can run it locally to see it fail with ./test/runner lto2.test_asyncify_indirect_lists_add
.
from emscripten.
Ah, thanks. I was looking in the stack trace and missed that at the top!
And thanks for the explanation @kripken. While disabling the test might be okay for now, I think we need a real permanent solution. Because I definitely intend to use this with LTO enabled!
But maybe this is actually okay, because if you're using ASYNCIFY_ADD
then you should be using it after running ASYNCIFY_ADVISE
, which will report the inlined function names. You just shouldn't be using it with function names that you assume are right from looking at the source code, you need to check the actual advise list first.
I kinda feel we really should strongly recommend (or even warn) that in non-optimised builds that ASYNCIFY_IGNORE_INDIRECT
should not be enabled, and that ASYNCIFY_ADD
should only be used in optimised builds after getting the actual asyncified list. Using these settings in debug builds is just setting you up for trouble when you eventually switch to release builds.
from emscripten.
I bisected this to an emscripten change: #21672
from emscripten.
It looks like in LTO the "noinline" function gets inlined by Binaryen. As a result we can't find it in the ADD list for asyncify, and the test fails. In general the ADD list is sensitive to this sort of thing, though it would be less so if we were aware of LLVM's "noinline" annotation in wasm-opt
.
For now I'll open a PR to disable this test in LTO mode.
from emscripten.
I'm struggling to understand how it would fail.
Which parameterised test in particular failed? Or did they all?
from emscripten.
In more detail, the situation in the test is that main
calls virt
which then does an indirect call to something that calls an import,
main() -> virt() -[indirect]-> virtual method on a class -> import
The test ignores indirect calls in Asyncify, so only the virtual method and the import are automatically marked. We manually mark virt
by putting it in the ADD list, and then thanks to propagation we also mark main
, and then the entire callstack is instrumented and things work.
However, when virt
is inlined into main
then we end up not finding the function we wanted to mark, and so main
does not get marked either, and we fail.
virt
is marked noinline to prevent this, but that only prevents LLVM inlining. Binaryen happens later, and it happens to inline in this case.
from emscripten.
Related Issues (20)
- Running browser.test_wasmfs_opfs_jspi twice causes tack overflow error HOT 5
- Password input with no echo is not working HOT 9
- Setting `--closure 1` causes `JSC_UNDEFINED_VARIABLE` errors HOT 3
- std::atomic<std::shared_ptr<T>> not compiling with emcc 3.1.42 / clang 17.0.0 HOT 5
- --emit-tsd crashes when used in standalone wasm mode
- Block size specification for audio worklet HOT 3
- Unexpected error of proxyAsync with emscripten_init_websocket_to_posix_socket_bridge HOT 3
- WebGPU new Surface API HOT 1
- Memory Profiler Incorrectly Reporting Data as Free HOT 1
- Using the closure compiler at link time corrupts references to variables in EM_JS blocks HOT 4
- `SUPPORT_BIG_ENDIAN=1` causes internal compiler error `ReferenceError: maybeExport is not defined` HOT 7
- Please set EMSCRIPTEN as an INTERNAL variable in the Emscripten.cmake toolchain file HOT 1
- emsdk 3.1.57: undefined symbol: saveSetjmp/testSetjmp HOT 4
- Int64 return functions with dynamic linking crashes on exception
- `--emit-tsd` doesn't account for `-s WASM_ASYNC_COMPILATION=0` with `-s MODULARIZE=1`
- Should remove remove (reduce usage of) withStackSave? HOT 1
- register_vector and register_map with raw pointer HOT 1
- Support omitting optional arguments in js embind bindings HOT 1
- --emit-tsd crashes when wasmTable is exported
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.