-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
11
-
None
-
generic
-
os_x
Build failed on the recent macos-13 GHA platform (XCode 14, clang 14) since `sprintf` is deprecated in this platform and has to be replaced in the codebase (see [1]).
This is a JDK11U specific issue, since jdk.pack was removed in later OpenJDK versions.
[1]
```
src/jdk.pack/share/native/common-unpack/unpack.cpp: sprintf(message, "@" ERROR_FORMAT ": magic/ver = "
src/jdk.pack/share/native/common-unpack/unpack.cpp: sprintf((char*)buf.ptr, "0x%08x", value.i);
src/jdk.pack/share/native/common-unpack/unpack.cpp: sprintf((char*)buf.ptr, "0x" LONG_LONG_HEX_FORMAT, value.l);
src/jdk.pack/share/native/common-unpack/unpack.cpp: if (message[0] == '@') { // secret convention for sprintf
src/jdk.pack/share/native/common-unpack/unpack.h: const char* saveIntStr(int num) { char buf[30]; sprintf(buf, "%d", num); return saveStr(buf); }
src/jdk.pack/share/native/common-unpack/utils.cpp: sprintf(message, "@assert failed: %s\n", p);
src/jdk.pack/share/native/common-unpack/utils.cpp: sprintf(fname, "mtr%d.txt", getpid());
src/jdk.pack/share/native/common-unpack/bands.cpp: sprintf(bp, "#%d/%d", bn, le_kind); bp += strlen(bp);
src/jdk.pack/share/native/common-unpack/bands.cpp: if (le_bci != 0) { sprintf(bp, "/bci%d", le_bci); bp += strlen(bp); }
src/jdk.pack/share/native/common-unpack/bands.cpp: if (le_back != 0) { sprintf(bp, "/back%d", le_back); bp += strlen(bp); }
src/jdk.pack/share/native/common-unpack/bands.cpp: if (le_len != 0) { sprintf(bp, "/len%d", le_len); bp += strlen(bp); }
src/jdk.pack/share/native/common-unpack/coding.cpp: sprintf(maxS, "%d", max);
src/jdk.pack/share/native/common-unpack/coding.cpp: sprintf(minS, "%d", min);
src/jdk.pack/share/native/common-unpack/coding.cpp: sprintf((char*)buf.ptr, "(%d,%d,%d,%d) L=%d r=[%s,%s]",
```
This is a JDK11U specific issue, since jdk.pack was removed in later OpenJDK versions.
[1]
```
src/jdk.pack/share/native/common-unpack/unpack.cpp: sprintf(message, "@" ERROR_FORMAT ": magic/ver = "
src/jdk.pack/share/native/common-unpack/unpack.cpp: sprintf((char*)buf.ptr, "0x%08x", value.i);
src/jdk.pack/share/native/common-unpack/unpack.cpp: sprintf((char*)buf.ptr, "0x" LONG_LONG_HEX_FORMAT, value.l);
src/jdk.pack/share/native/common-unpack/unpack.cpp: if (message[0] == '@') { // secret convention for sprintf
src/jdk.pack/share/native/common-unpack/unpack.h: const char* saveIntStr(int num) { char buf[30]; sprintf(buf, "%d", num); return saveStr(buf); }
src/jdk.pack/share/native/common-unpack/utils.cpp: sprintf(message, "@assert failed: %s\n", p);
src/jdk.pack/share/native/common-unpack/utils.cpp: sprintf(fname, "mtr%d.txt", getpid());
src/jdk.pack/share/native/common-unpack/bands.cpp: sprintf(bp, "#%d/%d", bn, le_kind); bp += strlen(bp);
src/jdk.pack/share/native/common-unpack/bands.cpp: if (le_bci != 0) { sprintf(bp, "/bci%d", le_bci); bp += strlen(bp); }
src/jdk.pack/share/native/common-unpack/bands.cpp: if (le_back != 0) { sprintf(bp, "/back%d", le_back); bp += strlen(bp); }
src/jdk.pack/share/native/common-unpack/bands.cpp: if (le_len != 0) { sprintf(bp, "/len%d", le_len); bp += strlen(bp); }
src/jdk.pack/share/native/common-unpack/coding.cpp: sprintf(maxS, "%d", max);
src/jdk.pack/share/native/common-unpack/coding.cpp: sprintf(minS, "%d", min);
src/jdk.pack/share/native/common-unpack/coding.cpp: sprintf((char*)buf.ptr, "(%d,%d,%d,%d) L=%d r=[%s,%s]",
```
- relates to
-
JDK-8296812 sprintf is deprecated in Xcode 14
- Resolved
- links to
-
Review(pr/2844) openjdk/jdk11u-dev/2853