-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
WebAssembly and Exception Handling (throw) #23442
Comments
Now the point is that for running clang-repl in the browser. This is the workflow taken
Pasting them down below just for reference i) LLVM IR (only relevant part)
ii) wasm module
I think this looks correct to me ! |
Now coming back to the dloepn step. The debugger through chrome tools tells me that this is the last part where it ends up emscripten/src/library_dylink.js Lines 856 to 859 in 4c14f1f
Which means it is trying to execute this block I'd guess
But it isn't able to. Now __wasm_call_ctors calls _GLOBAL__sub_I_incr_module_5 which simply calls __stmts__0 ... So I am guessing its just not able to run __stmts__0 but I think even that is being framed correctly ? |
Here's what I thought might be going wrong.
I think we have everything
If y'all are interested in the configuration, this is what i used.
Apart from adding the - |
Is there still an issue here? You are correct that you need to make sure that From your original backtrace looks like the code its trying to load a DLL called "const char*", which is very odd. Can you stop in the debugger and see why that might be? Is the name of file being loaded really "const char*"? (BTW, you file bugs like this it would be very helpful if you could copy and paste the text rather than attaching screenshots. Using test make it much easier for use to search / copy / etc within the issue.) |
Yes it is.
So I think we tried building the whole stack with
Is it ? So when we use clang-repl in the browser ever code block produced a file named I think it, it might just be the exception ptr type or something (not sure). The below issue looks relevant here. EDIT: Also just questioning my breakdown here. The wasm module generated looks correct to me and I think it is the init() call that I referred above that doesn't work ! Maybe someone could confirm that for me ? |
I think that fact that Can you break at that callsite and see the string ptr value being passed to Can you try building you side modules with |
Hey all,
After getting clang-repl running in the browser, I worked on integration it with jupyterlite. Xeus-cpp, a C++ Jupyter kernel provides a way to integrate it. Here is a static link that can be used to try C++ completely in the browser (https://compiler-research.org/xeus-cpp/lab/index.html) . An example notebook
xeus-cpp-lite-demo.ipynb
has been provided to show what all can be acheived.Coming back to the issue. I see we can't run
throw
(or a try catch blocking involving throw) while running clang-repl in the browser.The debug logs tell me that this comes from dlopen
All this can be tried through the static link above.
The text was updated successfully, but these errors were encountered: