File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed
source/loader/layers/sanitizer Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ struct DeviceInfo {
4242 uptr ShadowOffsetEnd = 0 ;
4343
4444 // Device features
45- bool IsSupportSharedSystemUSM;
45+ bool IsSupportSharedSystemUSM = false ;
4646
4747 ur_mutex Mutex;
4848 std::queue<std::shared_ptr<AllocInfo>> Quarantine;
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ void StackTrace::print() const {
9999 uptr Offset;
100100 ParseBacktraceInfo (BI, ModuleName, Offset);
101101 if (SymbolizeCode (ModuleName, Offset, Result)) {
102- SourceInfo SrcInfo = ParseSymbolizerOutput (Result);
102+ SourceInfo SrcInfo = ParseSymbolizerOutput (std::move ( Result) );
103103 if (SrcInfo.file != " ??" ) {
104104 getContext ()->logger .always (" #{} in {} {}:{}:{}" , index,
105105 SrcInfo.function , SrcInfo.file ,
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ inline ur_result_t genericSuccessCallback(void *) { return UR_RESULT_SUCCESS; };
133133// This returns valid (non-null) handles that we can safely leak.
134134inline ur_result_t fakeContext_urContextCreate (void *pParams) {
135135 static std::atomic_int handle = 42 ;
136- auto params = *static_cast <ur_context_create_params_t *>(pParams);
136+ const auto & params = *static_cast <ur_context_create_params_t *>(pParams);
137137 // There are two casts because windows doesn't implicitly extend the 32 bit
138138 // result of atomic_int::operator++.
139139 **params.pphContext =
Original file line number Diff line number Diff line change 99
1010// We need a fake handle for the below adapter leak test.
1111inline ur_result_t fakeAdapter_urAdapterGet (void *pParams) {
12- auto params = *static_cast <ur_adapter_get_params_t *>(pParams);
12+ const auto & params = *static_cast <ur_adapter_get_params_t *>(pParams);
1313 **params.pphAdapters = reinterpret_cast <ur_adapter_handle_t >(0x1 );
1414 return UR_RESULT_SUCCESS;
1515}
Original file line number Diff line number Diff line change 1515#endif
1616
1717ur_result_t replace_urPlatformGet (void *pParams) {
18- auto params = *static_cast <ur_platform_get_params_t *>(pParams);
18+ const auto & params = *static_cast <ur_platform_get_params_t *>(pParams);
1919
2020 if (*params.ppNumPlatforms ) {
2121 **params.ppNumPlatforms = 1 ;
@@ -29,7 +29,7 @@ ur_result_t replace_urPlatformGet(void *pParams) {
2929}
3030
3131ur_result_t replace_urDeviceGetInfo (void *pParams) {
32- auto params = *static_cast <ur_device_get_info_params_t *>(pParams);
32+ const auto & params = *static_cast <ur_device_get_info_params_t *>(pParams);
3333 if (*params.ppropName == UR_DEVICE_INFO_PLATFORM) {
3434 if (*params.ppPropSizeRet ) {
3535 **params.ppPropSizeRet = sizeof (ur_platform_handle_t );
You can’t perform that action at this time.
0 commit comments