Subject: bug#28308: Build failure on FreeBSD/aarch64

From: Gergely Czuczy <[email-masked]>
Date: Mon, 11 Sep 2017 19:12:12 +0200

On 2017. 09. 11. 17:31, Eli Zaretskii wrote:
>> Cc: [email-masked], [email-masked]
>> From: Gergely Czuczy <[email-masked]>
>> Date: Mon, 11 Sep 2017 17:10:39 +0200
>>
>>>> bootstrap-emacs`xnrealloc(pa=0x000000000019ae38, nitems=42949672960,
>>>> item_size=281474976703896) at alloc.c:939
>>>>        frame #2: 0x000000000022e208
>>>> bootstrap-emacs`xpalloc(pa=0x0000000000000000,
>>>> nitems=0x0000000041b1797f, nitems_incr_min=1683000,
>>>> nitems_max=42949672960, item_size=281474976703896) at alloc.c:0
>>>>        frame #3: 0x0000000000168214
>>>> bootstrap-emacs`delete_tty(terminal=0x3276551740f23ac5) 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 don't understand how can this be.  Can you go to frame #3, in
>>> delete_tty, and show what line of C code there allegedly calls
>>> xpalloc?
>> Sure, here it is:
>> https://github.com/emacs-mirror/emacs/blob/f44184f/src/term.c#L4463
> That's a call to delete_terminal, which doesn't appear in your
> backtrace, and doesn't call xpalloc, either.  So thanks, but I'm still
> confused.  Are you sure this is an unoptimized build?  Is it possible
> that we are looking at LLDB bug?
It's the lldb debug, right. And I'm sure it's an unoptimized build, I've 
went back and checked the build flags:
cc -Demacs  -I. -I. -I../lib -I../lib 
-I/usr/local/include/libxml2             -MMD -MF deps/.d -MP 
-Wno-switch -Wno-pointer-sign -Wno-string-plus-int 
-Wno-unknown-attributes -Wno-initializer-overrides 
-Wno-tautological-compare 
-Wno-tautological-constant-out-of-range-compare -O0 -g 
-fno-strict-aliasing  -Wl,-znocombreloc  (...)

If that helps, I can create a qemu VM with this fbsd build, and give you 
the image.