From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Tom Tromey <tromey@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [patch] Fix a reread_symbols regression by mmap [Re: [patch] Use mmap instead of obstack_alloc for dwarf debug sections.]
Date: Tue, 23 Jun 2009 17:35:00 -0000 [thread overview]
Message-ID: <8ac60eac0906231035o389086e3g7d36060d52697f0c@mail.gmail.com> (raw)
In-Reply-To: <20090623150322.GA7654@host0.dyn.jankratochvil.net>
[-- Attachment #1: Type: text/plain, Size: 419 bytes --]
On Tue, Jun 23, 2009 at 8:03 AM, Jan
Kratochvil<jan.kratochvil@redhat.com> wrote:
> while sure your patch is great it has a regression. Assuming a regression
> reproducer needs to link GDB with -lmcheck (but did verify it).
The problem also shows up under Valgrind (log attached).
> This patch will fix back (tested on {x86_64,i686}-fedora-linux-gnu):
Looks good to me.
Thanks,
--
Paul Pluzhnikov
[-- Attachment #2: gdb-valgrind.txt --]
[-- Type: text/plain, Size: 3567 bytes --]
(gdb) shell touch /usr/local/google/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/testsuite/gdb.base/reread^M
(gdb) run ^M
The program being debugged has been started already.^M
Start it from the beginning? (y or n) y^M
`/usr/local/google/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/testsuite/gdb.base/reread' has changed; re-reading symbols.^M
==8569== Invalid read of size 4^M
==8569== at 0x52E264: munmap_section_buffer /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/dwarf2read.c:10937^M
==8569== by 0x52E2DB: dwarf2_per_objfile_cleanup /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/dwarf2read.c:10957^M
==8569== by 0x448209: clear_objfile_data /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/objfiles.c:875^M
==8569== by 0x4E4152: reread_symbols /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/symfile.c:2374^M
==8569== by 0x4EF305: run_command_1 /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/infcmd.c:490^M
==8569== by 0x44D433: execute_command /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/top.c:442^M
==8569== by 0x5042F8: command_handler /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/event-top.c:511^M
==8569== by 0x504E4B: command_line_handler /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/event-top.c:735^M
==8569== by 0x5B53D2: rl_callback_read_char /usr/local/google/ppluzhnikov/Archive/sourceware.org/gdb/build/readline/../../src/readline/callback.c:205^M
==8569== by 0x504428: rl_callback_read_char_wrapper /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/event-top.c:178^M
==8569== by 0x502F20: process_event /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/event-loop.c:394^M
==8569== by 0x503D97: gdb_do_one_event /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/event-loop.c:447^M
==8569== Address 0x5b78aa0 is 3,480 bytes inside a block of size 4,072 free'd^M
==8569== at 0x4C1DE0F: free /tmp/vg/coregrind/m_replacemalloc/vg_replace_malloc.c:322^M
==8569== by 0x576D0E7: obstack_free /usr/grte/v1/debug-src/src/glibc-2.3.6/malloc/obstack.c:347^M
==8569== by 0x4E40CD: reread_symbols /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/symfile.c:2360^M
==8569== by 0x4EF305: run_command_1 /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/infcmd.c:490^M
==8569== by 0x44D433: execute_command /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/top.c:442^M
==8569== by 0x5042F8: command_handler /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/event-top.c:511^M
==8569== by 0x504E4B: command_line_handler /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/event-top.c:735^M
==8569== by 0x5B53D2: rl_callback_read_char /usr/local/google/ppluzhnikov/Archive/sourceware.org/gdb/build/readline/../../src/readline/callback.c:205^M
==8569== by 0x504428: rl_callback_read_char_wrapper /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/event-top.c:178^M
==8569== by 0x502F20: process_event /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/event-loop.c:394^M
==8569== by 0x503D97: gdb_do_one_event /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/event-loop.c:447^M
==8569== by 0x4FE6AA: catch_errors /home/ppluzhnikov/Archive/sourceware.org/gdb/build/gdb/../../src/gdb/exceptions.c:510^M
next prev parent reply other threads:[~2009-06-23 17:35 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 0:12 [patch] Use mmap instead of obstack_alloc for dwarf debug sections Paul Pluzhnikov
2009-05-28 1:16 ` Tom Tromey
2009-05-28 16:57 ` Paul Pluzhnikov
2009-05-30 22:36 ` Tom Tromey
2009-06-11 1:40 ` Paul Pluzhnikov
2009-06-11 1:43 ` Paul Pluzhnikov
2009-06-16 19:19 ` Tom Tromey
2009-06-16 20:43 ` Paul Pluzhnikov
2009-06-16 20:59 ` Tom Tromey
2009-06-16 21:07 ` Paul Pluzhnikov
2009-06-18 9:20 ` Ken Werner
2009-06-18 14:06 ` Paul Pluzhnikov
2009-06-18 14:11 ` Paul Pluzhnikov
2009-06-18 15:02 ` Ken Werner
2009-06-18 16:33 ` Paul Pluzhnikov
2009-06-19 7:10 ` Ken Werner
2009-06-23 15:03 ` [patch] Fix a reread_symbols regression by mmap [Re: [patch] Use mmap instead of obstack_alloc for dwarf debug sections.] Jan Kratochvil
2009-06-23 17:35 ` Paul Pluzhnikov [this message]
2009-06-23 18:08 ` Tom Tromey
2009-06-23 18:21 ` Jan Kratochvil
2009-06-23 20:00 ` Tom Tromey
2009-06-25 19:21 ` [patch] Replace reread_symbols by load+free calls Jan Kratochvil
2009-06-25 19:57 ` Pedro Alves
2009-06-25 23:25 ` Jan Kratochvil
2009-08-02 21:04 ` cancelled: " Jan Kratochvil
2009-08-14 23:09 ` Tom Tromey
2009-08-14 23:12 ` Pedro Alves
2009-08-17 15:41 ` Tom Tromey
2011-12-18 11:54 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ac60eac0906231035o389086e3g7d36060d52697f0c@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jan.kratochvil@redhat.com \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox