Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
6481 commits behind the upstream repository.
  • Ben Gamari's avatar
    c6ec4cd1
    rts: Don't rely on EXTERN_INLINE for slop-zeroing logic · c6ec4cd1
    Ben Gamari authored and Marge Bot's avatar Marge Bot committed
    Previously we relied on calling EXTERN_INLINE functions defined in
    ClosureMacros.h from Cmm to zero slop. However, as far as I can tell,
    this is no longer safe to do in C99 as EXTERN_INLINE definitions may be emitted
    in each compilation unit.
    
    Fix this by explicitly declaring a new set of non-inline functions in
    ZeroSlop.c which can be called from Cmm and marking the ClosureMacros.h
    definitions as INLINE_HEADER.
    
    In the future we should try to eliminate EXTERN_INLINE.
    c6ec4cd1
    History
    rts: Don't rely on EXTERN_INLINE for slop-zeroing logic
    Ben Gamari authored and Marge Bot's avatar Marge Bot committed
    Previously we relied on calling EXTERN_INLINE functions defined in
    ClosureMacros.h from Cmm to zero slop. However, as far as I can tell,
    this is no longer safe to do in C99 as EXTERN_INLINE definitions may be emitted
    in each compilation unit.
    
    Fix this by explicitly declaring a new set of non-inline functions in
    ZeroSlop.c which can be called from Cmm and marking the ClosureMacros.h
    definitions as INLINE_HEADER.
    
    In the future we should try to eliminate EXTERN_INLINE.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
ZeroSlop.c 717 B