File tree 3 files changed +6
-3
lines changed
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ ur_result_t mock_urPlatformGetInfo(void *pParams) {
36
36
if (*params.ppPropValue ) {
37
37
#if defined(_WIN32)
38
38
strncpy_s (reinterpret_cast <char *>(*params.ppPropValue ),
39
- *params.ppropSize , null_platform_name ,
39
+ *params.ppropSize , mock_platform_name ,
40
40
sizeof (mock_platform_name));
41
41
#else
42
42
strncpy (reinterpret_cast <char *>(*params.ppPropValue ),
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ function(add_fuzz_test name label)
28
28
DisableDeepBind=1)
29
29
endif ()
30
30
else ()
31
- list (APPEND ENV_VARS UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_adapter_null >\")
31
+ list (APPEND ENV_VARS UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_adapter_mock >\")
32
32
endif ()
33
33
34
34
add_test (NAME ${TEST_TARGET_NAME}
Original file line number Diff line number Diff line change @@ -134,7 +134,10 @@ inline ur_result_t genericSuccessCallback(void *) { return UR_RESULT_SUCCESS; };
134
134
inline ur_result_t fakeContext_urContextCreate (void *pParams) {
135
135
static std::atomic_int handle = 42 ;
136
136
auto params = *static_cast <ur_context_create_params_t *>(pParams);
137
- **params.pphContext = reinterpret_cast <ur_context_handle_t >(handle++);
137
+ // There are two casts because windows doesn't implicitly extend the 32 bit
138
+ // result of atomic_int::operator++.
139
+ **params.pphContext =
140
+ reinterpret_cast <ur_context_handle_t >(static_cast <uintptr_t >(handle++));
138
141
return UR_RESULT_SUCCESS;
139
142
}
140
143
You can’t perform that action at this time.
0 commit comments