[Bug analyzer/107158] False postives from -Wanalyzer-malloc-leak on tin-2.6.2

2022-11-24 Thread urs at akk dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107158

--- Comment #9 from urs at akk dot org ---
After commit ce917b0422c145779b83e005afd8433c0c86fb06 this doesn't show up
anymore.

[Bug analyzer/107158] False postives from -Wanalyzer-malloc-leak on tin-2.6.2

2022-10-06 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107158

--- Comment #8 from David Malcolm  ---
I believe the above patch fixes the remaining ICEs on the attachment.  Please
let me know if you find other ways to crash it.

Keeping this open to track the memory leak false +ves.

[Bug analyzer/107158] False postives from -Wanalyzer-malloc-leak on tin-2.6.2

2022-10-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107158

--- Comment #7 from CVS Commits  ---
The master branch has been updated by David Malcolm :

https://gcc.gnu.org/g:629b4813e91aba0a8fc9b18434ec1808776a4b3d

commit r13-3138-g629b4813e91aba0a8fc9b18434ec1808776a4b3d
Author: David Malcolm 
Date:   Thu Oct 6 15:46:49 2022 -0400

analyzer: fix another ICE in PR 107158

I overreduced PR analyzer/107158 in r13-3096-gef878564140cbc, and there
was another ICE in the original reproducer, which this patch fixes.

gcc/analyzer/ChangeLog:
PR analyzer/107158
* store.cc (store::replay_call_summary_cluster): Eliminate
special-casing of RK_HEAP_ALLOCATED in favor of sharing code with
RK_DECL, avoiding an ICE due to attempting to bind a
compound_svalue into a binding_cluster when an svalue in the
summary cluster converts to a compound_svalue in the caller.

gcc/testsuite/ChangeLog:
PR analyzer/107158
* gcc.dg/analyzer/call-summaries-pr107158-2.c: New test.

Signed-off-by: David Malcolm 

[Bug analyzer/107158] False postives from -Wanalyzer-malloc-leak on tin-2.6.2

2022-10-06 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107158

--- Comment #6 from David Malcolm  ---
Thanks;  I can reproduce the ICE using the attachment.  Looks like I reduced
the reproducer too much; sorry.

[Bug analyzer/107158] False postives from -Wanalyzer-malloc-leak on tin-2.6.2

2022-10-05 Thread urs at akk dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107158

--- Comment #5 from urs at akk dot org ---
Now (git @ e99dcbb54e07b798c3353124f38336f96a826d43; same $CFLAGS and source
file)

during IPA pass: analyzer
./makecfg.c: In function ‘parse_tbl’:
./makecfg.c:150:25: internal compiler error: in bind_key, at
analyzer/store.cc:1356
  150 | store_data(buffer, s);
  | ^
0x7fec3b172d8f __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7fec3b172e3f __libc_start_main_impl
../csu/libc-start.c:392

[Bug analyzer/107158] False postives from -Wanalyzer-malloc-leak on tin-2.6.2

2022-10-05 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107158

David Malcolm  changed:

   What|Removed |Added

Summary|internal compiler error: in |False postives from
   |get_or_create_cluster, at   |-Wanalyzer-malloc-leak on
   |analyzer/store.cc:2832  |tin-2.6.2
 Blocks||99390

--- Comment #4 from David Malcolm  ---
The ICE should be fixed by the above patch.

As noted above,  although the ICE is fixed, there are two false positives from
-Wanalyzer-malloc-leak on the test case, so I'm going to reuse this bug for
tracking those; retitling accordingly, and adding to the call summarization
tracker bug.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99390
[Bug 99390] [meta-bug] tracker bug for call summaries in -fanalyzer