public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/65536] New: [5 regression] LTO line number information garbled
@ 2015-03-24  7:42 hubicka at gcc dot gnu.org
  2015-03-24 10:15 ` [Bug lto/65536] " rguenth at gcc dot gnu.org
                   ` (40 more replies)
  0 siblings, 41 replies; 42+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-24  7:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65536

            Bug ID: 65536
           Summary: [5 regression] LTO line number information garbled
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hubicka at gcc dot gnu.org

As shown in https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01151.html
warnings seems to come out wrong with large programs.  I did not manage to
reproduce it with small testcase.  Columns tends to be 0 and line numbers
(somewhat) off usually pointing to the begging of type definition instead of
the field in question but sometimes they just point in further distance.

This reproduce both on Fireofx and Chromium

The problem goes away with:

Index: lto-streamer-in.c
===================================================================
--- lto-streamer-in.c   (revision 221582)
+++ lto-streamer-in.c   (working copy)
@@ -200,7 +200,7 @@ lto_input_location (struct bitpack_d *bp
   if (column_change)
     current_col = bp_unpack_var_len_unsigned (bp);

-  if (file_change)
+  if (file_change || 1)
     {
       if (prev_file)
        linemap_add (line_table, LC_LEAVE, false, NULL, 0);

(which also quite significantly increases memory use).  The warnings seems to
be right on beggining and gets worse at end, so I suspect it is some kind of
overflow in libcpp.

The problem stays with:

Index: lto-streamer-in.c
===================================================================
--- lto-streamer-in.c   (revision 221582)
+++ lto-streamer-in.c   (working copy)
@@ -207,7 +207,7 @@ lto_input_location (struct bitpack_d *bp

       linemap_add (line_table, LC_ENTER, false, current_file, current_line);
     }
-  else if (line_change)
+  else if (line_change || 1)
     linemap_line_start (line_table, current_line, current_col);

   return linemap_position_for_column (line_table, current_col);

One obvious thing is that linemap_line_start takes argument 3 to be max column
hint, but we pass current_col that is not cool.

I see that libcpp seems to drop the column info after some threshold (that is
clearly too small for LTO) but why the line numbers are off?


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

end of thread, other threads:[~2015-03-27 19:15 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24  7:42 [Bug lto/65536] New: [5 regression] LTO line number information garbled hubicka at gcc dot gnu.org
2015-03-24 10:15 ` [Bug lto/65536] " rguenth at gcc dot gnu.org
2015-03-24 10:15 ` [Bug lto/65536] " rguenth at gcc dot gnu.org
2015-03-24 12:52 ` manu at gcc dot gnu.org
2015-03-24 13:32 ` rguenth at gcc dot gnu.org
2015-03-24 14:34 ` manu at gcc dot gnu.org
2015-03-24 14:42 ` manu at gcc dot gnu.org
2015-03-24 14:54 ` manu at gcc dot gnu.org
2015-03-24 16:22 ` jakub at gcc dot gnu.org
2015-03-24 16:44 ` manu at gcc dot gnu.org
2015-03-24 17:23 ` hubicka at ucw dot cz
2015-03-24 19:39 ` jakub at gcc dot gnu.org
2015-03-24 19:41 ` hubicka at gcc dot gnu.org
2015-03-24 19:51 ` manu at gcc dot gnu.org
2015-03-24 19:58 ` manu at gcc dot gnu.org
2015-03-24 20:22 ` manu at gcc dot gnu.org
2015-03-25  3:11 ` hubicka at gcc dot gnu.org
2015-03-25  3:22 ` manu at gcc dot gnu.org
2015-03-25  7:21 ` hubicka at ucw dot cz
2015-03-25  7:24 ` hubicka at ucw dot cz
2015-03-25  9:18 ` marxin at gcc dot gnu.org
2015-03-25  9:54 ` marxin at gcc dot gnu.org
2015-03-25 10:12 ` rguenth at gcc dot gnu.org
2015-03-25 10:45 ` rguenth at gcc dot gnu.org
2015-03-25 13:30 ` manu at gcc dot gnu.org
2015-03-25 18:13 ` hubicka at ucw dot cz
2015-03-25 21:40 ` hubicka at gcc dot gnu.org
2015-03-25 22:04 ` manu at gcc dot gnu.org
2015-03-25 23:36 ` manu at gcc dot gnu.org
2015-03-26  0:08 ` hubicka at gcc dot gnu.org
2015-03-26  0:19 ` manu at gcc dot gnu.org
2015-03-26  2:29 ` hubicka at ucw dot cz
2015-03-26  2:45 ` manu at gcc dot gnu.org
2015-03-26 17:49 ` manu at gcc dot gnu.org
2015-03-27  7:26 ` hubicka at gcc dot gnu.org
2015-03-27  8:11 ` hubicka at gcc dot gnu.org
2015-03-27  8:36 ` hubicka at gcc dot gnu.org
2015-03-27 15:47 ` manu at gcc dot gnu.org
2015-03-27 15:53 ` hubicka at ucw dot cz
2015-03-27 16:32 ` hubicka at ucw dot cz
2015-03-27 16:50 ` manu at gcc dot gnu.org
2015-03-27 19:39 ` hubicka 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).