On Sat, 14 Jan 2023 19:01:52 GMT, Xue-Lei Andrew Fan <xue...@openjdk.org> wrote:
>> The sprintf is deprecated in Xcode 14 because of security concerns. The >> issue was addressed in >> [JDK-8296812](https://bugs.openjdk.org/browse/JDK-8296812) for hotspot impl, >> and [JDK-8299378](https://bugs.openjdk.org/browse/JDK-8299378) for building, >> but the test case was not covered. The failure was reported in [PR >> 11793](https://github.com/openjdk/jdk/pull/11793#issuecomment-1371151565), >> while running tier1 testing. >> >> This patch is trying to find the use of sprintf in hotspot iml and test >> cases. > > Xue-Lei Andrew Fan has updated the pull request with a new target base due to > a merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains six additional > commits since the last revision: > > - Merge > - correction for ppc > - missed update for debug mode > - more in src/hotspot > - typo correction > - 8299635: More test issues for deprecated sprintf in Xcode 14 I would suggest constraining this PR to src/hotspot and test/hotspot and deal with the JDK serviceability files in a different PR (and there may be other JDK files impacted too). src/hotspot/share/utilities/globalDefinitions.hpp line 191: > 189: FORBID_C_FUNCTION(char* strerror(int), "use os::strerror"); > 190: FORBID_C_FUNCTION(char* strtok(char*, const char*), "use strtok_r"); > 191: FORBID_C_FUNCTION(int sprintf(char*, const char*, ...), "use > os::snprintf"); I have to wonder whether this actually works too. Perhaps @kbarrett can comment? ------------- PR: https://git.openjdk.org/jdk/pull/11935