File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ SpinMutex XRayInstrMapMutex;
56
56
// Contains maps for the main executable as well as DSOs.
57
57
// std::vector<XRaySledMap> XRayInstrMaps;
58
58
XRaySledMap *XRayInstrMaps;
59
- atomic_uint32_t XRayNumObjects;
59
+ atomic_uint32_t XRayNumObjects{ 0 } ;
60
60
61
61
// Global flag to determine whether the flags have been initialized.
62
62
atomic_uint8_t XRayFlagsInitialized{0 };
Original file line number Diff line number Diff line change @@ -658,7 +658,7 @@ size_t __xray_max_function_id() XRAY_NEVER_INSTRUMENT {
658
658
659
659
size_t __xray_max_function_id_in_object (int32_t ObjId) XRAY_NEVER_INSTRUMENT {
660
660
SpinMutexLock Guard (&XRayInstrMapMutex);
661
- if (ObjId < 0 || ObjId > atomic_load (&XRayNumObjects, memory_order_acquire))
661
+ if (ObjId < 0 || ObjId >= atomic_load (&XRayNumObjects, memory_order_acquire))
662
662
return 0 ;
663
663
return XRayInstrMaps[ObjId].Functions ;
664
664
}
You can’t perform that action at this time.
0 commit comments