Fix unwinding of C -> Haskell FFI calls with -threaded
Concern Raisedcb5c2fe87596

Authored by niteria on May 3 2018, 12:43 PM.

Description

Fix unwinding of C -> Haskell FFI calls with -threaded

See the new note.

Test Plan:
manual testing with patched gdb

Reviewers: bgamari, simonmar, erikd

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4666

Phyx raised a concern with this commit.May 12 2018, 6:16 AM
Phyx added a subscriber: Phyx.

This commit has killed the Windows and OSX targets.

This commit now has outstanding concerns.May 12 2018, 6:16 AM

:( Sorry about that, I will revert.

Phyx added a comment.May 12 2018, 9:46 AM

:( Sorry about that, I will revert.

No worries, thanks for the revert!
The error on Windows btw comes from that Windows is IL32P64 so RESERVED_C_STACK_BYTES ends up being 2048*4 instead of 2048*8. So the assert on https://phabricator.haskell.org/rGHCcb5c2fe875965b7aedbc189012803fc62e48fb3f fails.

However I don't know enough about DWARF to be able to say what the fix should be.