Skip to content
Snippets Groups Projects

checkasm: Signal handling improvements

Merged Henrik Gramner requested to merge gramner/dav1d:checkasm_setjmp_ub into master
  1. May 13, 2024
    • Henrik Gramner's avatar
    • Henrik Gramner's avatar
      checkasm: Avoid UB in setjmp() invocations · 471549f2
      Henrik Gramner authored
      Both POSIX and the C standard places several environmental limits on
      setjmp() invocations, with essentially anything beyond comparing the
      return value with a constant as a simple branch condition being UB.
      
      We were previously performing a function call using the setjmp()
      return value as an argument, which is technically not allowed
      even though it happened to work correctly in practice.
      
      Some systems may loosen those restrictions and allow for more
      flexible usage, but we shouldn't be relying on that.
      471549f2
Loading