Nemea framework is the heart of the Nemea system. It contains implementation of common communication interfaces, UniRec data format and useful datastructures and algorithms.
I'm working on an IoT detector using a nemea-framework. The detector works fine on the x86 architecture, but when tested on a Turris router with OpenWRT and an ARM processor, it crashes on a Bus Error when receiving a message and then retrieving message items using the ur_get () macro. Crashes only occur when compiler optimization is turned on. This line of code causes crash.
Hi,
I'm working on an IoT detector using a nemea-framework. The detector works fine on the x86 architecture, but when tested on a Turris router with OpenWRT and an ARM processor, it crashes on a Bus Error when receiving a message and then retrieving message items using the ur_get () macro. Crashes only occur when compiler optimization is turned on. This line of code causes crash.
I tried compilation using clang with a sanitizer. I got this output after sending UniRec message to detector:
You can reproduce it with following sequence of commands:
Strict aliasing issues may cause bus errors on ARM architecture, so it seems to me that the issue can be conected with the problems reported by ASan.