rts: Refactor foreign export tracking
This avoids calling `libc` in the initializers which are responsible for registering foreign exports. We believe this should avoid the corruption observed in #18548. See Note [Tracking foreign exports] in rts/ForeignExports.c for an overview of the new scheme. (cherry picked from commit c4921349)
Showing
- compiler/deSugar/DsForeign.hs 21 additions, 10 deletionscompiler/deSugar/DsForeign.hs
- includes/Rts.h 3 additions, 0 deletionsincludes/Rts.h
- includes/rts/ForeignExports.h 36 additions, 0 deletionsincludes/rts/ForeignExports.h
- rts/ForeignExports.c 113 additions, 0 deletionsrts/ForeignExports.c
- rts/ForeignExports.h 21 additions, 0 deletionsrts/ForeignExports.h
- rts/Linker.c 4 additions, 33 deletionsrts/Linker.c
- rts/RtsStartup.c 8 additions, 1 deletionrts/RtsStartup.c
- rts/RtsSymbols.c 1 addition, 1 deletionrts/RtsSymbols.c
- rts/rts.cabal.in 2 additions, 0 deletionsrts/rts.cabal.in
Loading
Please register or sign in to comment