MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / HandleNegateOverflow

Function HandleNegateOverflow

Library/OcGuardLib/Ubsan.c:374–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374static void
375HandleNegateOverflow(bool isFatal, struct COverflowData *pData, unsigned long ulOldValue)
376{
377 char szLocation[LOCATION_MAXLEN];
378 char szOldValue[NUMBER_MAXLEN];
379
380 ASSERT(pData);
381
382 if (isAlreadyReported(&pData->mLocation))
383 return;
384
385 DeserializeLocation(szLocation, LOCATION_MAXLEN, &pData->mLocation);
386 DeserializeNumber(szLocation, szOldValue, NUMBER_MAXLEN, pData->mType, ulOldValue);
387
388 Report(isFatal, "UBSan: Undefined Behavior in %s, negation of %s cannot be represented in type %s\n",
389 szLocation, szOldValue, pData->mType->mTypeName);
390}
391
392static void
393HandleBuiltinUnreachable(bool isFatal, struct CUnreachableData *pData)

Calls 4

isAlreadyReportedFunction · 0.85
DeserializeLocationFunction · 0.85
DeserializeNumberFunction · 0.85
ReportFunction · 0.70

Tested by

no test coverage detected