-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
Required Info | |
---|---|
Camera Model | Any |
Firmware Version | Any |
Operating System & Version | Ubuntu 14.04 |
Kernel Version (Linux Only) | 4.4.0 |
Platform | Pentium |
SDK Version | 2.14.1 |
Language | C++ |
Issue Description
As mentioned in previous issues (#1428, #1443, #1464, #1484), there have been issues executing AVX instructions on CPUs that don't support AVX (causing SIGILL, "Illegal instruction (core dumped)"). Using SDK version 2.14.1, the issue is two-fold:
-
If I compile with
-mavx
, my application crashes at global initialization. I see that there is auto-selection code to bypass the AVX implementation if not supported on a CPU, but in debugging, I saw crashes in two different locations (one in librealsense and one in another library). Generally speaking, adding-mavx
gives the compiler free-reign to optimize using AVX wherever it wishes, so I don't think this should always be enabled for all non-ARM builds. -
If I remove
-mavx
, the build fails due to SSSE3 guards (which my processor supports) where AVX guards should be used instead. I have a patch for this, which is ultimately the solution to my issue. I'll send a pull request with this patch shortly.