Skip to content

Fix EM_ASM not working with setjmp/longjmp#2271

Merged
quantum5 merged 6 commits intoWebAssembly:masterfrom
quantum5:em-asm-sjlj
Jul 31, 2019
Merged

Fix EM_ASM not working with setjmp/longjmp#2271
quantum5 merged 6 commits intoWebAssembly:masterfrom
quantum5:em-asm-sjlj

Conversation

@quantum5
Copy link
Copy Markdown
Member

Refs emscripten-core/emscripten#8894. This fix does not handle dynamic linking, which requires additional work.

@quantum5 quantum5 marked this pull request as ready for review July 30, 2019 18:08
Copy link
Copy Markdown
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

lgtm with one minor improvement suggestion, but @jgravelle-google knows this code the best so let's wait for review there.

Comment thread src/wasm/wasm-emscripten.cpp
Copy link
Copy Markdown
Member

@aheejin aheejin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't finish reading the whole thing yet, but just some passing nits

Comment thread src/wasm/wasm-emscripten.cpp Outdated
Comment thread src/wasm/wasm-emscripten.cpp Outdated
Comment thread src/wasm/wasm-emscripten.cpp Outdated
Comment thread src/wasm/wasm-emscripten.cpp Outdated
Copy link
Copy Markdown
Contributor

@jgravelle-google jgravelle-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall approach looks good

// is the result of adding its offset to __memory_base.
// In this case are only looking for the offset with the data segment so
// the RHS of the addition is just what we want.
assert(value->op == AddInt32);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're assuming things about the nature of the generated code. Is there more we can assert about the LHS here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the way the code was originally written. I think it's better to have more assertions, but I don't think it's in scope for this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, method extraction, carry on

Comment thread src/wasm/wasm-emscripten.cpp Outdated
Comment thread src/wasm/wasm-emscripten.cpp
Comment thread src/wasm/wasm-emscripten.cpp Outdated
Comment thread src/wasm/wasm-emscripten.cpp Outdated
Comment thread src/wasm/wasm-emscripten.cpp
@quantum5 quantum5 merged commit 692f466 into WebAssembly:master Jul 31, 2019
@kripken
Copy link
Copy Markdown
Member

kripken commented Aug 1, 2019

It looks like this has broken on CI, on emscripten tests:

https://chromium-review.googlesource.com/c/emscripten-releases/+/1729837

Note the poppler error, and also there may be another test that infinite loops since the infra hangs.

@kripken
Copy link
Copy Markdown
Member

kripken commented Aug 1, 2019

Confirmed locally that I see the same behavior as the bots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants