[gnome-control-center] CI: add ASAN Address Sanitizer



commit 361e7654278b9505b0bdb8e0b34557f4a4d8fe19
Author: Claudio André <claudioandre br gmail com>
Date:   Tue Jun 19 17:04:44 2018 -0300

    CI: add ASAN Address Sanitizer
    
    AddressSanitizer (or ASan) is a programming tool that detects memory
    corruption bugs such as buffer overflows or use after free. AddressSanitizer
    is based on compiler instrumentation.
    
    The llvm.org states that Sanitizers have found thousands of bugs everywhere.
    Sanitizers running during CI can prevent bugs from taking up residence. They
    are helper tools to maintain bugs out.

 .gitlab-ci.yml         | 21 +++++++++++++++++++++
 build-aux/ci/lsan.supp | 18 ++++++++++++++++++
 2 files changed, 39 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cfa29c9b5..47599b8d9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -120,6 +120,27 @@ pages:
   only:
     - master@GNOME/gnome-control-center
 
+##
+# Stage: Test
+#
+# Runs the address sanitizer.
+##
+asan:
+  <<: *save_build_logs
+  stage: test
+  allow_failure: true
+  variables:
+    BUILD_OPTS: "-Db_sanitize=address"
+
+  script:
+    - *environment_information
+    - *build_procedure
+
+    - export LSAN_OPTIONS="suppressions=$(pwd)/build-aux/ci/lsan.supp"
+
+    - echo "== Testing =="
+    - ninja -C _build test
+
 ##
 # Stage: Delivery
 #
diff --git a/build-aux/ci/lsan.supp b/build-aux/ci/lsan.supp
new file mode 100644
index 000000000..590d676cc
--- /dev/null
+++ b/build-aux/ci/lsan.supp
@@ -0,0 +1,18 @@
+# https://bugs.freedesktop.org/show_bug.cgi?id=105466
+leak:libfontconfig.so.1
+
+# Unknown and unreported bugs
+leak:__GI___vasprintf_chk
+leak:__alloc_dir
+leak:libglib-2.0.so.0
+
+# Needing attention
+leak:<unknown module>
+leak:test_timezone_gfx
+
+########
+# __GI___vasprintf_chk /usr/src/debug/glibc-2.27.9000-432-g104502102c/debug/vasprintf_chk.c:80
+# __alloc_dir ../sysdeps/posix/opendir.c:118
+# g_malloc (/lib64/libglib-2.0.so.0+0x523c5)
+# g_realloc (/lib64/libglib-2.0.so.0+0x5247d)
+########


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]