Page MenuHomePhabricator

[WebAssembly] Define the signature for __stack_chk_fail

Authored by sunfish on Mar 18 2019, 4:42 PM.



The WebAssembly backend needs to know the signatures of all runtime libcall functions. This adds the signature for __stack_chk_fail which was previously missing.

Diff Detail


Event Timeline

sunfish created this revision.Mar 18 2019, 4:42 PM
sbc100 accepted this revision.Apr 8 2019, 10:33 AM

I think I may have seen a crash recently related to this.

Can we add a test?

Also, IIRC the crash the is reported doesn't include the symbol name, which would be useful in the future perhaps?

This revision is now accepted and ready to land.Apr 8 2019, 10:33 AM

I made the error message include the name of the function, and added a test.

This revision was automatically updated to reflect the committed changes.
sbc100 added inline comments.Apr 29 2019, 3:08 PM

Wouldn't it be nicer to do something like: llvm_unreachable("unexpected runtime library name: " + Name);

sunfish marked an inline comment as done.Apr 29 2019, 3:40 PM
sunfish added inline comments.

It's a little more involved in that because all the types are char* and the argument is char*, but it's doable. Done, in r359509.