public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/14377] New: [7.5 Regression] JIT debug is broken
@ 2012-07-20 13:36 hjl.tools at gmail dot com
  2012-07-20 13:58 ` [Bug gdb/14377] " hjl.tools at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2012-07-20 13:36 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14377

             Bug #: 14377
           Summary: [7.5 Regression] JIT debug is broken
           Product: gdb
           Version: 7.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: hjl.tools@gmail.com
    Classification: Unclassified


On Linux/x86-64, v8 JIT debug is broken:

./gdb ./shell_g.x86
..
Reading symbols from /export/gnu/import/git/v8/shell_g.x64...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff7ffc700 (LWP 24786)]
.gdbinit:1: Error in sourced command file:
Dwarf Error: Could not find abbrev number 863432147 [in module <in-memory>]
(gdb)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/14377] [7.5 Regression] JIT debug is broken
  2012-07-20 13:36 [Bug gdb/14377] New: [7.5 Regression] JIT debug is broken hjl.tools at gmail dot com
@ 2012-07-20 13:58 ` hjl.tools at gmail dot com
  2012-07-20 15:30 ` hjl.tools at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2012-07-20 13:58 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14377

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan.kratochvil at redhat
                   |                            |dot com

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-07-20 13:58:21 UTC ---
It is caused by mcheck addition in:

http://sourceware.org/ml/gdb-cvs/2012-06/msg00005.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/14377] [7.5 Regression] JIT debug is broken
  2012-07-20 13:36 [Bug gdb/14377] New: [7.5 Regression] JIT debug is broken hjl.tools at gmail dot com
  2012-07-20 13:58 ` [Bug gdb/14377] " hjl.tools at gmail dot com
@ 2012-07-20 15:30 ` hjl.tools at gmail dot com
  2012-07-20 19:29 ` jan.kratochvil at redhat dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2012-07-20 15:30 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14377

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2012-07-20 15:29:34 UTC ---
Valgrind reports:

==31227== Conditional jump or move depends on uninitialised value(s)
==31227==    at 0x5C1DFF: peek_die_abbrev (dwarf2read.c:12103)
==31227==    by 0x5CC1EC: skip_children (dwarf2read.c:5019)
==31227==    by 0x5D0814: load_partial_dies (dwarf2read.c:5165)
==31227==    by 0x5D35E7: process_psymtab_comp_unit_reader (dwarf2read.c:4147)
==31227==    by 0x5CD13A: init_cutu_and_read_dies (dwarf2read.c:3954)
==31227==    by 0x5CF6C3: process_psymtab_comp_unit (dwarf2read.c:4223)
==31227==    by 0x5DC6D9: dwarf2_build_psymtabs (dwarf2read.c:4337)
==31227==    by 0x556FDD: require_partial_symbols (psymtab.c:88)
==31227==    by 0x55D5D9: syms_from_objfile (symfile.c:1001)
==31227==    by 0x55D764: symbol_file_add_with_addrs_or_offsets.constprop.16
(symfile.c:1108)
==31227==    by 0x65BE44: jit_register_code (jit.c:895)
==31227==    by 0x65CD0F: jit_event_handler (jit.c:1341)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/14377] [7.5 Regression] JIT debug is broken
  2012-07-20 13:36 [Bug gdb/14377] New: [7.5 Regression] JIT debug is broken hjl.tools at gmail dot com
  2012-07-20 13:58 ` [Bug gdb/14377] " hjl.tools at gmail dot com
  2012-07-20 15:30 ` hjl.tools at gmail dot com
@ 2012-07-20 19:29 ` jan.kratochvil at redhat dot com
  2012-07-22 17:11 ` jan.kratochvil at redhat dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-07-20 19:29 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14377

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #3 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-07-20 19:29:22 UTC ---
Could you attach the 'shell_g.x64' file?
I do not see any regressions with GDB testsuite and -lmcheck and it is not
clear to me from the Comment 2.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/14377] [7.5 Regression] JIT debug is broken
  2012-07-20 13:36 [Bug gdb/14377] New: [7.5 Regression] JIT debug is broken hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2012-07-20 19:29 ` jan.kratochvil at redhat dot com
@ 2012-07-22 17:11 ` jan.kratochvil at redhat dot com
  2012-07-30 19:55 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-07-22 17:11 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14377

--- Comment #4 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-07-22 17:11:13 UTC ---
Or rather the whole code registering the new in-memory symbol file, there will
be the bug.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/14377] [7.5 Regression] JIT debug is broken
  2012-07-20 13:36 [Bug gdb/14377] New: [7.5 Regression] JIT debug is broken hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2012-07-22 17:11 ` jan.kratochvil at redhat dot com
@ 2012-07-30 19:55 ` hjl.tools at gmail dot com
  2012-07-31  0:50 ` hjl.tools at gmail dot com
  2012-07-31  7:27 ` jan.kratochvil at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2012-07-30 19:55 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14377

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2012-07-30 19:54:42 UTC ---
Created attachment 6562
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6562
GDB chokes on it

valgrind reports:

==23313== Invalid read of size 1
==23313==    at 0x639749: read_unsigned_leb128 (dwarf2read.c:13581)
==23313==    by 0x628A6A: peek_die_abbrev (dwarf2read.c:6070)
==23313==    by 0x628AFF: skip_children (dwarf2read.c:6098)
==23313==    by 0x628FBC: locate_pdi_sibling (dwarf2read.c:6248)
==23313==    by 0x6378D3: load_partial_dies (dwarf2read.c:12593)
==23313==    by 0x625CB0: process_psymtab_comp_unit_reader (dwarf2read.c:4800)
==23313==    by 0x62559E: init_cutu_and_read_dies (dwarf2read.c:4584)
==23313==    by 0x62617B: process_psymtab_comp_unit (dwarf2read.c:4882)
==23313==    by 0x6273CF: dwarf2_build_psymtabs_hard (dwarf2read.c:5377)
==23313==    by 0x6232C6: dwarf2_build_psymtabs (dwarf2read.c:3704)
==23313==    by 0x50F4E0: read_psyms (elfread.c:1467)
==23313==    by 0x594529: require_partial_symbols (psymtab.c:88)
==23313==  Address 0xcc467f3 is 0 bytes after a block of size 211 alloc'd
==23313==    at 0x4A0884D: malloc (vg_replace_malloc.c:263)
==23313==    by 0x6F8CEA: xmalloc (common-utils.c:50)
==23313==    by 0x5EF3A8: gdb_bfd_map_section (gdb_bfd.c:485)
==23313==    by 0x61EF3E: dwarf2_read_section (dwarf2read.c:1838)
==23313==    by 0x62731A: dwarf2_build_psymtabs_hard (dwarf2read.c:5356)
==23313==    by 0x6232C6: dwarf2_build_psymtabs (dwarf2read.c:3704)
==23313==    by 0x50F4E0: read_psyms (elfread.c:1467)
==23313==    by 0x594529: require_partial_symbols (psymtab.c:88)
==23313==    by 0x59A782: syms_from_objfile (symfile.c:1002)
==23313==    by 0x59A991: symbol_file_add_with_addrs_or_offsets
(symfile.c:1105)
==23313==    by 0x59AB8F: symbol_file_add_from_bfd (symfile.c:1195)
==23313==    by 0x6F3D58: jit_bfd_try_read_symtab (jit.c:901)

(top-gdb) p *orig_pdi
$20 = {offset = {sect_off = 60}, tag = DW_TAG_subprogram, has_children = 1, 
  is_external = 0, is_declaration = 0, has_type = 0, has_specification = 0, 
  has_pc_info = 1, may_be_inlined = 0, scope_set = 0, has_byte_size = 0, 
  has_template_arguments = 0, fixup_called = 0, is_dwz = 0, spec_is_dwz = 0, 
  name = 0x31d2fcd "native runtime.js", linkage_name = 0x0, scope = 0x0, d = {
    locdesc = 0x0, offset = {sect_off = 0}}, lowpc = 28346582892064, 
  highpc = 28346582892708, sibling = 0x0, spec_offset = {sect_off = 0}, 
  die_parent = 0x0, die_child = 0x0, die_sibling = 0x0}
(top-gdb)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/14377] [7.5 Regression] JIT debug is broken
  2012-07-20 13:36 [Bug gdb/14377] New: [7.5 Regression] JIT debug is broken hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2012-07-30 19:55 ` hjl.tools at gmail dot com
@ 2012-07-31  0:50 ` hjl.tools at gmail dot com
  2012-07-31  7:27 ` jan.kratochvil at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2012-07-31  0:50 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14377

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2012-07-31 00:50:06 UTC ---
It is a v8 jit bug.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/14377] [7.5 Regression] JIT debug is broken
  2012-07-20 13:36 [Bug gdb/14377] New: [7.5 Regression] JIT debug is broken hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2012-07-31  0:50 ` hjl.tools at gmail dot com
@ 2012-07-31  7:27 ` jan.kratochvil at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-07-31  7:27 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14377

--- Comment #7 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-07-31 07:26:47 UTC ---
It is true GDB is not protected against invalid DWARF, it can read past
allocated memory.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2012-07-31  7:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-20 13:36 [Bug gdb/14377] New: [7.5 Regression] JIT debug is broken hjl.tools at gmail dot com
2012-07-20 13:58 ` [Bug gdb/14377] " hjl.tools at gmail dot com
2012-07-20 15:30 ` hjl.tools at gmail dot com
2012-07-20 19:29 ` jan.kratochvil at redhat dot com
2012-07-22 17:11 ` jan.kratochvil at redhat dot com
2012-07-30 19:55 ` hjl.tools at gmail dot com
2012-07-31  0:50 ` hjl.tools at gmail dot com
2012-07-31  7:27 ` jan.kratochvil at redhat dot com

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