* [Bug analyzer/108400] false positive: null dereference (SoftEtherVPN)
2023-01-13 18:46 [Bug analyzer/108400] New: false positive: null dereference chipitsine at gmail dot com
@ 2023-01-26 17:23 ` dmalcolm at gcc dot gnu.org
2023-01-27 23:01 ` [Bug analyzer/108400] -Wanalyzer-null-dereference false positive on SoftEtherVPN's src/Cedar/WebUI.c dmalcolm at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2023-01-26 17:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108400
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Created attachment 54356
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54356&action=edit
Reduced reproducer
False positive
seen here with no optimization:
https://godbolt.org/z/cfqz1fYKx
with -O2:
https://godbolt.org/z/b8GeeT9cd
where the wording is slightly different at different optimization levels (but
it's still a false positive)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug analyzer/108400] -Wanalyzer-null-dereference false positive on SoftEtherVPN's src/Cedar/WebUI.c
2023-01-13 18:46 [Bug analyzer/108400] New: false positive: null dereference chipitsine at gmail dot com
2023-01-26 17:23 ` [Bug analyzer/108400] false positive: null dereference (SoftEtherVPN) dmalcolm at gcc dot gnu.org
@ 2023-01-27 23:01 ` dmalcolm at gcc dot gnu.org
2023-03-09 21:21 ` cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2023-01-27 23:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108400
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Looking at the reduced reproducer, -fanalyzer is considering the case where
wu->Contexts is initially non-NULL and thus the loop is entered, but it doesn't
know about the insides of Tick64 and thus considers that after the call to
Tick64() that wu->Contexts could have become NULL, so in the 2nd iteration
LIST_DATA(wu->Contexts, i) could be NULL.
Though there's no way a user could figure that out from what the analyzer
outputs :/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug analyzer/108400] -Wanalyzer-null-dereference false positive on SoftEtherVPN's src/Cedar/WebUI.c
2023-01-13 18:46 [Bug analyzer/108400] New: false positive: null dereference chipitsine at gmail dot com
2023-01-26 17:23 ` [Bug analyzer/108400] false positive: null dereference (SoftEtherVPN) dmalcolm at gcc dot gnu.org
2023-01-27 23:01 ` [Bug analyzer/108400] -Wanalyzer-null-dereference false positive on SoftEtherVPN's src/Cedar/WebUI.c dmalcolm at gcc dot gnu.org
@ 2023-03-09 21:21 ` cvs-commit at gcc dot gnu.org
2024-02-16 14:24 ` [Bug analyzer/108400] [12/13/14 Regression] " dmalcolm at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-09 21:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108400
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:
https://gcc.gnu.org/g:4214bdb1d77ebee04d12f66c831730ed67fedf55
commit r13-6565-g4214bdb1d77ebee04d12f66c831730ed67fedf55
Author: David Malcolm <dmalcolm@redhat.com>
Date: Thu Mar 9 16:21:02 2023 -0500
testsuite: add various -Wanalyzer-null-dereference false +ve test cases
There are various -Wanalyzer-null-dereference false +ves in bugzilla
that I've been attempting to fix. Unfortunately I haven't made much
progress, but it seems worth at least capturing the reduced
reproducers as test cases, to make it easier to spot changes in
behavior.
gcc/testsuite/ChangeLog:
PR analyzer/102671
PR analyzer/105755
PR analyzer/108251
PR analyzer/108400
* gcc.dg/analyzer/null-deref-pr102671-1.c: New test, reduced
from Emacs.
* gcc.dg/analyzer/null-deref-pr102671-2.c: Likewise.
* gcc.dg/analyzer/null-deref-pr105755.c: Likewise.
*
gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:
New test, reduced from haproxy's src/ssl_sample.c.
* gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c:
Likewise.
* gcc.dg/analyzer/null-deref-pr108400-SoftEtherVPN-WebUi.c: New
test, reduced from SoftEtherVPN's src/Cedar/WebUI.c.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug analyzer/108400] [12/13/14 Regression] -Wanalyzer-null-dereference false positive on SoftEtherVPN's src/Cedar/WebUI.c
2023-01-13 18:46 [Bug analyzer/108400] New: false positive: null dereference chipitsine at gmail dot com
` (2 preceding siblings ...)
2023-03-09 21:21 ` cvs-commit at gcc dot gnu.org
@ 2024-02-16 14:24 ` dmalcolm at gcc dot gnu.org
2024-03-04 12:59 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2024-02-16 14:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108400
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2024-02-16
Status|UNCONFIRMED |NEW
Summary|-Wanalyzer-null-dereference |[12/13/14 Regression]
|false positive on |-Wanalyzer-null-dereference
|SoftEtherVPN's |false positive on
|src/Cedar/WebUI.c |SoftEtherVPN's
| |src/Cedar/WebUI.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug analyzer/108400] [12/13/14 Regression] -Wanalyzer-null-dereference false positive on SoftEtherVPN's src/Cedar/WebUI.c
2023-01-13 18:46 [Bug analyzer/108400] New: false positive: null dereference chipitsine at gmail dot com
` (3 preceding siblings ...)
2024-02-16 14:24 ` [Bug analyzer/108400] [12/13/14 Regression] " dmalcolm at gcc dot gnu.org
@ 2024-03-04 12:59 ` rguenth at gcc dot gnu.org
2024-03-04 13:01 ` chipitsine at gmail dot com
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-03-04 12:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108400
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug analyzer/108400] [12/13/14 Regression] -Wanalyzer-null-dereference false positive on SoftEtherVPN's src/Cedar/WebUI.c
2023-01-13 18:46 [Bug analyzer/108400] New: false positive: null dereference chipitsine at gmail dot com
` (4 preceding siblings ...)
2024-03-04 12:59 ` rguenth at gcc dot gnu.org
@ 2024-03-04 13:01 ` chipitsine at gmail dot com
2024-03-04 13:02 ` chipitsine at gmail dot com
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: chipitsine at gmail dot com @ 2024-03-04 13:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108400
--- Comment #4 from Илья Шипицин <chipitsine at gmail dot com> ---
will it be fixed in 12.4 ?
пн, 4 мар. 2024 г. в 13:59, rguenth at gcc dot gnu.org <
gcc-bugzilla@gcc.gnu.org>:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108400
>
> Richard Biener <rguenth at gcc dot gnu.org> changed:
>
> What |Removed |Added
>
> ----------------------------------------------------------------------------
> Target Milestone|--- |12.4
>
> --
> You are receiving this mail because:
> You reported the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug analyzer/108400] [12/13/14 Regression] -Wanalyzer-null-dereference false positive on SoftEtherVPN's src/Cedar/WebUI.c
2023-01-13 18:46 [Bug analyzer/108400] New: false positive: null dereference chipitsine at gmail dot com
` (5 preceding siblings ...)
2024-03-04 13:01 ` chipitsine at gmail dot com
@ 2024-03-04 13:02 ` chipitsine at gmail dot com
2024-03-08 15:39 ` law at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: chipitsine at gmail dot com @ 2024-03-04 13:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108400
--- Comment #5 from Илья Шипицин <chipitsine at gmail dot com> ---
quick question, is it going to be fixed in 12.4 ?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug analyzer/108400] [12/13/14 Regression] -Wanalyzer-null-dereference false positive on SoftEtherVPN's src/Cedar/WebUI.c
2023-01-13 18:46 [Bug analyzer/108400] New: false positive: null dereference chipitsine at gmail dot com
` (6 preceding siblings ...)
2024-03-04 13:02 ` chipitsine at gmail dot com
@ 2024-03-08 15:39 ` law at gcc dot gnu.org
2024-06-20 9:11 ` [Bug analyzer/108400] [12/13/14/15 " rguenth at gcc dot gnu.org
2024-06-20 9:35 ` chipitsine at gmail dot com
9 siblings, 0 replies; 11+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-08 15:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108400
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at gcc dot gnu.org
Priority|P3 |P2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug analyzer/108400] [12/13/14/15 Regression] -Wanalyzer-null-dereference false positive on SoftEtherVPN's src/Cedar/WebUI.c
2023-01-13 18:46 [Bug analyzer/108400] New: false positive: null dereference chipitsine at gmail dot com
` (7 preceding siblings ...)
2024-03-08 15:39 ` law at gcc dot gnu.org
@ 2024-06-20 9:11 ` rguenth at gcc dot gnu.org
2024-06-20 9:35 ` chipitsine at gmail dot com
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-20 9:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108400
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.4 |12.5
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.4 is being released, retargeting bugs to GCC 12.5.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug analyzer/108400] [12/13/14/15 Regression] -Wanalyzer-null-dereference false positive on SoftEtherVPN's src/Cedar/WebUI.c
2023-01-13 18:46 [Bug analyzer/108400] New: false positive: null dereference chipitsine at gmail dot com
` (8 preceding siblings ...)
2024-06-20 9:11 ` [Bug analyzer/108400] [12/13/14/15 " rguenth at gcc dot gnu.org
@ 2024-06-20 9:35 ` chipitsine at gmail dot com
9 siblings, 0 replies; 11+ messages in thread
From: chipitsine at gmail dot com @ 2024-06-20 9:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108400
--- Comment #7 from Илья Шипицин <chipitsine at gmail dot com> ---
Thank you for fixing this bug!
On Thu, Jun 20, 2024, 11:11 rguenth at gcc dot gnu.org <
gcc-bugzilla@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108400
>
> Richard Biener <rguenth at gcc dot gnu.org> changed:
>
> What |Removed |Added
>
> ----------------------------------------------------------------------------
> Target Milestone|12.4 |12.5
>
> --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
> GCC 12.4 is being released, retargeting bugs to GCC 12.5.
>
> --
> You are receiving this mail because:
> You reported the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread