RFR: 8341135: Incorrect format string after JDK-8339475 [v2]

Matthias Baesken mbaesken at openjdk.org
Tue Oct 1 13:26:37 UTC 2024


On Tue, 1 Oct 2024 13:15:51 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> This fixes a format string issue.
>> 
>> In the error report it was reported : 'The compiler should be able to catch this if JLI_ReportErrorMessageSys was declared with something like __attribute__ ((format (printf, 1, 2))).'
>> Should we maybe adjust  JLI_ReportErrorMessageSys , JLI_ReportErrorMessage  and related functions/methods  using a format string so that such errors can be found already at build time ?
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
> 
>   use blank in output

Btw. in hotspot we have ATTRIBUTE_PRINTF  (from compilerWarnings_gcc.hpp); should we use something similar too in non-hotspot C  coding?

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

PR Comment: https://git.openjdk.org/jdk/pull/21278#issuecomment-2385840267


More information about the core-libs-dev mailing list