Bug#902961: mozjs52: FTBFS in recent unstable: ReserveProcessExecutableMemory() fails during tests

Simon McVittie smcv at debian.org
Tue Jul 10 10:18:25 BST 2018


Control: tags -1 = ftbfs patch pending

On Wed, 04 Jul 2018 at 00:51:05 +0100, Simon McVittie wrote:
> Running it under gdb reveals that this is because
> ReserveProcessExecutableMemory() in js/src/jit/ProcessExecutableMemory.cpp
> fails during startup, causing JS_Init() to fail.

On closer inspection, debian/patches/ia64-support.patch #ifdefs out the
final "return p" on non-IA64 architectures, so the practical result of
that function ends up being whatever happens to be in the register or
stack location that should have held the return value, and it's not
surprising that this is often (although perhaps not always!) NULL.

The attached revision of that patch seems to work, and passes tests on
barriere.

If you are interested in portability to ia64, please either take this
change upstream (probably best done via Firefox), or fix ia64 kernels'
mmap() implementation to behave as documented in mmap(2) (with addr being
merely a hint, as it apparently is on other architectures). This was a
good example of a portability patch breaking architectures other than the
one for which the patch was applied, demonstrating that adding patches for
the benefit of non-release architectures is not necessarily harmless to
release architectures.

> The changes between 52.3.1-7 and what I'm compiling all seem
> to be specific to non-amd64 architectures

... except inasmuch as they affect architectures other than their target
by adding more #ifdef complexity.

> A hack that works to avoid this is to retry the mmap() without the address
> hint, like in Jason Duerstock's debian/patches/ia64-support.patch,
> but for non-IA64 architectures as well; see attached. I suspect this
> might be the wrong solution

This worked, but not for the reason I initially thought it did: it removed
the #ifdefs, and hence the bug.

    smcv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ia64-support.patch
Type: text/x-diff
Size: 1349 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-gnome-maintainers/attachments/20180710/ed7090b2/attachment.patch>


More information about the pkg-gnome-maintainers mailing list