Skip to content

Commit 4e27097

Browse files
committed
[OpenMP] Fix the wrong format string used in __kmpc_error
This patch fixes the wrong format string used in `__kmpc_error`, which could cause segment fault at runtime. Reviewed By: jlpeyton Differential Revision: https://reviews.llvm.org/D141889
1 parent 0aa5aeb commit 4e27097

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openmp/runtime/src/kmp_csupport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4453,7 +4453,7 @@ void __kmpc_error(ident_t *loc, int severity, const char *message) {
44534453
if (loc && loc->psource) {
44544454
kmp_str_loc_t str_loc = __kmp_str_loc_init(loc->psource, false);
44554455
src_loc =
4456-
__kmp_str_format("%s:%s:%s", str_loc.file, str_loc.line, str_loc.col);
4456+
__kmp_str_format("%s:%d:%d", str_loc.file, str_loc.line, str_loc.col);
44574457
__kmp_str_loc_free(&str_loc);
44584458
} else {
44594459
src_loc = __kmp_str_format("unknown");

0 commit comments

Comments
 (0)