[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bignum branch

From: Eli Zaretskii
Subject: Re: bignum branch
Date: Mon, 13 Aug 2018 18:02:41 +0300

> From: Andy Moreton <address@hidden>
> 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 = {<text variable, no debug info>} 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

  (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.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]