On Thu, 12 Jan 2023 07:25:07 GMT, Xue-Lei Andrew Fan <xue...@openjdk.org> wrote:
>>> This PR does not address all the remaining sprintf:s in hotspot, and with >>> it now explicitly forbidden the build will fail: >>> >> >> This is a question to me as well. I noticed there are still some use of >> sprintf, but the building passed on MacOS and Linux. I was wondering if the >> following update really work (if the '...' parameter works for the >> forbidden?), or something else matters. >> >> >> FORBID_C_FUNCTION(int sprintf(char*, const char*, ...), "use os::snprintf"); >> >> >>> I count ~30 sprintf:s that need updating. >>> >>> I'm also curious: some of the sprintfs are C2 (src/hotspot/share/opto) - >>> are your builds including C2? If so, why are you not running into the issue >>> for those files? >> >> I'm new to hotspot. Do you know how could I enable C2? Thanks! > >> > I'm also curious: some of the sprintfs are C2 (src/hotspot/share/opto) - >> > are your builds including C2? If so, why are you not running into the >> > issue for those files? >> >> I'm new to hotspot. Do you know how could I enable C2? Thanks! > > Never mind, I got it from configuration help message (use > --with-jvm-features=compiler2). @XueleiFan Could you, please, do not integrate until more cases with the same problem are fixed? ------------- PR: https://git.openjdk.org/jdk/pull/11935