Public bug reported:

luabind 1.1.1-1 has been in stonking-proposed for 90 days. It fails to
build on amd64 and amd64v3: 21 of 55 tests in the static build segfault.
The other architectures build fine.

https://launchpad.net/ubuntu/+source/luabind/1.1.1-1/+build/33399036

Cause: object_rep is placement-new'ed into lua_newuserdata() memory,
which is only 8-byte aligned. Its member boost::aligned_storage<32>
m_instance_buffer requires 16-byte alignment on x86_64. With LTO, GCC
inlines the object_rep constructor into push_new_instance() and
initialises two members with an aligned SSE store (movaps
%xmm0,0x20(%rax)), which faults on the 8-byte aligned userdata. arm64
tolerates the misaligned store. Debian passes because it doesn't build
with LTO; a local build with optimize=-lto passes 55/55.

The same bug was reported and fixed in the Oberon00 luabind fork:
https://github.com/Oberon00/luabind/issues/42
https://github.com/Oberon00/luabind/pull/50 (commit 
49814f6b47ed99e273edc5198a6ebd7fa19e813a)

Uploading 1.1.1-1ubuntu1 with that commit cherry-picked. It was verified
locally with LTO enabled: 55/55 tests pass in both the static and shared
builds. It will also be reported to Debian.

** Affects: luabind (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: ftbfs stonking update-excuse

** Tags added: ftbfs stonking update-excuse

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2170791

Title:
  luabind 1.1.1-1 FTBFS on amd64: tests segfault, object_rep misaligned
  in Lua userdata (exposed by LTO)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/luabind/+bug/2170791/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to