Skip to content

ByteStreamTests - Avoid undefined behaviour sanitizer error due to misaligned writes

Addresses undefined behaviour sanitize errors

/workspace/build/LHCB/LHCB_HEAD/DAQ/DAQUtils/Event/BankWriter.h:95:5: runtime error: store to misaligned address 0x000000d90281 for type 'short unsigned int', which requires 2 byte alignment
0x000000d90281: note: pointer points here
 00 00 00  06 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  b1 00 00 00 00
              ^ 
    #0 0x7fa3a50516ff in LHCb::BankWriter& LHCb::BankWriter::operator<< <unsigned short>(unsigned short) /workspace/build/LHCB/LHCB_HEAD/DAQ/DAQUtils/Event/BankWriter.h:95
    #1 0x7fa3a50516ff in DAQEventTests::ByteStreamTests::initialize() /workspace/build/LHCB/LHCB_HEAD/DAQ/DAQUtils/src/ByteStreamTests.cpp:50

Merge request reports

Loading