public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/112811] New: ICE in -fanalyzer in has_null_terminator Date: Fri, 01 Dec 2023 15:12:01 +0000 [thread overview] Message-ID: <bug-112811-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112811 Bug ID: 112811 Summary: ICE in -fanalyzer in has_null_terminator Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: dmalcolm at gcc dot gnu.org Blocks: 106358 Target Milestone: --- -fanalyzer with trunk ICEs on: struct foo_laptop_debug { struct dentry *root; unsigned long size; }; struct foo_laptop { void *placeholder; struct foo_laptop_debug debug; char sdiag[64]; }; extern struct dentry *debugfs_create_dir(void); void foo_debugfs_init(struct foo_laptop *foo) { struct dentry *root; root = debugfs_create_dir(); foo->debug.root = root; foo->debug.size = __builtin_strlen(foo->sdiag); } during IPA pass: analyzer t.c: In function ‘foo_debugfs_init’: t.c:17:21: internal compiler error: in has_null_terminator, at analyzer/region-model.cc:3523 17 | foo->debug.size = __builtin_strlen(foo->sdiag); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x1495415 ana::fragment::has_null_terminator(generic_wide_int<fixed_wide_int_storage<128> >, generic_wide_int<fixed_wide_int_storage<128> >*) const ../../src/gcc/analyzer/region-model.cc:3523 0x1495322 ana::fragment::has_null_terminator(generic_wide_int<fixed_wide_int_storage<128> >, generic_wide_int<fixed_wide_int_storage<128> >*) const ../../src/gcc/analyzer/region-model.cc:3602 0x1484e6c ana::region_model::scan_for_null_terminator(ana::region const*, tree_node*, ana::svalue const**, ana::region_model_context*) const ../../src/gcc/analyzer/region-model.cc:3833 0x1485695 ana::region_model::check_for_null_terminated_string_arg(ana::call_details const&, unsigned int, bool, ana::svalue const**) const ../../src/gcc/analyzer/region-model.cc:4054 0x146703b ana::kf_strlen::impl_call_pre(ana::call_details const&) const ../../src/gcc/analyzer/kf.cc:1392 0x1481c4c ana::region_model::on_call_pre(gcall const*, ana::region_model_context*) ../../src/gcc/analyzer/region-model.cc:1651 0x1486b9a ana::region_model::on_stmt_pre(gimple const*, bool*, ana::region_model_context*) ../../src/gcc/analyzer/region-model.cc:1300 0x144ceb5 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*, bool*, \ ana::path_context*) ../../src/gcc/analyzer/engine.cc:1507 0x144f680 ana::exploded_graph::process_node(ana::exploded_node*) ../../src/gcc/analyzer/engine.cc:4123 0x145035a ana::exploded_graph::process_worklist() ../../src/gcc/analyzer/engine.cc:3512 0x1452330 ana::impl_run_checkers(ana::logger*) ../../src/gcc/analyzer/engine.cc:6206 0x14532c6 ana::run_checkers() ../../src/gcc/analyzer/engine.cc:6297 0x14445ec execute ../../src/gcc/analyzer/analyzer-pass.cc:87 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Trunk (for gcc 14): https://godbolt.org/z/Pc5heGh7e Doesn't affect gcc 13 (reduced from ICE on linux kernel: 'samsung_debugfs_init' at drivers/platform/x86/samsung-laptop.c:1292:38) Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106358 [Bug 106358] [meta-bug] tracker bug for building the Linux kernel with -fanalyzer
next reply other threads:[~2023-12-01 15:12 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-01 15:12 dmalcolm at gcc dot gnu.org [this message] 2024-01-18 17:12 ` [Bug analyzer/112811] " cvs-commit at gcc dot gnu.org 2024-01-18 17:21 ` dmalcolm at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-112811-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).