public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/110700] New: gcc -fanalyzer --analyzer-checker=taint encouters an error
@ 2023-07-17 10:14 geoffreydgr at icloud dot com
  2023-07-19 13:01 ` [Bug analyzer/110700] ICE with -fanalyzer --analyzer-checker=taint on division of tainted floating-point values dmalcolm at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: geoffreydgr at icloud dot com @ 2023-07-17 10:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110700

            Bug ID: 110700
           Summary: gcc -fanalyzer --analyzer-checker=taint encouters an
                    error
           Product: gcc
           Version: 13.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: geoffreydgr at icloud dot com
  Target Milestone: ---

when i try to use taint checher to handle the following case, i encouter an
error.


```c
 __attribute__ ((tainted_args))
double divide(double x, double y){
return x/y;
}
```
cmd:
gcc -fanalyzer --analyzer-checker=taint cwe-369.c -c

error messages:
"
// Target: x86_64-pc-linux-gnu
// Configured with: ../gcc/configure -prefix=/usr/local/gcc-13-9533
--enable-checking=release --enable-languages=c,c++ --disable-multilib
// Thread model: posix
// Supported LTO compression algorithms: zlib
// gcc version 13.1.1 20230717 (GCC)
//
// during IPA pass: analyzer
// CWE/cwe-369.c: In function 'divide':
// CWE/cwe-369.c:3:9: internal compiler error: in wide_int_to_tree_1, at
tree.cc:1755
//     3 | return x/y;
//       |        ~^~
// 0x712cea wide_int_to_tree_1
//      ../../gcc/gcc/tree.cc:1755
// 0xf4187b wide_int_to_tree(tree_node*, poly_int<1u,
generic_wide_int<wide_int_ref_storage<false, true> > > const&)
//      ../../gcc/gcc/tree.cc:1867
// 0xf4187b build_int_cst(tree_node*, poly_int<1u, long>)
//      ../../gcc/gcc/tree.cc:1507
// 0x1007587 ana::region_model_manager::get_or_create_int_cst(tree_node*,
poly_int<1u, long>)
//      ../../gcc/gcc/analyzer/region-model-manager.cc:236
// 0x1028059 check_for_tainted_divisor
//      ../../gcc/gcc/analyzer/sm-taint.cc:1355
// 0x1028059 on_stmt
//      ../../gcc/gcc/analyzer/sm-taint.cc:1015
// 0xfd5dbf ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode
const*, gimple const*, ana::program_state*, ana::uncertainty_t*,
ana::path_context*)
//      ../../gcc/gcc/analyzer/engine.cc:1490
// 0xfd86bd ana::exploded_graph::process_node(ana::exploded_node*)
//      ../../gcc/gcc/analyzer/engine.cc:4063
// 0xfd94fa ana::exploded_graph::process_worklist()
//      ../../gcc/gcc/analyzer/engine.cc:3466
// 0xfdb7e7 ana::impl_run_checkers(ana::logger*)
//      ../../gcc/gcc/analyzer/engine.cc:6125
// 0xfdc7c6 ana::run_checkers()
//      ../../gcc/gcc/analyzer/engine.cc:6213
// 0xfccf68 execute
//      ../../gcc/gcc/analyzer/analyzer-pass.cc:87
// Please submit a full bug report, with preprocessed source.
// Please include the complete backtrace with any bug report.
// See <https://gcc.gnu.org/bugs/> for instructions.

// /usr/local/gcc-13-9533/libexec/gcc/x86_64-pc-linux-gnu/13.1.1/cc1 -quiet
-imultiarch x86_64-linux-gnu CWE/cwe-369.c -quiet -dumpbase cwe-369.c
-dumpbase-ext .c -mtune=generic -march=x86-64 -fanalyzer
-fanalyzer-checker=taint -freport-bug -o - -frandom-seed=0 -fdump-noaddr

"

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-09 17:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 10:14 [Bug analyzer/110700] New: gcc -fanalyzer --analyzer-checker=taint encouters an error geoffreydgr at icloud dot com
2023-07-19 13:01 ` [Bug analyzer/110700] ICE with -fanalyzer --analyzer-checker=taint on division of tainted floating-point values dmalcolm at gcc dot gnu.org
2023-07-19 21:56 ` cvs-commit at gcc dot gnu.org
2023-07-19 22:10 ` dmalcolm at gcc dot gnu.org
2023-10-17 10:28 ` [Bug analyzer/110700] [12/13 Regression] " rguenth at gcc dot gnu.org
2024-05-09 17:11 ` cvs-commit at gcc dot gnu.org
2024-05-09 17:53 ` [Bug analyzer/110700] [12 " 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).