You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by pa...@apache.org on 2022/08/02 15:28:20 UTC

[arrow-nanoarrow] branch main updated: attempt memcheck + suppressions (#9)

This is an automated email from the ASF dual-hosted git repository.

paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 24fed02  attempt memcheck + suppressions (#9)
24fed02 is described below

commit 24fed02cf5af327c6e9a1da71d5e581ce1cedabe
Author: Dewey Dunnington <de...@fishandwhistle.net>
AuthorDate: Tue Aug 2 12:28:15 2022 -0300

    attempt memcheck + suppressions (#9)
---
 .github/workflows/build-and-test.yaml |  2 +-
 CMakeLists.txt                        |  2 ++
 valgrind.supp                         | 23 +++++++++++++++++++++++
 3 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml
index 0cd7141..a2ad105 100644
--- a/.github/workflows/build-and-test.yaml
+++ b/.github/workflows/build-and-test.yaml
@@ -106,7 +106,7 @@ jobs:
       - name: Run tests with valgrind
         run: |
           cd build
-          valgrind --tool=memcheck --leak-check=full ctest -T test .
+          ctest -T memcheck .
 
       - name: Calculate coverage
         run: |
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9cbcf57..e4a123a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,6 +44,8 @@ if (NANOARROW_BUILD_TESTS)
     include(FetchContent)
     include(CTest)
 
+    set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_LIST_DIR}/valgrind.supp")
+
     set(CMAKE_CXX_STANDARD 11)
     set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
diff --git a/valgrind.supp b/valgrind.supp
new file mode 100644
index 0000000..206ea28
--- /dev/null
+++ b/valgrind.supp
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+{
+    <jemalloc>:Thread locals don't appear to be freed
+    Memcheck:Leak
+    ...
+    fun:_dl_allocate_tls
+}