[all-commits] [llvm/llvm-project] fd893b: Fix sigaction interceptor to always correctly popu...

Matt Morehouse via All-commits all-commits at lists.llvm.org
Wed Aug 12 10:12:48 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fd893bda5576d34dd987d7cfe517a05486cd38f4
      https://github.com/llvm/llvm-project/commit/fd893bda5576d34dd987d7cfe517a05486cd38f4
  Author: Matt Morehouse <mascasa at google.com>
  Date:   2020-08-12 (Wed, 12 Aug 2020)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_signal_interceptors.inc
    A compiler-rt/test/msan/interception_sigaction_test.cpp

  Log Message:
  -----------
  Fix sigaction interceptor to always correctly populate oldact

This fixes https://bugs.llvm.org/show_bug.cgi?id=47118. Before this change, when the sigaction interceptor prevented a signal from being changed, it also prevented the oldact output parameter from being written to. This resulted in a use-of-uninitialized-variable by any program that used sigaction for the purpose of reading signals.

This change fixes this: the regular sigaction implementation is still called, but with the act parameter nullified, preventing any changes.

Patch By: IanPudney

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D85797




More information about the All-commits mailing list