We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b747578 commit b619438Copy full SHA for b619438
xptifw/src/xpti_trace_framework.cpp
@@ -1252,8 +1252,14 @@ class Tracepoints {
1252
if ((Payload->flags &
1253
static_cast<uint64_t>(xpti::payload_flag_t::SourceFileAvailable))) {
1254
// Add source file information ot string table
1255
- FileId =
+
1256
+ // MStringTableRef.add returns a string_id_t which is an int32_t and can
1257
+ // be negative, but negative values are unexpected in this context.
1258
+ int32_t PFileId =
1259
MStringTableRef.add(Payload->source_file, &Payload->source_file);
1260
1261
+ assert(PFileId >= 0 && "FileId can't be negative");
1262
+ FileId = static_cast<uint64_t>(PFileId);
1263
}
1264
} else {
1265
// If the payload's function name is available, generate a fast hash as
0 commit comments