https://bugzilla.redhat.com/show_bug.cgi?id=2217542
Bug ID: 2217542 Summary: cppcheck-2.11-1.fc39 fails on gettext.h with returnDanglingLifetime Product: Fedora Version: rawhide Hardware: x86_64 URL: https://github.com/rhinstaller/anaconda/actions/runs/5 378586167/jobs/9758588667#step:4:2099 OS: Linux Status: NEW Component: gettext Severity: medium Assignee: petersen@redhat.com Reporter: jkonecny@redhat.com QA Contact: extras-qa@fedoraproject.org CC: dueno@redhat.com, i18n-bugs@lists.fedoraproject.org, nphilipp@redhat.com, petersen@redhat.com, suanand@redhat.com Target Milestone: --- Classification: Fedora
On Rawhide cppcheck was recently updated and now we are getting returnDanglingLifetime error from it on copied gettext.h file from /usr/share/gettext/gettext.h path.
Version of cppcheck which shows this issue: 2.11-1.fc39 Last version of cppcheck which worked well: 2.9-4.fc38
I don't know if the error is valid or not...
Reproducible: Always
Steps to Reproduce: 1. podman run --rm -it fedora:rawhide 2. dnf install -y cppcheck gettext-devel 3. cppcheck -q -v /usr/share/gettext/gettext.h Actual Results: /usr/share/gettext/gettext.h:248:16: error: Returning pointer to local variable 'msg_ctxt_id' that will be invalid when returning. [returnDanglingLifetime] return translation;
Expected Results: No error
https://bugzilla.redhat.com/show_bug.cgi?id=2217542
Jiri Konecny jkonecny@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|cppcheck-2.11-1.fc39 fails |The cppcheck-2.11-1.fc39 |on gettext.h with |fails on gettext.h with |returnDanglingLifetime |returnDanglingLifetime
https://bugzilla.redhat.com/show_bug.cgi?id=2217542
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(jkonecny@redhat.c | |om)
--- Comment #1 from Jens Petersen petersen@redhat.com --- I am wondering: is it the new version of cppcheck or the new version of gettext?
https://bugzilla.redhat.com/show_bug.cgi?id=2217542
Jiri Konecny jkonecny@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(jkonecny@redhat.c | |om) |
--- Comment #2 from Jiri Konecny jkonecny@redhat.com --- Hi seems to be cppcheck version specific. The version of gettext did not changed during the success -> failure period.
Both the failure and successful checks were testing gettext-devel x86_64 0.21.1-3.fc39
https://bugzilla.redhat.com/show_bug.cgi?id=2217542
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #3 from Jens Petersen petersen@redhat.com --- Thanks Jiri for clarifying
I see the error for gettext-0.21.1 and gettext0.22 (0.21 seems okay). The source file is "gettext-runtime/gnulib-lib/gettext.h".
I reported it to bug-gettext - depending on the response I may open a bug in savannah too.
https://bugzilla.redhat.com/show_bug.cgi?id=2217542
--- Comment #4 from Jens Petersen petersen@redhat.com --- According the reply I got from Bruno Haible:
https://lists.gnu.org/archive/html/bug-gettext/2023-07/msg00003.html
this should be a false positive.
Should it be reported to cppcheck then?
https://bugzilla.redhat.com/show_bug.cgi?id=2217542
--- Comment #5 from Jiri Konecny jkonecny@redhat.com --- Sounds reasonable to me. Maybe switching this bug to cppcheck for them to find out if this is a bug in cppcheck or not.
https://bugzilla.redhat.com/show_bug.cgi?id=2217542
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |c72578@yahoo.de, | |mtasaka@fedoraproject.org, | |sgrubb@redhat.com, | |susi.lehtola@iki.fi, | |tdawson@redhat.com Assignee|petersen@redhat.com |susi.lehtola@iki.fi Component|gettext |cppcheck
https://bugzilla.redhat.com/show_bug.cgi?id=2217542
Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|susi.lehtola@iki.fi |extras-orphan@fedoraproject | |.org
--- Comment #7 from Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org --- This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
https://bugzilla.redhat.com/show_bug.cgi?id=2217542
Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|extras-orphan@fedoraproject |gwync@protonmail.com |.org |
--- Comment #8 from Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org --- This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
https://bugzilla.redhat.com/show_bug.cgi?id=2217542
Gwyn Ciesla gwync@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |ERRATA Status|ASSIGNED |CLOSED Last Closed| |2024-09-20 15:02:26
--- Comment #9 from Gwyn Ciesla gwync@protonmail.com --- Leaving this for upstream.
i18n-bugs@lists.fedoraproject.org