| Summary: | ICE in validate, at analyzer/program-state.cc:512 | ||
|---|---|---|---|
| Product: | gcc | Reporter: | Arseny Solokha <asolokha> |
| Component: | analyzer | Assignee: | David Malcolm <dmalcolm> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | Keywords: | ice-on-valid-code |
| Priority: | P3 | ||
| Version: | 10.0 | ||
| Target Milestone: | 10.0 | ||
| Host: | Target: | ||
| Build: | Known to work: | ||
| Known to fail: | Last reconfirmed: | 2020-01-22 00:00:00 | |
|
Description
Arseny Solokha
2020-01-22 09:02:21 UTC
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>: https://gcc.gnu.org/g:591b59ebfcd48319452ebbd954267c9a05ba4b78 commit r10-6164-g591b59ebfcd48319452ebbd954267c9a05ba4b78 Author: David Malcolm <dmalcolm@redhat.com> Date: Wed Jan 22 09:37:18 2020 -0500 analyzer: fix ICE due to sm-state origin being purged (PR 93382) The ICE in PR analyzer/93382 is a validation error. The global variable "idx" acquires a "tainted" state from local array n1[0]. When the frame is popped, the svalue for n1[0] is purged, but the "taint" sm_state_map's entry for "idx" has a svalue_id referencing the now-purged svalue. This is caught by program_state::validate as an assertion failure. This patch fixes the issue by resetting the origin id within sm_state_map entries for the case where the origin id has been purged. gcc/analyzer/ChangeLog: PR analyzer/93382 * program-state.cc (sm_state_map::on_svalue_purge): If the entry survives, but the origin is being purged, then reset the origin to null. gcc/testsuite/ChangeLog: PR analyzer/93382 * gcc.dg/analyzer/pr93382.c: New test. Thanks for filing this. Should be fixed by the above commit. |