* [Bug analyzer/110014] -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object))
2023-05-28 18:09 [Bug analyzer/110014] New: -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object)) eggert at cs dot ucla.edu
@ 2023-06-10 12:29 ` cvs-commit at gcc dot gnu.org
2023-06-12 13:17 ` dmalcolm at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-10 12:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110014
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tim Lange <tlange@gcc.gnu.org>:
https://gcc.gnu.org/g:39adc5eebd61fd276f3f1ef9d7228756a35bd0cb
commit r14-1685-g39adc5eebd61fd276f3f1ef9d7228756a35bd0cb
Author: Tim Lange <mail@tim-lange.me>
Date: Fri Jun 9 20:08:22 2023 +0200
testsuite: Add more allocation size tests for conjured svalues [PR110014]
This patch adds the reproducers reported in PR 110014 as test cases. The
false positives in those cases are already fixed with PR 109577.
2023-06-09 Tim Lange <mail@tim-lange.me>
PR analyzer/110014
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/realloc-pr110014.c: New tests.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug analyzer/110014] -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object))
2023-05-28 18:09 [Bug analyzer/110014] New: -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object)) eggert at cs dot ucla.edu
2023-06-10 12:29 ` [Bug analyzer/110014] " cvs-commit at gcc dot gnu.org
@ 2023-06-12 13:17 ` dmalcolm at gcc dot gnu.org
2024-01-28 8:03 ` nightstrike at gmail dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2023-06-12 13:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110014
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for fixing this Tim.
Keeping open to track backporting this to the gcc 13 branch.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug analyzer/110014] -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object))
2023-05-28 18:09 [Bug analyzer/110014] New: -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object)) eggert at cs dot ucla.edu
2023-06-10 12:29 ` [Bug analyzer/110014] " cvs-commit at gcc dot gnu.org
2023-06-12 13:17 ` dmalcolm at gcc dot gnu.org
@ 2024-01-28 8:03 ` nightstrike at gmail dot com
2024-02-15 19:57 ` [Bug analyzer/110014] [13 Regression] " dmalcolm at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: nightstrike at gmail dot com @ 2024-01-28 8:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110014
nightstrike <nightstrike at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nightstrike at gmail dot com
--- Comment #3 from nightstrike <nightstrike at gmail dot com> ---
(In reply to David Malcolm from comment #2)
> Thanks for fixing this Tim.
>
> Keeping open to track backporting this to the gcc 13 branch.
Before this gets backported, the testcase should be fixed. It uses an
incorrect declaration of realloc, assuming that size_t is long. The standard
defines realloc as size_t, so the declaration should use __SIZE_TYPE__ instead.
This works, although you could also just include stdlib.h or use
__builtin_realloc.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug analyzer/110014] [13 Regression] -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object))
2023-05-28 18:09 [Bug analyzer/110014] New: -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object)) eggert at cs dot ucla.edu
` (2 preceding siblings ...)
2024-01-28 8:03 ` nightstrike at gmail dot com
@ 2024-02-15 19:57 ` dmalcolm at gcc dot gnu.org
2024-04-14 5:06 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2024-02-15 19:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110014
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-02-15
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug analyzer/110014] [13 Regression] -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object))
2023-05-28 18:09 [Bug analyzer/110014] New: -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object)) eggert at cs dot ucla.edu
` (3 preceding siblings ...)
2024-02-15 19:57 ` [Bug analyzer/110014] [13 Regression] " dmalcolm at gcc dot gnu.org
@ 2024-04-14 5:06 ` pinskia at gcc dot gnu.org
2024-05-09 17:11 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-14 5:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110014
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.3
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug analyzer/110014] [13 Regression] -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object))
2023-05-28 18:09 [Bug analyzer/110014] New: -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object)) eggert at cs dot ucla.edu
` (4 preceding siblings ...)
2024-04-14 5:06 ` pinskia at gcc dot gnu.org
@ 2024-05-09 17:11 ` cvs-commit at gcc dot gnu.org
2024-05-09 17:53 ` [Bug analyzer/110014] " dmalcolm at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-09 17:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110014
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by David Malcolm
<dmalcolm@gcc.gnu.org>:
https://gcc.gnu.org/g:e0c52905f666e3d23881f82dbf39466a24f009f4
commit r13-8743-ge0c52905f666e3d23881f82dbf39466a24f009f4
Author: Tim Lange <mail@tim-lange.me>
Date: Thu May 9 13:09:26 2024 -0400
testsuite: Add more allocation size tests for conjured svalues [PR110014]
This patch adds the reproducers reported in PR 110014 as test cases. The
false positives in those cases are already fixed with PR 109577.
2023-06-09 Tim Lange <mail@tim-lange.me>
PR analyzer/110014
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/realloc-pr110014.c: New tests.
(cherry picked from commit
r14-1685-g39adc5eebd61fd276f3f1ef9d7228756a35bd0cb)
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug analyzer/110014] -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object))
2023-05-28 18:09 [Bug analyzer/110014] New: -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object)) eggert at cs dot ucla.edu
` (5 preceding siblings ...)
2024-05-09 17:11 ` cvs-commit at gcc dot gnu.org
@ 2024-05-09 17:53 ` dmalcolm at gcc dot gnu.org
2024-05-11 16:35 ` nightstrike at gmail dot com
2024-05-11 17:50 ` segher at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2024-05-09 17:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110014
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Summary|[13 Regression] |-Wanalyzer-allocation-size
|-Wanalyzer-allocation-size |mishandles realloc (...,
|mishandles realloc (..., |.... * sizeof (object))
|.... * sizeof (object)) |
--- Comment #5 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed for GCC 13 (for the upcoming GCC 13.3) by the above patch.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug analyzer/110014] -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object))
2023-05-28 18:09 [Bug analyzer/110014] New: -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object)) eggert at cs dot ucla.edu
` (6 preceding siblings ...)
2024-05-09 17:53 ` [Bug analyzer/110014] " dmalcolm at gcc dot gnu.org
@ 2024-05-11 16:35 ` nightstrike at gmail dot com
2024-05-11 17:50 ` segher at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: nightstrike at gmail dot com @ 2024-05-11 16:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110014
--- Comment #6 from nightstrike <nightstrike at gmail dot com> ---
(In reply to David Malcolm from comment #5)
> Should be fixed for GCC 13 (for the upcoming GCC 13.3) by the above patch.
Did you miss my comment #3 that highlighted the problem due to assuming that
size_t == long?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug analyzer/110014] -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object))
2023-05-28 18:09 [Bug analyzer/110014] New: -Wanalyzer-allocation-size mishandles realloc (..., .... * sizeof (object)) eggert at cs dot ucla.edu
` (7 preceding siblings ...)
2024-05-11 16:35 ` nightstrike at gmail dot com
@ 2024-05-11 17:50 ` segher at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: segher at gcc dot gnu.org @ 2024-05-11 17:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110014
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |---
Status|RESOLVED |REOPENED
CC| |segher at gcc dot gnu.org
--- Comment #7 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Reopened, then.
^ permalink raw reply [flat|nested] 10+ messages in thread