Skip to contentSkip to conversation

lxc: fixes lxc segment fault issue on arm if it is compiled with GCC 5.2

PATCH Bruce Ashfield 1 participant 1 message Jul 15, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

merged.

Bruce

Quoted 30 lines · On 2016-07-15 06:05 AM, [email protected] wrote:

From: fli <[email protected]>

If the lxc is compiled with gcc 5.2 -O2 optimization on arm, lxc-console/lxc-stop command always produce segment fault.

The same issue also occurred on systemd: [YOCTO #8291]

For lxc, after several testing, it only needs to disable schedule-insns2 to fix the segment fault issue.

---
  recipes-containers/lxc/lxc_2.0.0.bb | 3 +++
  1 file changed, 3 insertions(+)
recipes-containers/lxc/lxc_2.0.0.bb +3 -0
index 5004b9e..e436057 100644
@@ -49,6 +49,9 @@ EXTRA_OECONF += "--enable-log-src-basename"
 
  CFLAGS_append = " -Wno-error=deprecated-declarations"
 
+# disable problematic GCC 5.2 optimizations [YOCTO #8291]
+FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns2"
+
  PACKAGECONFIG ??= "templates \
      ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
  "