Bug#855078: giac: FTBFS: [algo.pdf] Error 139 (Segmentation fault)

Edmund Grimley Evans edmund.grimley.evans at gmail.com
Thu Jun 29 08:49:01 UTC 2017


So giac was supposed to be working now on arm64, but it failed on the buildd:

https://buildd.debian.org/status/package.php?p=giac&suite=sid

Having recently seen something similar I think I can guess what's happening.

User virtual addresses on Linux arm64 may have 39, 42 or 48 bits,
depending on how the kernel is configured:

https://www.kernel.org/doc/Documentation/arm64/memory.txt

It seems that giac now works with the smaller virtual addresses, but
fails on the buildd, which uses 48-bit addresses. According to the
comment in src/gen.h, SMARTPTR64 should handle 48-bit addresses, but
up to now it has probably only been tested on amd64, which uses 47-bit
addresses. A problem with the top bit? Sign extension perhaps?

Sure enough, in src/gen.cc there is code like this:

#ifdef SMARTPTR64
          (*((longlong *) &e) >> 16)

I suspect that the fix will be to replace some of those longlong with ulonglong.



More information about the debian-science-maintainers mailing list