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 @@ -43,7 +43,7 @@ struct DeviceInfo {
43
43
uptr ShadowOffsetEnd = 0 ;
44
44
45
45
// Device features
46
- bool IsSupportSharedSystemUSM;
46
+ bool IsSupportSharedSystemUSM = false ;
47
47
48
48
ur_mutex Mutex;
49
49
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 {
99
99
uptr Offset;
100
100
ParseBacktraceInfo (BI, ModuleName, Offset);
101
101
if (SymbolizeCode (ModuleName, Offset, Result)) {
102
- SourceInfo SrcInfo = ParseSymbolizerOutput (Result);
102
+ SourceInfo SrcInfo = ParseSymbolizerOutput (std::move ( Result) );
103
103
if (SrcInfo.file != " ??" ) {
104
104
getContext ()->logger .always (" #{} in {} {}:{}:{}" , index,
105
105
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; };
133
133
// This returns valid (non-null) handles that we can safely leak.
134
134
inline ur_result_t fakeContext_urContextCreate (void *pParams) {
135
135
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);
137
137
// There are two casts because windows doesn't implicitly extend the 32 bit
138
138
// result of atomic_int::operator++.
139
139
**params.pphContext =
Original file line number Diff line number Diff line change 9
9
10
10
// We need a fake handle for the below adapter leak test.
11
11
inline 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);
13
13
**params.pphAdapters = reinterpret_cast <ur_adapter_handle_t >(0x1 );
14
14
return UR_RESULT_SUCCESS;
15
15
}
Original file line number Diff line number Diff line change 15
15
#endif
16
16
17
17
ur_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);
19
19
20
20
if (*params.ppNumPlatforms ) {
21
21
**params.ppNumPlatforms = 1 ;
@@ -29,7 +29,7 @@ ur_result_t replace_urPlatformGet(void *pParams) {
29
29
}
30
30
31
31
ur_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);
33
33
if (*params.ppropName == UR_DEVICE_INFO_PLATFORM) {
34
34
if (*params.ppPropSizeRet ) {
35
35
**params.ppPropSizeRet = sizeof (ur_platform_handle_t );
You can’t perform that action at this time.
0 commit comments