• Heiko Carstens's avatar
    s390: introduce proper type handling call_on_stack() macro · 41d71fe5
    Heiko Carstens authored
    The existing CALL_ON_STACK() macro allows for subtle bugs:
    
    - There is no type checking of the function that is being called. That
      is: missing or too many arguments do not cause any compile error or
      warning. The same is true if the return type of the called function
      changes. This can lead to quite random bugs.
    
    - Sign and zero extension of arguments is missing. Given that the s390
      C ABI requires that the caller of a function performs proper sign
      and zero extension this can also lead to subtle bugs.
    
    - If arguments to the CALL_ON_STACK() macros contain functions calls
      register corruption can happen due to register asm constructs being
      used.
    
    Therefore introduce a new call_on_stack() macro which is supposed to
    fix all these problems.
    Reviewed-by: default avatarSven Schnelle <svens@linux.ibm.com>
    Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
    41d71fe5
stacktrace.h 7.27 KB