public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/106479] New: FAIL: gcc.dg/analyzer/pr104308.c (test for warnings, line 9)
@ 2022-07-29 17:23 danglin at gcc dot gnu.org
2022-12-16 19:51 ` [Bug analyzer/106479] " cvs-commit at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-07-29 17:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106479
Bug ID: 106479
Summary: FAIL: gcc.dg/analyzer/pr104308.c (test for warnings,
line 9)
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: danglin at gcc dot gnu.org
Target Milestone: ---
Host: hppa*-*-linux*
Target: hppa*-*-linux*
Build: hppa*-*-linux*
Executing on host: /home/dave/gnu/gcc/objdir/gcc/xgcc
-B/home/dave/gnu/gcc/objdi
r/gcc/ /home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/analyzer/pr104308.c
-fdia
gnostics-plain-output -fanalyzer -Wanalyzer-too-complex
-fanalyzer-call-summar
ies -S -o pr104308.s (timeout = 300)
spawn -ignore SIGHUP /home/dave/gnu/gcc/objdir/gcc/xgcc
-B/home/dave/gnu/gcc/obj
dir/gcc/ /home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/analyzer/pr104308.c
-fdiagn
ostics-plain-output -fanalyzer -Wanalyzer-too-complex -fanalyzer-call-summaries
-S -o pr104308.s
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/analyzer/pr104308.c: In function
'te
st_memcpy_from_uninit':
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/analyzer/pr104308.c:18:11: warning:
use of uninitialized value '*(unsigned char (*)[5])(&a2[0])' [CWE-457]
[-Wanalyz
er-use-of-uninitialized-value]
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/analyzer/pr104308.c:17:8: note: (1)
region created on stack here
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/analyzer/pr104308.c:18:11: note:
(2)
use of uninitialized value '*(unsigned char (*)[5])(&a2[0])' here
FAIL: gcc.dg/analyzer/pr104308.c (test for warnings, line 9)
FAIL: gcc.dg/analyzer/pr104308.c (test for warnings, line 10)
PASS: gcc.dg/analyzer/pr104308.c (test for warnings, line 17)
PASS: gcc.dg/analyzer/pr104308.c (test for warnings, line 18)
PASS: gcc.dg/analyzer/pr104308.c (test for excess errors)
dave@atlas:~/gnu/gcc/objdir/gcc$ ./xgcc -B. -v
Reading specs from ./specs
COLLECT_GCC=./xgcc
COLLECT_LTO_WRAPPER=./lto-wrapper
Target: hppa-linux-gnu
Configured with: ../gcc/configure --with-gnu-as --with-gnu-ld --enable-shared
--enable-multiarch --enable-linker-build-id --build=hppa-linux-gnu
--host=hppa-linux-gnu --target=hppa-linux-gnu
--prefix=/home/dave/opt/gnu/gcc/gcc-13 --with-local-prefix=/home/dave/opt/gnu
--enable-threads=posix --enable-__cxa_atexit --build=hppa-linux-gnu
--enable-clocale=gnu --enable-checking=release
--enable-languages=c,c++,d,objc,fortran,obj-c++,ada,lto --without-ppl
--enable-libssp --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.0 20220728 (experimental) [master r13-1220-g7c1c7e120cc] (GCC)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug analyzer/106479] FAIL: gcc.dg/analyzer/pr104308.c (test for warnings, line 9)
2022-07-29 17:23 [Bug analyzer/106479] New: FAIL: gcc.dg/analyzer/pr104308.c (test for warnings, line 9) danglin at gcc dot gnu.org
@ 2022-12-16 19:51 ` cvs-commit at gcc dot gnu.org
2022-12-16 19:56 ` dmalcolm at gcc dot gnu.org
2022-12-16 19:57 ` dmalcolm at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-16 19:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106479
--- Comment #1 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:2fdc8546b5c6cb1fe254e40b5bdd19ed6fbb44da
commit r13-4750-g2fdc8546b5c6cb1fe254e40b5bdd19ed6fbb44da
Author: David Malcolm <dmalcolm@redhat.com>
Date: Fri Dec 16 14:50:07 2022 -0500
analyzer: add src_region param to region_model::check_for_poison [PR106479]
PR analyzer/106479 notes that we don't always show the region-creation
event for a memmove from an uninitialized stack region. This occurs
when using kf_memcpy_memmove. Fix by passing a src_region hint to
region_model::check_for_poison.
gcc/analyzer/ChangeLog:
PR analyzer/106479
* kf.cc (kf_memcpy_memmove::impl_call_pre): Pass in source region
to region_model::check_for_poison.
* region-model-asm.cc (region_model::on_asm_stmt): Pass NULL
region to region_model::check_for_poison.
* region-model.cc (region_model::check_for_poison): Add
"src_region" param, and pass it to poisoned_value_diagnostic.
(region_model::on_assignment): Pass NULL region to
region_model::check_for_poison.
(region_model::get_rvalue): Likewise.
* region-model.h (region_model::check_for_poison): Add
"src_region" param.
* sm-fd.cc (fd_state_machine::on_accept): Pass in source region
to region_model::check_for_poison.
* varargs.cc (kf_va_copy::impl_call_pre): Pass NULL region to
region_model::check_for_poison.
(kf_va_arg::impl_call_pre): Pass in source region to
region_model::check_for_poison.
gcc/testsuite/ChangeLog:
PR analyzer/106479
* gcc.dg/analyzer/pr104308.c (test_memmove_within_uninit): Remove
xfail on region creation event.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug analyzer/106479] FAIL: gcc.dg/analyzer/pr104308.c (test for warnings, line 9)
2022-07-29 17:23 [Bug analyzer/106479] New: FAIL: gcc.dg/analyzer/pr104308.c (test for warnings, line 9) danglin at gcc dot gnu.org
2022-12-16 19:51 ` [Bug analyzer/106479] " cvs-commit at gcc dot gnu.org
@ 2022-12-16 19:56 ` dmalcolm at gcc dot gnu.org
2022-12-16 19:57 ` dmalcolm at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2022-12-16 19:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106479
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks; should be fixed by the above patch (lightly tested with hppa-linux-gnu
and riscv32-unknown-linux-gnu).
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug analyzer/106479] FAIL: gcc.dg/analyzer/pr104308.c (test for warnings, line 9)
2022-07-29 17:23 [Bug analyzer/106479] New: FAIL: gcc.dg/analyzer/pr104308.c (test for warnings, line 9) danglin at gcc dot gnu.org
2022-12-16 19:51 ` [Bug analyzer/106479] " cvs-commit at gcc dot gnu.org
2022-12-16 19:56 ` dmalcolm at gcc dot gnu.org
@ 2022-12-16 19:57 ` dmalcolm at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2022-12-16 19:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106479
--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #2)
> Thanks; should be fixed by the above patch (lightly tested with
> hppa-linux-gnu and riscv32-unknown-linux-gnu).
...referring to the FAIL at line 9.
I believe the FAIL at line 10 was fixed by
g:cf80a23e19db83b7cb2220371d21642aa08261e0
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-16 19:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-29 17:23 [Bug analyzer/106479] New: FAIL: gcc.dg/analyzer/pr104308.c (test for warnings, line 9) danglin at gcc dot gnu.org
2022-12-16 19:51 ` [Bug analyzer/106479] " cvs-commit at gcc dot gnu.org
2022-12-16 19:56 ` dmalcolm at gcc dot gnu.org
2022-12-16 19:57 ` dmalcolm 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).