all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gergely Czuczy <gergely.czuczy@harmless.hu>
To: npostavs@users.sourceforge.net
Cc: 28308@debbugs.gnu.org
Subject: bug#28308: Build failure on FreeBSD/aarch64
Date: Sat, 9 Sep 2017 07:01:20 +0200	[thread overview]
Message-ID: <2fbe77fe-1258-cef2-32e2-f741da514151@harmless.hu> (raw)
In-Reply-To: <87k218g33g.fsf@users.sourceforge.net>

On 2017. 09. 09. 1:52, npostavs@users.sourceforge.net wrote:
> Gergely Czuczy <gergely.czuczy@harmless.hu> writes:
>
>> On 2017. 09. 02. 5:13, npostavs@users.sourceforge.net wrote:
>>> Gergely Czuczy <gergely.czuczy@harmless.hu> writes:
>>>
>>>> EMACSLOADPATH= '../src/bootstrap-emacs' -batch --no-site-file --no-site-lisp --eval '(setq load-prefer-newer t)'  -f batch-byte-compile emacs-lisp/macroexp.el
>>>> (lldb) bt
>>> This looks like a segfault triggered from the segfault handler.  Can you
>>> run the batch-byte-compile command above under the debugger and catch
>>> the original segfault?
>> Sure, I can. However, could you please tell me the commands I need to
>> run? Unfortunately I don't really have the time to do the legwork,
>> however if the commands are given, I can run it and let you know of
>> the results.
> I think it should be (from the lisp/ directory)
>
>      EMACSLOADPATH= lldb -- '../src/bootstrap-emacs' -batch --no-site-file --no-site-lisp --eval '(setq load-prefer-newer t)'  -f batch-byte-compile emacs-lisp/macroexp.el
>
> then 'bt' when it segfaults.
Thanks, here you go:
root@build-pine64:/usr/ports/editors/emacs-devel# cd 
/usr/ports/editors/emacs-devel/work/emacs-f44184f/lisp
root@build-pine64:/usr/ports/editors/emacs-devel/work/emacs-f44184f/lisp# 
EMACSLOADPATH= lldb -- '../src/bootstrap-emacs' -batch --no-site-file 
--no-site-lisp --eval '(setq load-prefer-newer t)' -f batch-byte-compile 
emacs-lisp/macroexp.el
(lldb) target create "../src/bootstrap-emacs"
Current executable set to '../src/bootstrap-emacs' (aarch64).
(lldb) settings set -- target.run-args  "-batch" "--no-site-file" 
"--no-site-lisp" "--eval" "(setq load-prefer-newer t)" "-f" 
"batch-byte-compile" "emacs-lisp/macroexp.el"
(lldb) bt
error: invalid process
(lldb) r
Process 63555 launching
Process 63555 launched: '../src/bootstrap-emacs' (aarch64)
Process 63555 stopped
* thread #1, name = 'bootstrap-emacs', stop reason = signal SIGSEGV: 
invalid address (fault address: 0x4192bd70)
     frame #0: 0x000000000011e8c0 bootstrap-emacs`re_match_2_internal + 7556
bootstrap-emacs`re_match_2_internal:
->  0x11e8c0 <+7556>: str    xzr, [x9]
     0x11e8c4 <+7560>: adrp   x8, 1091
     0x11e8c8 <+7564>: ldr    x10, [x8, #0x910]
     0x11e8cc <+7568>: adrp   x11, 1077
(lldb) bt
* thread #1, name = 'bootstrap-emacs', stop reason = signal SIGSEGV: 
invalid address (fault address: 0x4192bd70)
   * frame #0: 0x000000000011e8c0 bootstrap-emacs`re_match_2_internal + 7556
     frame #1: 0x0000000000040190 bootstrap-emacs`__start + 376
     frame #2: 0x00000000401c0018 ld-elf.so.1`.rtld_start at rtld_start.S:41
(lldb)


And here's one with a debug build(-g):
root@build-pine64:/usr/ports/editors/emacs-devel# cd 
/usr/ports/editors/emacs-devel/work/emacs-f44184f/lisp
root@build-pine64:/usr/ports/editors/emacs-devel/work/emacs-f44184f/lisp# 
EMACSLOADPATH= lldb -- '../src/bootstrap-emacs' -batch --no-site-file 
--no-site-lisp --eval '(setq load-prefer-newer t)' -f batch-byte-compile 
emacs-lisp/macroexp.el
(lldb) target create "../src/bootstrap-emacs"
Current executable set to '../src/bootstrap-emacs' (aarch64).
(lldb) settings set -- target.run-args  "-batch" "--no-site-file" 
"--no-site-lisp" "--eval" "(setq load-prefer-newer t)" "-f" 
"batch-byte-compile" "emacs-lisp/macroexp.el"
(lldb) r
Process 69906 launching
Process 69906 launched: '../src/bootstrap-emacs' (aarch64)
Process 69906 stopped
* thread #1, name = 'bootstrap-emacs', stop reason = signal SIGSEGV: 
invalid address (fault address: 0x41aef578)
     frame #0: 0x0000000000228460 
