[compiler-rt] r280885 - [sanitizer] Fix a conflict between abort_on_error and handle_abort.

Mike Aizatsky via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 16:28:55 PDT 2016


Looks like it still is going to fail:

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/25317/steps/run%20asan%20lit%20tests%20%5Barm%2Fbullhead-userdebug%2FMTC20F%5D/logs/stdio

@@@BUILD_STEP run asan lit tests [arm/bullhead-userdebug/MTC20F]@@@
+ echo @@@BUILD_STEP run asan lit tests '[arm/bullhead-userdebug/MTC20F]@@@'
+ cd /mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/compiler_rt_build_android_arm
+ ninja check-asan
[1/1] Running the AddressSanitizer tests
-- Testing: 373 tests, 5 threads --
Testing: 0 .. 10.. 20..
FAIL: AddressSanitizer-arm-android ::
TestCases/Posix/handle_abort_on_error.cc (111 of 373)
******************** TEST 'AddressSanitizer-arm-android ::
TestCases/Posix/handle_abort_on_error.cc' FAILED ********************
Script:
--
/mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/test/asan/android_commands/android_compile.py
 /mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/llvm_build64/bin/clang
--driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer
-fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only
--target=armv7-linux-androideabi
--sysroot=/mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/../../../android-ndk/standalone-arm/sysroot
-B/mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/../../../android-ndk/standalone-arm
-lm -shared-libasan -O0
/mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/test/asan/TestCases/Posix/handle_abort_on_error.cc
-o /mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/compiler_rt_build_android_arm/test/asan/ARMAndroidConfig/TestCases/Posix/Output/handle_abort_on_error.cc.tmp
&& env ASAN_OPTIONS=handle_abort=1,abort_on_error=1 not --crash
/mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/compiler_rt_build_android_arm/test/asan/ARMAndroidConfig/TestCases/Posix/Output/handle_abort_on_error.cc.tmp
2>&1 | FileCheck
/mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/test/asan/TestCases/Posix/handle_abort_on_error.cc
--
Exit Code: 1


********************
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 1604.89s
********************
Failing Tests (1):
    AddressSanitizer-arm-android :: TestCases/Posix/handle_abort_on_error.cc

  Expected Passes    : 174
  Expected Failures  : 36
  Unsupported Tests  : 162
  Unexpected Failures: 1
FAILED: cd /mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/compiler_rt_build_android_arm/test/asan
&& /usr/bin/python2.7
/mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/llvm/utils/lit/lit.py
-j5 -sv /mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/compiler_rt_build_android_arm/test/asan/ARMAndroidConfig
ninja: build stopped: subcommand failed.
@@@STEP_FAILURE@@@
+ echo @@@STEP_FAILURE@@@
+ echo @@@BUILD_STEP run sanitizer_common tests
'[arm/bullhead-userdebug/MTC20F]@@@'






On Thu, Sep 8, 2016 at 2:04 PM Evgenii Stepanov <eugeni.stepanov at gmail.com>
wrote:

