RFR: 8299635: Hotspot update for deprecated sprintf in Xcode 14 [v5]

David Holmes dholmes at openjdk.org
Fri Jan 20 04:42:34 UTC 2023


On Wed, 18 Jan 2023 19:30:42 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

>> 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?
>
> I am not confident with it.  Maybe it is better to remove this change and consider it later.

For the record I tested this standalone and it works fine in a C++ program.

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

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


More information about the serviceability-dev mailing list