public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/109105] New: Error-prone format string building in resolve.cc
@ 2023-03-11 19:56 roland.illig at gmx dot de
2023-03-18 1:26 ` [Bug fortran/109105] " jvdelisle at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: roland.illig at gmx dot de @ 2023-03-11 19:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109105
Bug ID: 109105
Summary: Error-prone format string building in resolve.cc
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: translation
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: roland.illig at gmx dot de
Target Milestone: ---
The function resolve_operator constructs a format string and then passes it to
gfc_error. This approach is wrong, and if a translator such as me makes a typo
in the translation, GCC can crash.
Instead of jumping to bad_op, each error must be handled individually, and the
messages to be translated must be marked as having format gcc-internal-format
or gfc-internal-format, not c-format.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/109105] Error-prone format string building in resolve.cc
2023-03-11 19:56 [Bug fortran/109105] New: Error-prone format string building in resolve.cc roland.illig at gmx dot de
@ 2023-03-18 1:26 ` jvdelisle at gcc dot gnu.org
2023-10-13 20:10 ` jvdelisle at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2023-03-18 1:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109105
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu.org
--- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Can you give an example of what this one should look like?
snprintf (msg, sizeof (msg),
_("Inconsistent ranks for operator at %%L and %%L"));
goto bad_op;
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/109105] Error-prone format string building in resolve.cc
2023-03-11 19:56 [Bug fortran/109105] New: Error-prone format string building in resolve.cc roland.illig at gmx dot de
2023-03-18 1:26 ` [Bug fortran/109105] " jvdelisle at gcc dot gnu.org
@ 2023-10-13 20:10 ` jvdelisle at gcc dot gnu.org
2023-10-16 20:44 ` roland.illig at gmx dot de
2024-03-06 2:55 ` jvdelisle at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2023-10-13 20:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109105
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Ever confirmed|0 |1
Last reconfirmed| |2023-10-13
--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Roland, where do we stand on this PR?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/109105] Error-prone format string building in resolve.cc
2023-03-11 19:56 [Bug fortran/109105] New: Error-prone format string building in resolve.cc roland.illig at gmx dot de
2023-03-18 1:26 ` [Bug fortran/109105] " jvdelisle at gcc dot gnu.org
2023-10-13 20:10 ` jvdelisle at gcc dot gnu.org
@ 2023-10-16 20:44 ` roland.illig at gmx dot de
2024-03-06 2:55 ` jvdelisle at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: roland.illig at gmx dot de @ 2023-10-16 20:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109105
--- Comment #3 from Roland Illig <roland.illig at gmx dot de> ---
Nothing has changed yet.
There is no built-in validation in the translated messages that each '%%L' from
the msgid matches a '%%L' from the msgstr.
I suggest to replace the label 'bad_op' with a function named 'bad_op', so that
the format strings contain '%L' instead of the current '%%L', so that gettext
can validate the format strings in the translations.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/109105] Error-prone format string building in resolve.cc
2023-03-11 19:56 [Bug fortran/109105] New: Error-prone format string building in resolve.cc roland.illig at gmx dot de
` (2 preceding siblings ...)
2023-10-16 20:44 ` roland.illig at gmx dot de
@ 2024-03-06 2:55 ` jvdelisle at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2024-03-06 2:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109105
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Assignee|unassigned at gcc dot gnu.org |jvdelisle at gcc dot gnu.org
--- Comment #4 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
So I don't lose it.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-06 2:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-11 19:56 [Bug fortran/109105] New: Error-prone format string building in resolve.cc roland.illig at gmx dot de
2023-03-18 1:26 ` [Bug fortran/109105] " jvdelisle at gcc dot gnu.org
2023-10-13 20:10 ` jvdelisle at gcc dot gnu.org
2023-10-16 20:44 ` roland.illig at gmx dot de
2024-03-06 2:55 ` jvdelisle at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).