> Should be fixed by r280980
>
> On Thu, Sep 8, 2016 at 1:58 PM, Mike Aizatsky <aizatsky at google.com> wrote:
> > Yep, linux bot fails as well:
> >
> >
> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/25307/steps/check-tsan%20in%20gcc%20build/logs/stdio
> >
> >
> > On Thu, Sep 8, 2016 at 10:54 AM Evgenii Stepanov via llvm-commits
> > <llvm-commits at lists.llvm.org> wrote:
> >>
> >> I see this gotsan error on the bot, too. Looking.
> >> Filipe, I did not get any notification for the osx bots, and the
> >> current failure looks unrelated. Could you explain why this test
> >> should not pass?
> >>
> >> On Thu, Sep 8, 2016 at 6:43 AM, Filipe Cabecinhas <filcab at gmail.com>
> >> wrote:
> >> > Hi Evgeniy,
> >> >
> >> > Did you get this test passing on OS X? AFAICT, OS X will always abort
> >> > the test before ASan can print that line.
> >> > There *might* be a configuration difference, but if there is, it is
> >> > non-obvious and should be documented somewhere visible (possibly on
> >> > the test too).
> >> >
> >> > Thank you,
> >> >
> >> >   Filipe
> >> >
> >> >
> >> > On Thu, Sep 8, 2016 at 2:46 AM, Yung, Douglas via llvm-commits
> >> > <llvm-commits at lists.llvm.org> wrote:
> >> >> Hi Evgeniy,
> >> >>
> >> >> This change you made seems to be causing a problem with our internal
> >> >> build bot. I'm seeing the following errors when trying to build your
> change:
> >> >>
> >> >> [74/399] Generating gtest-all.cc.x86_64.o
> >> >> FAILED: cd
> >> >>
> /home/siadmin/jenkins/w/opensource/opensource_build/llvm/projects/compiler-rt/lib/tsan/go
> >> >> && env "CC=/usr/bin/cc " IN_TMPDIR=1 SILENT=1
> >> >>
> /home/siadmin/jenkins/w/opensource/opensource_build/llvm/projects/compiler-rt/lib/tsan/go/buildgo.sh
> >> >> /tmp/gotsan.5u5SyTl4ZX/gotsan.cc: In function 'void
> >> >> __sanitizer::Abort()':
> >> >> /tmp/gotsan.5u5SyTl4ZX/gotsan.cc:10286:12: error: 'struct sigaction'
> >> >> has no member named 'sa_sigaction'
> >> >>      sigact.sa_sigaction = (sa_sigaction_t)SIG_DFL;
> >> >>             ^
> >> >> At global scope:
> >> >> cc1plus: error: unrecognized command line option
> >> >> "-Wno-unknown-warning-option" [-Werror]
> >> >> cc1plus: error: unrecognized command line option
> >> >> "-Wno-unused-const-variable" [-Werror]
> >> >> cc1plus: all warnings being treated as errors
> >> >> ninja: build stopped: subcommand failed.
> >> >>
> >> >>
> >> >> I'm not sure though where the "unrecognized command line option"
> errors
> >> >> are coming from though. Can you look into the sigaction error that
> your
> >> >> change introduced?
> >> >>
> >> >> Douglas Yung
> >> >>
> >> >>> -----Original Message-----
> >> >>> From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On
> >> >>> Behalf Of Evgeniy Stepanov via llvm-commits
> >> >>> Sent: Wednesday, September 07, 2016 16:41
> >> >>> To: llvm-commits at lists.llvm.org
> >> >>> Subject: [compiler-rt] r280885 - [sanitizer] Fix a conflict between
> >> >>> abort_on_error and handle_abort.
> >> >>>
> >> >>> Author: eugenis
> >> >>> Date: Wed Sep  7 18:40:53 2016
> >> >>> New Revision: 280885
> >> >>>
> >> >>> URL: http://llvm.org/viewvc/llvm-project?rev=280885&view=rev
> >> >>> Log:
> >> >>> [sanitizer] Fix a conflict between abort_on_error and handle_abort.
> >> >>>
> >> >>> Reset the SIGABRT signal handler before calling abort().
> >> >>>
> >> >>> Also, change the error message when catching SIGABRT to say "ABRT"
> >> >>> instead of "SEGV".
> >> >>>
> >> >>> Added:
> >> >>>     compiler-
> >> >>> rt/trunk/test/asan/TestCases/Posix/handle_abort_on_error.cc
> >> >>> Modified:
> >> >>>     compiler-rt/trunk/lib/asan/asan_posix.cc
> >> >>>
>  compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc
> >> >>>
> >> >>> Modified: compiler-rt/trunk/lib/asan/asan_posix.cc
> >> >>> URL: http://llvm.org/viewvc/llvm-project/compiler-
> >> >>>
> >> >>>
> rt/trunk/lib/asan/asan_posix.cc?rev=280885&r1=280884&r2=280885&view=dif
> >> >>> f
> >> >>>
> >> >>>
> =======================================================================
> >> >>> =======
> >> >>> --- compiler-rt/trunk/lib/asan/asan_posix.cc (original)
> >> >>> +++ compiler-rt/trunk/lib/asan/asan_posix.cc Wed Sep  7 18:40:53
> 2016
> >> >>> @@ -88,6 +88,8 @@ void AsanOnDeadlySignal(int signo, void
> >> >>>      ReportDeadlySignal("FPE", sig);
> >> >>>    else if (signo == SIGILL)
> >> >>>      ReportDeadlySignal("ILL", sig);
> >> >>> +  else if (signo == SIGABRT)
> >> >>> +    ReportDeadlySignal("ABRT", sig);
> >> >>>    else
> >> >>>      ReportDeadlySignal("SEGV", sig);
> >> >>>  }
> >> >>>
> >> >>> Modified: compiler-
> >> >>> rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc
> >> >>> URL: http://llvm.org/viewvc/llvm-project/compiler-
> >> >>>
> >> >>>
> rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc?rev=280885&r1=
> >> >>> 280884&r2=280885&view=diff
> >> >>>
> >> >>>
> =======================================================================
> >> >>> =======
> >> >>> ---
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc
> >> >>> (original)
> >> >>> +++
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc
> >> >>> +++ Wed Sep  7 18:40:53 2016
> >> >>> @@ -44,6 +44,8 @@
> >> >>>  #define MAP_NORESERVE 0
> >> >>>  #endif
> >> >>>
> >> >>> +typedef void (*sa_sigaction_t)(int, siginfo_t *, void *);
> >> >>> +
> >> >>>  namespace __sanitizer {
> >> >>>
> >> >>>  u32 GetUid() {
> >> >>> @@ -126,6 +128,14 @@ void SleepForMillis(int millis) {  }
> >> >>>
> >> >>>  void Abort() {
> >> >>> +  // If we are handling SIGABRT, unhandle it first.
> >> >>> +  if (IsHandledDeadlySignal(SIGABRT)) {
> >> >>> +    struct sigaction sigact;
> >> >>> +    internal_memset(&sigact, 0, sizeof(sigact));
> >> >>> +    sigact.sa_sigaction = (sa_sigaction_t)SIG_DFL;
> >> >>> +    internal_sigaction(SIGABRT, &sigact, nullptr);  }
> >> >>> +
> >> >>>    abort();
> >> >>>  }
> >> >>>
> >> >>> @@ -170,7 +180,6 @@ void UnsetAlternateSignalStack() {
> >> >>>    UnmapOrDie(oldstack.ss_sp, oldstack.ss_size);  }
> >> >>>
> >> >>> -typedef void (*sa_sigaction_t)(int, siginfo_t *, void *);  static
> >> >>> void
> >> >>> MaybeInstallSigaction(int signum,
> >> >>>                                    SignalHandlerType handler) {
> >> >>>    if (!IsHandledDeadlySignal(signum))
> >> >>>
> >> >>> Added: compiler-
> >> >>> rt/trunk/test/asan/TestCases/Posix/handle_abort_on_error.cc
> >> >>> URL: http://llvm.org/viewvc/llvm-project/compiler-
> >> >>>
> >> >>>
> rt/trunk/test/asan/TestCases/Posix/handle_abort_on_error.cc?rev=280885&
> >> >>> view=auto
> >> >>>
> >> >>>
> =======================================================================
> >> >>> =======
> >> >>> --- compiler-
> >> >>> rt/trunk/test/asan/TestCases/Posix/handle_abort_on_error.cc (added)
> >> >>> +++ compiler-
> >> >>> rt/trunk/test/asan/TestCases/Posix/handle_abort_on_error.cc
> >> >>> +++ Wed Sep  7 18:40:53 2016
> >> >>> @@ -0,0 +1,9 @@
> >> >>> +// Regression test: this used to abort() in SIGABRT handler in an
> >> >>> infinite loop.
> >> >>> +// RUN: %clangxx_asan -O0 %s -o %t &&
> >> >>> +%env_asan_opts=handle_abort=1,abort_on_error=1 not --crash %run %t
> >> >>> 2>&1
> >> >>> +| FileCheck %s
> >> >>> +
> >> >>> +#include <stdlib.h>
> >> >>> +
> >> >>> +int main() {
> >> >>> +  abort();
> >> >>> +  // CHECK: ERROR: AddressSanitizer: ABRT }
> >> >>>
> >> >>>
> >> >>> _______________________________________________
> >> >>> llvm-commits mailing list
> >> >>> llvm-commits at lists.llvm.org
> >> >>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >> >> _______________________________________________
> >> >> llvm-commits mailing list
> >> >> llvm-commits at lists.llvm.org
> >> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at lists.llvm.org
> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >
> > --
> > Mike
> > Sent from phone
>
-- 
Mike
Sent from phone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160908/161174e9/attachment.html>


More information about the llvm-commits mailing list