Skip to content

testMessageFormat out of bounds error #402

Description

@ironMann

Hi, I've seen an occasional failure of testMessageFormat test. Here's a diff to illustrate the problem:

--- a/Utilities/aliceHLTwrapper/test/testMessageFormat.cxx
+++ b/Utilities/aliceHLTwrapper/test/testMessageFormat.cxx
@@ -133,7 +133,7 @@ namespace o2::AliceHLT {
         o2::Header::hexDump("Payload block", output.mP, output.mSize);
-        o2::Header::hexDump("  Data string", dataFields[dataidx].c_str(), dataFields[dataidx].size());
+        o2::Header::hexDump("  Data string", dataFields[dataidx%2].c_str(), dataFields[dataidx%2].size());
         const char* data = (char*)output.mP;

Not sure if that is the proper fix though. ping @matthiasrichter

Additionally,
I would suggest using GCC Undefined Behavior Sanitizer (ubsan) to run series of CI unit tests. It can catch a lot of small issues that otherwise slip under the radar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions