From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11366 invoked by alias); 6 Jan 2014 06:48:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 11294 invoked by uid 89); 6 Jan 2014 06:48:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT,RP_MATCHES_RCVD,SPF_PASS autolearn=no version=3.3.2 X-HELO: LGEAMRELO01.lge.com Received: from lgeamrelo01.lge.com (HELO LGEAMRELO01.lge.com) (156.147.1.125) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Jan 2014 06:48:11 +0000 Received: from GNRHQ10NA10046 ( [10.186.119.205]) by LGEAMRELO01.lge.com (Symantec Brightmail Gateway) with SMTP id B4.7C.20162.9A15AC25; Mon, 6 Jan 2014 15:48:09 +0900 (KST) From: "Honggyu Kim" To: Cc: , "'Sergio Durigan Junior'" , References: <1388973207-31270-1-git-send-email-hong.gyu.kim@lge.com> <002601cf0a9d$f9330f50$eb992df0$@gyu.kim@lge.com> In-Reply-To: <002601cf0a9d$f9330f50$eb992df0$@gyu.kim@lge.com> Subject: RE: [PATCH v2] Remove duplicated include in gdb directory Date: Mon, 06 Jan 2014 06:48:00 -0000 Message-ID: <002701cf0aab$4280b3d0$c7821b70$@gyu.kim@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00051.txt.bz2 Hi, I have faced a problem, when I try to debug a simple hello world program. I think it's a free error from your patch "PR binutils/11983" whose hash is "1be5090bcaf4bcab333cf03f4157b16d33881222". That is merged on Jan 2 this year. --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -123,6 +123,8 @@ _bfd_delete_bfd (bfd *abfd) objalloc_free ((struct objalloc *) abfd->memory); } + if (abfd->filename) + free ((char *) abfd->filename); free (abfd->arelt_data); free (abfd); } It seems to be a double free error. If I remove the newly added free statement above, the problem disappeared. ( free ((char *) abfd->filename) ) Please have a look at the execution error message that I posted on the previous mail or correct me if I'm wrong. I have tested this on x86_64 machine. Thank you. Honggyu Kim -----Original Message----- From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Honggyu Kim Sent: Monday, January 06, 2014 2:13 PM To: 'Sergio Durigan Junior' Cc: gdb-patches@sourceware.org Subject: RE: [PATCH v2] Remove duplicated include in gdb directory Thank you for your kind feedback. I thought it's just a minor code cleanup so I didn't expect any copyright issues. I have tried to build as below. $ ./configure --prefix=`pwd`/build $ make and $ make distclean $ ./configure --prefix=`pwd`/build --enable-targets=all $ make In both cases, build were fine and gdb binary is generated without problems. However, when I tried to run gdb to debug just a simple hello world program, it fails. But I found that the current HEAD also fails by showing the following message. It seems to be very strange for me since it's not from the patch that I submitted. I have tested the same thing after checkout a tag "gdb_7_6_2-2013-12-08-release" and it worked fine. Please consider this issue separately or please correct me if I'm wrong. $ cd build/bin/ $ ./gdb ./a.out GNU gdb (GDB) 7.6.50.20140106-cvs Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./a.out...(no debugging symbols found)...done. (gdb) r Starting program: /home/hong.gyu.kim/src/gdb/binutils-gdb/build/bin/a.out *** glibc detected *** ./gdb: double free or corruption (out): 0x0000000003435860 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7fc88175db96] ./gdb[0x86b8a1] ./gdb(bfd_close+0x82)[0x86be52] ... Aborted (core dumped) Hello, World -----Original Message----- From: Sergio Durigan Junior [mailto:sergiodj@redhat.com] Sent: Monday, January 06, 2014 12:47 PM To: Honggyu Kim Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2] Remove duplicated include in gdb directory On Sunday, January 05 2014, Honggyu Kim wrote: > This patch simply removes duplicated include statements in gdb directory. > If there are two duplicated include statements, this patch keeps the first > include and removes the second include. > Those are found by checkincludes.pl tool in linux kernel and double checked > manually once again if the include statements are affected by ifdef macro. Thanks for the patch, Honggyu. I believe you have tested it by building GDB with --enable-targets=all, right? It needs a ChangeLog (mechanical), and it seems to be simple enough to be committed without needing a copyright assignment (I don't see your name in the MAINTAINERS file). Other than that, let's wait for some maintainer to give the green light. BTW, if you want to get started on the process to obtain the copyright assignment, mail me offlist and I can send you the instructions. Thanks, -- Sergio