public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/25166] New: Use verify_edges in create_import_tree
@ 2019-01-01  0:00 vries at gcc dot gnu.org
  2019-01-01  0:00 ` [Bug default/25166] " vries at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2019-01-01  0:00 UTC (permalink / raw)
  To: dwz

https://sourceware.org/bugzilla/show_bug.cgi?id=25166

            Bug ID: 25166
           Summary: Use verify_edges in create_import_tree
           Product: dwz
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: default
          Assignee: nobody at sourceware dot org
          Reporter: vries at gcc dot gnu.org
                CC: dwz at sourceware dot org
  Target Milestone: ---

There's a function verify_edges, which is enabled by -DDEBUG_VERIFY_EDGES, but
is not called anywhere.

Calling verify_edges here:
...
@@ -6249,6 +6250,7 @@ create_import_tree (void)
   for (; puidx < npus + ncus; puidx++)
     ipus[puidx]->idx = puidx;
   last_pu = ipus[npus - 1];
+  verify_edges (ipus, npus, ncus);
   /* Now, for the above constructed bipartite graph, find K x,2 components
      where x >= 5 (for DWARF3 and above or ptr_size 4, for DWARF2 and
      ptr_size 8 it can be even x == 4) and add a new PU node, where all
@@ -6407,6 +6409,7 @@ create_import_tree (void)
            }
        }
     }
+  verify_edges (ipus, npus, ncus);
   /* Try to merge PUs which have the same set of referrers if
      beneficial, or if one PU has a subset of referrers of the
      other, attempt to replace all the incoming edges from the
...
doesn't give any errors in the dwz testsuite (and in the external one).

OTOH, calling verify_edges one step later:
...
@@ -6633,6 +6636,7 @@ create_import_tree (void)
       for (icu = ipu->next; icu; icu = icu->next)
        icu->seen = false;
     }
+  verify_edges (ipus, npus, ncus);
   /* Create DW_TAG_partial_unit (and containing dw_cu structures).  */
   if (fi_multifile)
     {
...
gives us:
...
$ cp hello 1; cp 1 2; ./dwz -m 3 1 2
dwz: dwz.c:6042: verify_edges_1: Assertion `e2' failed.
...

We need to figure out whether the assert needs fixing, or whether the check is
simply not valid anymore at that point.

After that we can enable this functionality using --devel-verify-edges or some
such.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-17 16:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01  0:00 [Bug default/25166] New: Use verify_edges in create_import_tree vries at gcc dot gnu.org
2019-01-01  0:00 ` [Bug default/25166] " vries at gcc dot gnu.org
2019-01-01  0:00 ` vries at gcc dot gnu.org
2019-01-01  0:00 ` vries at gcc dot gnu.org
2019-01-01  0:00 ` vries at gcc dot gnu.org

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).