For cases when HAVE_BREAKPAD is off, supply exactly the same space in
CephContext struct.
While it should happen, jenkins seems to link binaries with different variants.
The noticeable artefacts of this misbehaviour are:
208 - unittest_bluefs (Bus error)
209 - unittest_bluefs_ex (Failed)
211 - unittest_bdev (Bus error)
Above mentioned unittests are failing because
ceph_context.h :
ceph::PluginRegistry *get_plugin_registry() {
return _plugin_registry;
}
^ _plugin_registry returned is at !!!offset off by 8 bytes!!! to the location of _plugin_registry as constructed at
ceph_context.cc :
743: _plugin_registry = new PluginRegistry(this);
This causes fatal error in
src/extblkdev/ExtBlkDevPlugin.cc :
227 auto registry = cct->get_plugin_registry();
228 std::lock_guard l(registry->lock);
Sometimes lock_guard hangs, sometimes lock_guard segfaults.
Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
ceph::logging::Log *_log;
#ifdef HAVE_BREAKPAD
std::unique_ptr<google_breakpad::ExceptionHandler> _ex_handler;
+ static_assert(sizeof(std::unique_ptr<google_breakpad::ExceptionHandler>) == sizeof(std::unique_ptr<char>));
+#else
+ // Reserve the space for the case when part of ceph is compiled with and other without HAVE_BREAKPAD
+ [[maybe_unused]] std::unique_ptr<char> _ex_handler;
#endif
/* init ceph::crypto */