RFR: 8296812: sprintf is deprecated in Xcode 14 [v19]

Christoph duke at openjdk.org
Tue Dec 27 14:44:06 UTC 2022


On Thu, 8 Dec 2022 19:41:16 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

>> Hi,
>> 
>> May I have this update reviewed?
>> 
>> The sprintf is deprecated in Xcode 14 because of security concerns, and the use of it causing building failure.  The build could pass if warnings are disabled for codes that use sprintf method.  For the long run, the sprintf could be replaced with snprintf.  This patch is trying to check if snprintf could be used.
>> 
>> Thanks,
>> Xuelei
>
> 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 24 additional commits since the last revision:
> 
>  - adlc update per review
>  - Merge
>  - update on review feedback
>  - comment for snprintf_checked
>  - use checked snprintf for adlc
>  - use checked snprintf
>  - no check on adlc
>  - revert use of assert
>  - extra sizeof typo
>  - more size_t updare for windows build
>  - ... and 14 more: https://git.openjdk.org/jdk/compare/3a3bbe53...49bb58fd

I just stumbled across this issue as well, make images did succeed, only the test is now failing with the same error
mac os 13.1 with XCode 14.2 on macbook M1 pro 
commit: 
11fd651ab1820770e3c65cd49589416098987a87 


ERROR: Build failed for target 'run-test-tier1' in configuration 'macosx-aarch64-server-release' (exit code 2) 

=== Output from failing command(s) repeated here ===
* For target support_test_hotspot_jtreg_native_support_libAsyncExceptionOnMonitorEnter_libAsyncExceptionOnMonitorEnter.o:

-------------

PR: https://git.openjdk.org/jdk/pull/11115



More information about the client-libs-dev mailing list