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

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new cf00b57  ARROW-2138: [C++] abort on failed debug check
cf00b57 is described below

commit cf00b57c6197738f79e637a98c105e2c6d9465a3
Author: Antoine Pitrou <anto...@python.org>
AuthorDate: Mon Feb 12 16:09:51 2018 -0500

    ARROW-2138: [C++] abort on failed debug check
    
    Using abort() instead of exit(1) triggers debug tools such as gdb and 
therefore makes debugging easier.
    
    Author: Antoine Pitrou <anto...@python.org>
    
    Closes #1595 from pitrou/ARROW-2138-abort-on-debug-check and squashes the 
following commits:
    
    c8a7e347 [Antoine Pitrou] ARROW-2138: [C++] abort on failed debug check
---
 cpp/src/arrow/allocator-test.cc   | 4 ++--
 cpp/src/arrow/memory_pool-test.cc | 4 ++--
 cpp/src/arrow/util/logging.h      | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/cpp/src/arrow/allocator-test.cc b/cpp/src/arrow/allocator-test.cc
index 7c768be..55cc203 100644
--- a/cpp/src/arrow/allocator-test.cc
+++ b/cpp/src/arrow/allocator-test.cc
@@ -51,8 +51,8 @@ TEST(stl_allocator, FreeLargeMemory) {
   uint8_t* data = alloc.allocate(100);
 
 #ifndef NDEBUG
-  EXPECT_EXIT(alloc.deallocate(data, 120), ::testing::ExitedWithCode(1),
-              ".*Check failed: \\(bytes_allocated_\\) >= \\(size\\)");
+  EXPECT_DEATH(alloc.deallocate(data, 120),
+               ".*Check failed: \\(bytes_allocated_\\) >= \\(size\\)");
 #endif
 
   alloc.deallocate(data, 100);
diff --git a/cpp/src/arrow/memory_pool-test.cc 
b/cpp/src/arrow/memory_pool-test.cc
index 0a4785d..c5e3ef2 100644
--- a/cpp/src/arrow/memory_pool-test.cc
+++ b/cpp/src/arrow/memory_pool-test.cc
@@ -51,8 +51,8 @@ TEST(DefaultMemoryPoolDeathTest, FreeLargeMemory) {
   ASSERT_OK(pool->Allocate(100, &data));
 
 #ifndef NDEBUG
-  EXPECT_EXIT(pool->Free(data, 120), ::testing::ExitedWithCode(1),
-              ".*Check failed: \\(bytes_allocated_\\) >= \\(size\\)");
+  EXPECT_DEATH(pool->Free(data, 120),
+               ".*Check failed: \\(bytes_allocated_\\) >= \\(size\\)");
 #endif
 
   pool->Free(data, 100);
diff --git a/cpp/src/arrow/util/logging.h b/cpp/src/arrow/util/logging.h
index 39815f3..4ca4d22 100644
--- a/cpp/src/arrow/util/logging.h
+++ b/cpp/src/arrow/util/logging.h
@@ -105,7 +105,7 @@ class CerrLog {
       std::cerr << std::endl;
     }
     if (severity_ == ARROW_FATAL) {
-      std::exit(1);
+      std::abort();
     }
   }
 
@@ -134,7 +134,7 @@ class FatalLog : public CerrLog {
     if (has_logged_) {
       std::cerr << std::endl;
     }
-    std::exit(1);
+    std::abort();
   }
 };
 

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.

Reply via email to