ghc/ghc-7.6.3-rts-Adjustor-32bit-segfault.patch
Jens Petersen 79d69f534e fix segfault on i686 when using ffi double-mapping for selinux (#907515)
- originally noticed with gtk2hs
- see http://hackage.haskell.org/trac/ghc/ticket/7629
- thanks Garrett Mitchener for patch committed upstream
2014-01-29 11:26:21 +09:00

12 lines
564 B
Diff

Index: rts/Adjustor.c
===================================================================
--- rts/Adjustor.c (revision c2870706b29c24ac86ae2a9e2359dd1e4af71ac8)
+++ rts/Adjustor.c (revision 27cf625ab871f34434d9fe86cecf85a31f73f0e5)
@@ -390,5 +390,5 @@
adjustorStub->call[0] = 0xe8;
- *(long*)&adjustorStub->call[1] = ((char*)&adjustorCode) - ((char*)adjustorStub + 5);
+ *(long*)&adjustorStub->call[1] = ((char*)&adjustorCode) - ((char*)code + 5);
adjustorStub->hptr = hptr;
adjustorStub->wptr = wptr;