From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1849 invoked by alias); 28 Nov 2012 02:44:47 -0000 Received: (qmail 1816 invoked by uid 22791); 28 Nov 2012 02:44:45 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pa0-f41.google.com (HELO mail-pa0-f41.google.com) (209.85.220.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Nov 2012 02:44:42 +0000 Received: by mail-pa0-f41.google.com with SMTP id bj3so5378975pad.0 for ; Tue, 27 Nov 2012 18:44:40 -0800 (PST) Received: by 10.66.87.33 with SMTP id u1mr47893106paz.73.1354070680697; Tue, 27 Nov 2012 18:44:40 -0800 (PST) Received: from [192.168.0.113] ([221.12.28.136]) by mx.google.com with ESMTPS id ip8sm2206909pbc.36.2012.11.27.18.44.35 (version=SSLv3 cipher=OTHER); Tue, 27 Nov 2012 18:44:39 -0800 (PST) Message-ID: <50B57B1C.5080803@gmail.com> Date: Wed, 28 Nov 2012 02:44:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0a1 MIME-Version: 1.0 To: Pierre Muller CC: gdb-patches@sourceware.org Subject: Re: [RFC-v5] Fix .text section offset for windows DLL (was Calling __stdcall functions in the inferior) References: <834nm07z0s.fsf@gnu.org> <5077FEB9.4030304@redhat.com> <83y5jb7rfe.fsf@gnu.org> <006001cdaada$00c81f00$02585d00$@muller@ics-cnrs.unistra.fr> <20121024194517.GK3555@adacore.com> <011901cdb2ab$48076b90$d81642b0$@muller@ics-cnrs.unistra.fr> <20121105171121.GA2972@adacore.com> <50991f5f.8382440a.1100.ffff82abSMTPIN_ADDED@mx.google.com> <509ABA17.30507@redhat.com> <000301cdbd96$f5cd9f10$e168dd30$@muller@ics-cnrs.unistra.fr> <20121122173019.GF9964@adacore.com> <15690.5992342674$1353883881@news.gmane.org> <87624si9ur.fsf@fleche.redhat.com> <42721.1671988063$1354028360@news.gmane.org> In-Reply-To: <42721.1671988063$1354028360@news.gmane.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2012-11/txt/msg00790.txt.bz2 On 2012-11-27 22:58, Pierre Muller wrote: > Thanks, Tom... > it really seems that this is the culprit: > I was freeing again already freed memory, which of course > created random crashes later. > > I send here rapidly a new patch version. > I really tested the allocation problems by adding > allocation + free'ing of each of the first parameters > used in prim_record_minimal_symbol > and it does seem that freeing of char array doesn't lead to any problem. > > So the only trouble was related to the > reallocation of section_data and seems to be fixed > thanks to Tom's proposal. > > Yuanhui Zhang, > could you please check if the new patch > suppresses the crash you had when you tried the previous version? > > Thanks to everyone... > > Pierre Muller > I just tested this new patch, and the crash issue is gone. Thanks. Yuanhui Zhang