Comments 11-16 within PR analyzer/93316 discuss an ICE in some setjmp tests seen on AIX and powerpc-darwin9. The issue turned out to be an implicit assumption that longjmp is marked "noreturn". There are two places in engine.cc where the code attempted to locate the longjmp GIMPLE_CALL by finding the final stmt within its supernode, in one place casting it via "as_a <gcall *>", in the other using it as the location_t of the "rewinding from longjmp..." event. When longjmp isn't marked noreturn, its basic block and hence supernode can have additional stmts after the longjmp; in the setjmp-3.c case this was a GIMPLE_RETURN, leading to a ICE when casting this to a GIMPLE_CALL. This patch fixes the two places in question to use the rewind_info_t::get_longjmp_call member function introduced by 342e14ff, fixing the ICE (and ensuring the correct location_t is used for events). gcc/analyzer/ChangeLog: PR analyzer/93316 * engine.cc (rewind_info_t::update_model): Get the longjmp call stmt via get_longjmp_call () rather than assuming it is the last stmt in the longjmp's supernode. (rewind_info_t::add_events_to_path): Get the location_t for the rewind_from_longjmp_event via get_longjmp_call () rather than from the supernode's get_end_location ().
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| ChangeLog | Loading commit data... | |
| analysis-plan.cc | Loading commit data... | |
| analysis-plan.h | Loading commit data... | |
| analyzer-logging.cc | Loading commit data... | |
| analyzer-logging.h | Loading commit data... | |
| analyzer-pass.cc | Loading commit data... | |
| analyzer-selftests.cc | Loading commit data... | |
| analyzer-selftests.h | Loading commit data... | |
| analyzer.cc | Loading commit data... | |
| analyzer.h | Loading commit data... | |
| analyzer.opt | Loading commit data... | |
| call-string.cc | Loading commit data... | |
| call-string.h | Loading commit data... | |
| checker-path.cc | Loading commit data... | |
| checker-path.h | Loading commit data... | |
| constraint-manager.cc | Loading commit data... | |
| constraint-manager.h | Loading commit data... | |
| diagnostic-manager.cc | Loading commit data... | |
| diagnostic-manager.h | Loading commit data... | |
| engine.cc | Loading commit data... | |
| engine.h | Loading commit data... | |
| exploded-graph.h | Loading commit data... | |
| function-set.cc | Loading commit data... | |
| function-set.h | Loading commit data... | |
| pending-diagnostic.cc | Loading commit data... | |
| pending-diagnostic.h | Loading commit data... | |
| program-point.cc | Loading commit data... | |
| program-point.h | Loading commit data... | |
| program-state.cc | Loading commit data... | |
| program-state.h | Loading commit data... | |
| region-model.cc | Loading commit data... | |
| region-model.h | Loading commit data... | |
| sm-file.cc | Loading commit data... | |
| sm-malloc.cc | Loading commit data... | |
| sm-malloc.dot | Loading commit data... | |
| sm-pattern-test.cc | Loading commit data... | |
| sm-sensitive.cc | Loading commit data... | |
| sm-signal.cc | Loading commit data... | |
| sm-taint.cc | Loading commit data... | |
| sm.cc | Loading commit data... | |
| sm.h | Loading commit data... | |
| state-purge.cc | Loading commit data... | |
| state-purge.h | Loading commit data... | |
| supergraph.cc | Loading commit data... | |
| supergraph.h | Loading commit data... |