Fix GHCi segfault in Windows 32bit
ClosedPublic

Authored by Phyx on Dec 21 2015, 2:10 PM.

Details

Summary

Add missing calling convention to function pointer,
incorrect cdecl calling convention which should be stdcall
on x86 was causing the stack to be corrupted. When it tried to
return from the function the return pointer would be invalid.

Test Plan

./validate

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Phyx updated this revision to Diff 5924.Dec 21 2015, 2:10 PM
Phyx retitled this revision from to Fix GHCi segfault in Windows 32bit.
Phyx updated this object.
Phyx edited the test plan for this revision. (Show Details)
Phyx added a reviewer: thomie.
Phyx updated the Trac tickets for this revision.
bgamari accepted this revision.Dec 21 2015, 4:30 PM
bgamari edited edge metadata.

Excellent catch!

thomie accepted this revision.Dec 21 2015, 6:44 PM
thomie edited edge metadata.

Well done.

Phyx added a comment.Dec 21 2015, 11:17 PM

Cheers, thanks for the review :)

This revision was automatically updated to reflect the committed changes.