File tree Expand file tree Collapse file tree 4 files changed +27
-11
lines changed
regression/goto-instrument/show-escape-analysis1 Expand file tree Collapse file tree 4 files changed +27
-11
lines changed Original file line number Diff line number Diff line change 1+ #include <stdlib.h>
2+
3+ void foo ()
4+ {
5+ int * leaked1 = malloc (sizeof (int ));
6+ int * leaked2 = malloc (sizeof (int ));
7+ }
8+
9+ int main ()
10+ {
11+ foo ();
12+ return 0 ;
13+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --show-escape-analysis
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ ^Aliases:.*(malloc.*leaked|leaked.*malloc)
7+ --
8+ ^Aliases:.*(leaked1.*leaked2|leaked1.*leaked2)
9+ ^warning: ignoring
10+ --
11+ leaked1 and leaked2 cannot alias
Original file line number Diff line number Diff line change @@ -305,16 +305,8 @@ bool escape_domaint::merge(
305305 locationt from,
306306 locationt to)
307307{
308- if (b.has_values .is_false ())
309- return false ; // no change
310-
311- if (has_values.is_false ())
312- {
313- *this =b;
314- return true ; // change
315- }
316-
317- bool changed=false ;
308+ bool changed=has_values.is_false ();
309+ has_values=tvt::unknown ();
318310
319311 for (const auto &cleanup : b.cleanup_map )
320312 {
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ class union_find final
169169 bool same_set (const T &a, const T &b) const
170170 {
171171 const optionalt<number_type> na = numbers.get_number (a);
172- const optionalt<number_type> nb = numbers.get_number (a );
172+ const optionalt<number_type> nb = numbers.get_number (b );
173173
174174 if (na && nb)
175175 return uuf.same_set (*na, *nb);
You can’t perform that action at this time.
0 commit comments