Public bug reported:

in /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake, line 780, the cflags 
for PCL are defined like this:  
list(APPEND PCL_DEFINITIONS  -march=native -msse4.2 -mfpmath=sse  )

however, when using -march=native -msse4.2, even simple user-compiled
programs crash in eigen's handmade_aligned_free. I attached a minimal
testcase for this (the program crashes on ubuntu artful and bionic, but
not on zesty). Problem was on a dell xps13 (since -march=native is
hardware-dependent, on some systems the problem might not be
reproducible)

see also this email thread http://www.pcl-users.org/Segfaults-in-eigen-s
-handmade-aligned-free-on-ubuntu-artful-td4045237.html

CMakeLists.txt for the program in attach:

cmake_minimum_required(VERSION 2.8)
project(crashdemo)
find_package(Boost 1.54 REQUIRED COMPONENTS filesystem)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
set(OUR_Boost_LIBRARIES ${Boost_LIBRARIES})
find_package(PCL 1.8 REQUIRED COMPONENTS common io segmentation visualization 
filters)
add_definitions(${PCL_DEFINITIONS})
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_executable(crasher
        src/crasher.cpp
)
target_link_libraries(crasher
        ${OUR_Boost_LIBRARIES}
        ${Boost_LIBRARIES}
        ${PCL_LIBRARIES}
)

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: libpcl-dev 1.8.1+dfsg1-2ubuntu2
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: GNOME
Date: Mon May 14 15:18:46 2018
InstallationDate: Installed on 2016-10-23 (567 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
SourcePackage: pcl
UpgradeStatus: Upgraded to bionic on 2018-05-09 (4 days ago)

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


** Tags: amd64 apport-bug bionic

** Attachment added: "crasher.cpp"
   
https://bugs.launchpad.net/bugs/1771124/+attachment/5139245/+files/crasher.cpp

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

Title:
  libpcl cflags -march=native -msse4.2 makes user-compiled programs
  crash

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to