Skip to content

Commit f61144b

Browse files
committed
Increase PI version buffers for future-proofing
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
1 parent 7e00bf8 commit f61144b

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

sycl/include/CL/sycl/detail/pi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,9 +1823,9 @@ struct _pi_plugin {
18231823
// Some choices are:
18241824
// - Use of integers to keep major and minor version.
18251825
// - Keeping char* Versions.
1826-
char PiVersion[5];
1826+
char PiVersion[10];
18271827
// Plugin edits this.
1828-
char PluginVersion[5];
1828+
char PluginVersion[10];
18291829
char *Targets;
18301830
struct FunctionPointers {
18311831
#define _PI_API(api) decltype(::api) *api;

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4980,7 +4980,7 @@ pi_result piPluginInit(pi_plugin *PluginInit) {
49804980
}
49814981

49824982
// PI interface supports higher version or the same version.
4983-
strncpy(PluginInit->PluginVersion, SupportedVersion, 5);
4983+
strncpy(PluginInit->PluginVersion, SupportedVersion, 10);
49844984

49854985
// Set whole function table to zero to make it easier to detect if
49864986
// functions are not set up below.

sycl/plugins/hip/pi_hip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4885,7 +4885,7 @@ pi_result piPluginInit(pi_plugin *PluginInit) {
48854885
}
48864886

48874887
// PI interface supports higher version or the same version.
4888-
strncpy(PluginInit->PluginVersion, SupportedVersion, 5);
4888+
strncpy(PluginInit->PluginVersion, SupportedVersion, 10);
48894889

48904890
// Set whole function table to zero to make it easier to detect if
48914891
// functions are not set up below.

sycl/plugins/opencl/pi_opencl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ pi_result piPluginInit(pi_plugin *PluginInit) {
14421442
}
14431443

14441444
// PI interface supports higher version or the same version.
1445-
strncpy(PluginInit->PluginVersion, SupportedVersion, 5);
1445+
strncpy(PluginInit->PluginVersion, SupportedVersion, 10);
14461446

14471447
#define _PI_CL(pi_api, ocl_api) \
14481448
(PluginInit->PiFunctionTable).pi_api = (decltype(&::pi_api))(&ocl_api);

0 commit comments

Comments
 (0)