fix crash caused by memory misalignment #2614
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this crash only occurred when build type is Release:
/DEBUG (12405): Build fingerprint: 'Android/rk3288_box/rk3288_box:5.1.1/LMY49F/realsense04081912:userdebug/test-keys'
I/DEBUG (12405): Revision: '0'
I/DEBUG (12405): ABI: 'arm'
I/DEBUG (12405): pid: 13758, tid: 13806, name: el.irsa_example >>> com.intel.irsa_example <<<
I/DEBUG (12405): signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xb7fcb119
I/DEBUG (12405): r0 b7fcb115 r1 0000000a r2 b6e43dd4 r3 b7fcb1fc
I/DEBUG (12405): r4 b806d738 r5 0000000a r6 0000000a r7 9f979ae8
I/DEBUG (12405): r8 b6e43dd4 r9 00000000 sl 9f979b8c fp a2f0a9e4
I/DEBUG (12405): ip b8008310 sp 9f979ad0 lr a2d570f9 pc a2ccc05a cpsr 600f0030
I/DEBUG (12405):
I/DEBUG (12405): backtrace:
I/DEBUG (12405): #00 pc 0029705a /data/app/com.intel.irsa_example-1/lib/arm/libirsajni.so (librealsense::md_constant_parser::get(librealsense::frame const&) const+37)
I/DEBUG (12405): #1 pc 003220f7 /data/app/com.intel.irsa_example-1/lib/arm/libirsajni.so (librealsense::timestamp_composite_matcher::update_last_arrived(librealsense::frame_holder&, librealsense::matcher*)+58)
I/DEBUG (12405): #2 pc 00320419 /data/app/com.intel.irsa_example-1/lib/arm/libirsajni.so (librealsense::composite_matcher::dispatch(librealsense::frame_holder, librealsense::syncronization_environment)+360)
I/DEBUG (12405): #3 pc 002a2dab /data/app/com.intel.irsa_example-1/lib/arm/libirsajni.so
I/DEBUG (12405): #4 pc 002a0525 /data/app/com.intel.irsa_example-1/lib/arm/libirsajni.so (librealsense::processing_block::invoke(librealsense::frame_holder)+56)
I/DEBUG (12405): #5 pc 002d8cbf /data/app/com.intel.irsa_example-1/lib/arm/libirsajni.so
I/DEBUG (12405): #6 pc 002bd70f /data/app/com.intel.irsa_example-1/lib/arm/libirsajni.so
I/DEBUG (12405): #7 pc 00294c57 /data/app/com.intel.irsa_example-1/lib/arm/libirsajni.so (std::__ndk1::function<void (dispatcher::cancellable_timer)>::operator()(dispatcher::cancellable_timer) const+26)
I/DEBUG (12405): #8 pc 00294af7 /data/app/com.intel.irsa_example-1/lib/arm/libirsajni.so (dispatcher::dispatcher(unsigned int)::{lambda()#1}::operator()() const+74)
I/DEBUG (12405): #9 pc 00294a81 /data/app/com.intel.irsa_example-1/lib/arm/libirsajni.so (ZNSt6__ndk114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN10dispatcherC1EjEUlvE_EEEEEPvSA+22)
I/DEBUG (12405): #10 pc 0001659b /system/lib/libc.so (__pthread_start(void*)+30)
I/DEBUG (12405): #11 pc 000144c3 /system/lib/libc.so (__start_thread+6)
$ arm-linux-androideabi-addr2line -aCfe out/Release/target/armeabi-v7a/build_irsajni/libirsajni.so 0029705a
0x0029705a
librealsense::md_constant_parser::try_get(librealsense::frame const&, long long&) const
/home/adev/librealsense/src/metadata-parser.h:78