RFR: 8303527: update for deprecated sprintf for jdk.hotspot.agent
Chris Plummer
cjplummer at openjdk.org
Thu Mar 2 19:34:47 UTC 2023
On Thu, 2 Mar 2023 19:17:40 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. The issue was addressed in [JDK-8296812](https://bugs.openjdk.org/browse/JDK-8296812) for building failure, and [JDK-8299378](https://bugs.openjdk.org/browse/JDK-8299378)/[JDK-8299635](https://bugs.openjdk.org/browse/JDK-8299635)/[JDK-8301132](https://bugs.openjdk.org/browse/JDK-8301132) for testing issues . This is a break-down update for sprintf uses in jdk.hotspot.agent module.
>
> Thanks,
> Xuelei
src/jdk.hotspot.agent/windows/native/libsaproc/sawindbg.cpp line 188:
> 186: const HRESULT hr = (v); \
> 187: if (hr != S_OK) { \
> 188: size_t errmsg_size = new char[strlen(str) + 32;
This looks broken. I doubt it even compiles. Also, this is win32 so shouldn't be needed for xcode, although it doesn't hurt to fix.
-------------
PR: https://git.openjdk.org/jdk/pull/12837
More information about the serviceability-dev
mailing list