From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 921CB386F809 for ; Tue, 2 Feb 2021 15:31:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 921CB386F809 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 112FUvbb023089 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 2 Feb 2021 10:31:01 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 112FUvbb023089 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D8C301E590; Tue, 2 Feb 2021 10:30:56 -0500 (EST) Subject: Re: Get Different Result for the same core file with different versions of gdb. To: Andy Fan , gdb@sourceware.org References: From: Simon Marchi Message-ID: <86e716f4-8f2a-22df-efff-38fff1c7d408@polymtl.ca> Date: Tue, 2 Feb 2021 10:30:56 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 2 Feb 2021 15:30:57 +0000 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2021 15:31:05 -0000 On 2021-02-01 9:15 p.m., Andy Fan via Gdb wrote: > On Mon, Feb 1, 2021 at 11:57 AM Andy Fan wrote: > >> Hi: >> >> You can pay attention to $2 and $3.They check the same addr in the same >> core file. >> I'm sure I am debugging the same file in the same machine. >> >> GDB 7.6: >> >> (gdb) up 3 >> #3 ResetPlanCache () at plancache.c:1922 >> 1922 plancache.c: No such file or directory. >> (gdb) p ((AllocSet)plansource->query_context)->freelist >> $1 = {0x0, *0x5bdd3b8*, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} >> (gdb) p *((AllocSet)plansource->query_context)->freelist[1] >> *$2 = {size = 10649824, aset = 0xa283c0 }* >> (gdb) p plansource->query_context->name >> *$3 = 0xbfd929 "unnamed prepared statement"* >> (gdb) x /10c plansource->query_context->name >> 0xbfd929: 117 'u' 110 'n' 110 'n' 97 'a' 109 'm' 101 'e' 100 'd' 32 ' ' >> 0xbfd931: 112 'p' 114 'r' >> (gdb) quit >> >> >> GDB 9.2: >> (gdb) up 3 >> #3 ResetPlanCache () at plancache.c:1922 >> 1922 plancache.c: No such file or directory. >> (gdb) p ((AllocSet)plansource->query_context)->freelist >> $1 = {0x0, *0x5bdd3b8*, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} >> (gdb) p *((AllocSet)plansource->query_context)->freelist[1] >> *$2 = {size = 16, aset = 0x0}* >> (gdb) p plansource->query_context->name >> *$3 = 0xbfd929 ""* >> (gdb) x /10c plansource->query_context->name >> 0xbfd929: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 >> '\000' >> 0xbfd931: 0 '\000' 0 '\000' >> >> >> Any ideas? Thanks! >> >> -- >> Best Regards >> Andy Fan >> > > Will it have something with compiler? The compiler I used > to build the software (which generated the core file) is LLVM 6.0.0. At first glance, it sounds like a bug. Can you provide a reproducer? Simon