Bug#888566: vim FTBFS on alpha: vim segfaults in the build

Michael Cree mcree at orcon.net.nz
Sat Jan 27 04:50:16 UTC 2018


Source: vim
Version: 2:8.0.1401-2
Severity: important
Justification: fails to build from source (but built in the past)
User: debian-alpha at lists.debian.org
Usertags: ftbfs

vim FTBFS on Alpha with the following [1]:

make[2]: Entering directory '/<<PKGBUILDDIR>>/src/vim-gtk/po'
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq af.po
Segmentation fault
Makefile:153: recipe for target 'af.ck' failed

And, indeed, the built vim in src/vim-gtk3 segfaults when manually
run.  Debugging shows the segfault at:

#0  0x0000020001173014 in parse_cino (buf=0x200036a83a0) at misc1.c:7047

7047	    for (p = buf->b_p_cino; *p; )

which sets p to buf->b_p_cino and dereferences it but it is NULL.
Interesting the offset to field b_p_cino in the struct is 5144
bytes.

Going one step up the stack to:

#1  0x00000200011b734c in check_buf_options (buf=0x200036a83a0) at
option.c:5672

5671	    check_string_option(&buf->b_p_cino);
5672	    parse_cino(buf);

So buf->b_p_cino should be set to an empty string (i.e. "") by
check_string_option() BUT the field b_p_cino in the struct is
5136 bytes from the start of the struct (cf. 5144 bytes for the
same struct in module misc1.o)!

Four of those bytes difference are due to the field b_ino in the
struct (of type ino_t).  And indeed examining the build log [1]
one sees option.c is compiled with -DFILE_OFFSET_BITS=64 but
misc1.c is NOT compiled with that option, hence the difference
in offsets to fields in the buf_T struct.

I am not sure why only some modules are compiled with
-DFILE_OFFSET_BITS=64. Whatever the reason, it leads to a broken
vim on Alpha.

Cheers
Michael.

[1]
https://buildd.debian.org/status/fetch.php?pkg=vim&arch=alpha&ver=2%3A8.0.1401-2&stamp=1514134076&raw=0



More information about the pkg-vim-maintainers mailing list