You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
staticintsErrorMode; // 0: no error checking, 1: print error message, 2: throw exception. To be set via O2_DPL_RAWPARSER_ERRORMODE.
84
-
staticunsignedintsErrors; // Obviously this would need to be atomic to be fully correct, but a race condition is unlikely and would only lead to one extra log message printed.
83
+
staticintsErrorMode; // 0: no error checking, 1: print error message, 2: throw exception. To be set via O2_DPL_RAWPARSER_ERRORMODE.
84
+
staticintsCheckIncompleteHBF; // Check if HBFs are incomplete, set to 2 to throw in case sErrorMode = 2.
85
+
staticunsignedintsErrors; // Obviously this would need to be atomic to be fully correct, but a race condition is unlikely and would only lead to one extra log message printed.
85
86
};
86
87
87
88
/// @class ConcreteRawParser
@@ -231,6 +232,7 @@ class ConcreteRawParser
231
232
/// Move to next page start
232
233
boolnext()
233
234
{
235
+
int lastPacketCounter = -1;
234
236
if (mPosition == nullptr) {
235
237
mPosition = mRawBuffer;
236
238
if (mSize == 0) {
@@ -242,6 +244,9 @@ class ConcreteRawParser
242
244
mPosition = mRawBuffer + mSize;
243
245
returnfalse;
244
246
}
247
+
if (RawParserParam::sCheckIncompleteHBF) {
248
+
lastPacketCounter = header().packetCounter;
249
+
}
245
250
mPosition += offset;
246
251
}
247
252
ifconstexpr (BOUNDS_CHECKS) {
@@ -252,9 +257,32 @@ class ConcreteRawParser
252
257
if (RawParserParam::sErrors++ < 20) {
253
258
LOG(error) << "Corrupt RDH - RDH parsing ran out of raw data buffer";
0 commit comments