]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: Call ceph_abort(), not abort()
authorAdam C. Emerson <aemerson@redhat.com>
Thu, 23 Aug 2018 18:32:03 +0000 (14:32 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Mon, 27 Aug 2018 14:27:22 +0000 (10:27 -0400)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
12 files changed:
src/common/ceph_context.cc
src/common/cohort_lru.h
src/rgw/rgw_auth.cc
src/rgw/rgw_file.cc
src/rgw/rgw_lib.h
src/test/libcephfs/flock.cc
src/test/libcephfs/recordlock.cc
src/test/librgw_file_nfsns.cc
src/test/messenger/simple_dispatcher.cc
src/test/messenger/xio_dispatcher.cc
src/test/rgw/test_rgw_iam_policy.cc
src/test/system/cross_process_sem.cc

index 51d97e8199a63d4b49dcc202520546dfe73657da..861e78dc51f9ce13447ea4bb91129407220f1835 100644 (file)
@@ -397,7 +397,7 @@ void CephContext::do_command(std::string_view command, const cmdmap_t& cmdmap,
     ceph_assert(0 == "assert");
   }
   if (command == "abort" && _conf->debug_asok_assert_abort) {
-    abort();
+    ceph_abort();
   }
   if (command == "perfcounters_dump" || command == "1" ||
       command == "perf dump") {
index db28a5827796dcc1c16694b52cfd510e45b31390..5dbd112981a11ac3b62dd997f3d3ed45968bcace 100644 (file)
@@ -256,7 +256,7 @@ namespace cohort {
          lane.q.push_back(*o);
          break;
        default:
-         abort();
+         ceph_abort();
          break;
        }
        if (flags & FLAG_INITIAL)
index d861e17cf7f39c185f60a83cf705aa3e12e28bed..d9c4e64ca86c8638d8c28e52b035299ab2b889ab 100644 (file)
@@ -140,7 +140,7 @@ strategy_handle_rejected(rgw::auth::Engine::result_t&& engine_result,
 
     default:
       /* Huh, memory corruption? */
-      abort();
+      ceph_abort();
   }
 }
 
@@ -164,7 +164,7 @@ strategy_handle_denied(rgw::auth::Engine::result_t&& engine_result,
 
     default:
       /* Huh, memory corruption? */
-      abort();
+      ceph_abort();
   }
 }
 
@@ -189,7 +189,7 @@ strategy_handle_granted(rgw::auth::Engine::result_t&& engine_result,
 
     default:
       /* Huh, memory corruption? */
-      abort();
+      ceph_abort();
   }
 }
 
@@ -240,7 +240,7 @@ rgw::auth::Strategy::authenticate(const req_state* const s) const
         break;
       }
       default: {
-        abort();
+        ceph_abort();
       }
     }
 
index 12aa9da3b763b29e4de17cf4c891a851c30d4204..9a163bafbd435188e88f0333229637a8a6cbb0c2 100644 (file)
@@ -481,7 +481,7 @@ namespace rgw {
       }
       goto out;
       default:
-       abort();
+       ceph_abort();
       } /* switch */
     } /* ix */
   unlock:
index 1757ad4a7b97dce557842ba8f0b7b4b9eba1a32f..0225d79e3c8e27688ceacfe9cf273a24895e567d 100644 (file)
@@ -203,7 +203,7 @@ namespace rgw {
 
     inline RGWRados* get_store() { return store; }
 
-    virtual int execute() final { abort(); }
+    virtual int execute() final { ceph_abort(); }
     virtual int exec_start() = 0;
     virtual int exec_continue() = 0;
     virtual int exec_finish() = 0;
index 4ee4bc0c29c63b8d73f53b036e9844841530513d..a02322358c753024bf525306a2c5c01e95b32358 100644 (file)
@@ -37,6 +37,8 @@
 #include <limits.h>
 #endif
 
+#include "include/assert.h"
+
 // Startup common: create and mount ceph fs
 #define STARTUP_CEPH() do {                            \
     ASSERT_EQ(0, ceph_create(&cmount, NULL));          \
@@ -61,7 +63,7 @@ static const long waitSlowMs = 5000;
 // Get the absolute struct timespec reference from now + 'ms' milliseconds
 static const struct timespec* abstime(struct timespec &ts, long ms) {
   if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
-    abort();
+    ceph_abort();
   }
   ts.tv_nsec += ms * 1000000;
   ts.tv_sec += ts.tv_nsec / 1000000000;
index 5a18c5126d0036b13d832165ba2c1b8c6447b483..a4830e68e0631763a8f81cbb61ae2ee37f6edf88 100644 (file)
@@ -38,6 +38,8 @@
 #include <limits.h>
 #endif
 
+#include "include/assert.h"
+
 // Startup common: create and mount ceph fs
 #define STARTUP_CEPH() do {                            \
     ASSERT_EQ(0, ceph_create(&cmount, NULL));          \
@@ -62,7 +64,7 @@ static const long waitSlowMs = 5000;
 // Get the absolute struct timespec reference from now + 'ms' milliseconds
 static const struct timespec* abstime(struct timespec &ts, long ms) {
   if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
-    abort();
+    ceph_abort();
   }
   ts.tv_nsec += ms * 1000000;
   ts.tv_sec += ts.tv_nsec / 1000000000;
index c76555b72082482375672a3d689ae6f7266c74f3..2ba411ccfc5d4164b14589359253345f20e8ae87 100644 (file)
@@ -942,7 +942,7 @@ TEST(LibRGW, HIER1) {
          obj_stack.pop();
          break;
        default:
-         abort();
+         ceph_abort();
        };
       }
     }
index 5a9287d91e658c933ee1d7243094c5ae4e967766..b13958d36864bb2292fbaf13fa9c9aec05159ecd 100644 (file)
@@ -53,7 +53,7 @@ bool SimpleDispatcher::ms_dispatch(Message *m)
   }
     break;
   default:
-    abort();
+    ceph_abort();
   }
 
   if (unlikely(msgr->get_magic() & MSG_MAGIC_TRACE_CTR)) {
index b682609fb0f78089bca87e0225dfef7d9f9652f1..ccd26dafec03e5e187acec69a9085b20e114cedb 100644 (file)
@@ -47,7 +47,7 @@ bool XioDispatcher::ms_dispatch(Message *m)
   }
     break;
   default:
-    abort();
+    ceph_abort();
   }
 
   if (unlikely(m->get_magic() & MSG_MAGIC_TRACE_CTR)) {
index bd058c33fe6c38c4e676b8deb20744a3aa040567..aeddf7d1927f10b66e36bb04c239bce026c3a99d 100644 (file)
@@ -86,22 +86,22 @@ public:
 
   explicit FakeIdentity(Principal&& id) : id(std::move(id)) {}
   uint32_t get_perms_from_aclspec(const aclspec_t& aclspec) const override {
-    abort();
+    ceph_abort();
     return 0;
   };
 
   bool is_admin_of(const rgw_user& uid) const override {
-    abort();
+    ceph_abort();
     return false;
   }
 
   bool is_owner_of(const rgw_user& uid) const override {
-    abort();
+    ceph_abort();
     return false;
   }
 
   virtual uint32_t get_perm_mask() const override {
-    abort();
+    ceph_abort();
     return 0;
   }
 
index 5785a6626b0d64a2c869c49408a1d4696f79e279..8b89d47bbfdf3a86714b52b4e9f80d7cd5344d41 100644 (file)
@@ -19,6 +19,8 @@
 #include <stdlib.h>
 #include <sys/mman.h>
 
+#include "include/assert.h"
+
 /* We put our cross-process semaphore into a page of memory mapped with mmap. */
 struct cross_process_sem_data_t
 {
@@ -66,7 +68,7 @@ wait()
     int err = errno;
     if (err == -EINTR)
       continue;
-    abort();
+    ceph_abort();
   }
 }
 
@@ -75,7 +77,7 @@ post()
 {
   int ret = sem_post(&m_data->sem);
   if (ret == -1) {
-    abort();
+    ceph_abort();
   }
 }