bootstrap-emacs`xnrealloc(pa=0x0000000000000000, nitems=0, 
item_size=1101985151) at alloc.c:939
    936  {
    937    eassert (0 <= nitems && 0 < item_size);
    938    ptrdiff_t nbytes;
-> 939    if (INT_MULTIPLY_WRAPV (nitems, item_size, &nbytes) || 
SIZE_MAX < nbytes)
    940      memory_full (SIZE_MAX);
    941    return xrealloc (pa, nbytes);
    942  }
(lldb) bt
* thread #1, name = 'bootstrap-emacs', stop reason = signal SIGSEGV: 
invalid address (fault address: 0x41aef578)
   * frame #0: 0x0000000000228460 
bootstrap-emacs`xnrealloc(pa=0x0000000000000000, nitems=0, 
item_size=1101985151) at alloc.c:939
     frame #1: 0x0000000000228204 
bootstrap-emacs`xnrealloc(pa=0x000000000019ae38, nitems=42949672960, 
item_size=281474976703896) at alloc.c:939
     frame #2: 0x000000000022e208 
bootstrap-emacs`xpalloc(pa=0x0000000000000000, 
nitems=0x0000000041aef57f, nitems_incr_min=1683000, 
nitems_max=42949672960, item_size=281474976703896) at alloc.c:0
     frame #3: 0x0000000000168214 
bootstrap-emacs`delete_tty(terminal=0xbc7603df25a071f3) at term.c:4463
     frame #4: 0x0000000000040190 bootstrap-emacs`__start + 376
     frame #5: 0x0000000040390018 ld-elf.so.1`.rtld_start at rtld_start.S:41
(lldb)

I hope it helps.

Best regards,
-czg






  reply	other threads:[~2017-09-09  5:01 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 16:34 bug#28308: Build failure on FreeBSD/aarch64 Gergely Czuczy
2017-08-31 16:47 ` Glenn Morris
2017-08-31 17:02   ` Gergely Czuczy
2017-09-02  3:13 ` npostavs
2017-09-04 12:32   ` Gergely Czuczy
2017-09-08 23:52     ` npostavs
2017-09-09  5:01       ` Gergely Czuczy [this message]
2017-09-09  7:07         ` Eli Zaretskii
2017-09-11  6:07           ` npostavs
2017-09-11  7:26             ` Gergely Czuczy
2017-09-11 14:45               ` Eli Zaretskii
2017-09-11 15:10                 ` Gergely Czuczy
2017-09-11 15:31                   ` Eli Zaretskii
2017-09-11 17:12                     ` Gergely Czuczy
2017-09-11 17:17                       ` Eli Zaretskii
2017-09-11 19:57                         ` Gergely Czuczy
2017-09-11 20:33                         ` Gergely Czuczy
2017-09-12  5:22                           ` npostavs
2017-09-12  5:57                             ` Gergely Czuczy
2017-09-12 14:59                           ` Eli Zaretskii
2017-09-12 15:13                             ` Gergely Czuczy
2017-09-20  5:51                         ` Gergely Czuczy
2017-09-20 19:29                           ` Noam Postavsky
2017-10-19 23:39                             ` Noam Postavsky
2017-10-20  7:07                               ` Eli Zaretskii
2017-10-24 18:43                                 ` Noam Postavsky
2017-10-31 17:31                                   ` Noam Postavsky
2017-10-31 20:21                                     ` Eli Zaretskii
2017-11-01 16:14                                     ` Gergely Czuczy
2017-11-01 16:51                                       ` Noam Postavsky
2017-11-01 18:27                                         ` Gergely Czuczy
2017-11-01 18:52                                           ` Noam Postavsky
2017-11-02 21:03                                     ` Gergely Czuczy
2017-11-04 23:14                                       ` Noam Postavsky
2017-11-05 18:10                                         ` Gergely Czuczy
2017-11-06 23:14                                           ` Noam Postavsky
2017-09-14  0:51 ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2fbe77fe-1258-cef2-32e2-f741da514151@harmless.hu \
    --to=gergely.czuczy@harmless.hu \
    --cc=28308@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.