From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: bignum branch Date: Mon, 13 Aug 2018 18:02:41 +0300 Message-ID: <83pnymjomm.fsf@gnu.org> References: <87o9fbbw1t.fsf@tromey.com> <86lg9gl7vy.fsf@gmail.com> <87tvo4i9em.fsf@tromey.com> <86k1ozl0yd.fsf@gmail.com> <83in4iojva.fsf@gnu.org> <86bmaasm39.fsf@gmail.com> <83a7puo8oq.fsf@gnu.org> <83zhxummef.fsf@gnu.org> <83lg9em1v6.fsf@gnu.org> <86r2j5q67t.fsf@gmail.com> <83r2j4lvyo.fsf@gnu.org> <86va8gj12l.fsf@gmail.com> <83k1owlscr.fsf@gnu.org> <86mutsiy80.fsf@gmail.com> <83eff4lqon.fsf@gnu.org> <86eff4ixcj.fsf@gmail.com> <83a7pslnzz.fsf@gnu.org> <86eff4turj.fsf@gmail.com> <83y3dbju00.fsf@gnu.org> <86ftzjs73w.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1534172441 12525 195.159.176.226 (13 Aug 2018 15:00:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Aug 2018 15:00:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andy Moreton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 13 17:00:37 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpEKi-00037I-8i for ged-emacs-devel@m.gmane.org; Mon, 13 Aug 2018 17:00:36 +0200 Original-Received: from localhost ([::1]:39950 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpEMo-0008FO-Rj for ged-emacs-devel@m.gmane.org; Mon, 13 Aug 2018 11:02:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpEMh-0008ET-5k for emacs-devel@gnu.org; Mon, 13 Aug 2018 11:02:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fpEMd-0001P7-9Z for emacs-devel@gnu.org; Mon, 13 Aug 2018 11:02:39 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpEMd-0001P2-4v; Mon, 13 Aug 2018 11:02:35 -0400 Original-Received: from [176.228.60.248] (port=3178 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fpEMc-0006by-L5; Mon, 13 Aug 2018 11:02:35 -0400 In-reply-to: <86ftzjs73w.fsf@gmail.com> (message from Andy Moreton on Sun, 12 Aug 2018 20:44:03 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:228482 Archived-At: > From: Andy Moreton > Date: Sun, 12 Aug 2018 20:44:03 +0100 > > gdb: Target exception EXCEPTION_SINGLE_STEP at 0x40016c304 > gdb: Target exception EXCEPTION_SINGLE_STEP at 0x46ace5dc0 > 0x000000046ace5dc0 in ?? () > (gdb) > Cannot find bounds of current function > (gdb) stepi > gdb: Target exception EXCEPTION_ACCESS_VIOLATION at 0x46ace5dc0 > > Thread 1 received signal SIGSEGV, Segmentation fault. > 0x000000046ace5dc0 in ?? () Hmm... and what does this say? (gdb) x/i 0x000000046ace5dc0 This address looks bogus to me. Earlier, you reported: > Thread 1 received signal SIGSEGV, Segmentation fault. > 0x000000046ace5dc0 in ?? () > (gdb) p mpn_popcount > $5 = {} 0x401e61484 <__imp___gmpn_popcount> > (gdb) x/xg mpn_popcount > 0x401e61484 <__imp___gmpn_popcount>: 0x000000006ace5dc0 > (gdb) disas 0x000000006ace5dc0,+0x80 I think your disassembly used the wrong address, it should have used this: (gdb) disas 0x401e61484,+0x80 I'd expect to see an indirect jump there. And notice how 0x000000006ace5dc0, the value at __imp___gmpn_popcount, and 0x000000046ace5dc0, where Emacs crashed, are the same value, up to the 0x0000000400000000 bit. Hmm... > I don't see a crash. Your program only accepts non-negative numbers that > are small enough to use only a single limb, so may not be representative > as a cut down test case. Feel free to change the program as you see fit. I hoped that we will have a small enough test case to report to GCC and GMP developers. If not, maybe it's worth to report to the GMP list anyway, they could have some ideas. It may also be a good idea to report the problem with gmp.h to the MSYS2 forum, they should fix the header anyway. (Mingw.org already fixed theirs, as I reported related problems, not about Emacs, a few months ago.) Thanks.