On Mar 26, 2020, at 3:13 PM, Jussi Lind jussi.lind@unikie.com wrote:
Hi,
We are having some serious problems after we upgraded from C++14 to C++17 on an Jetson TX2 ARM device. Our system tests started to behave differently and fail.
It seems that when our application uses a library (also developed by us) some data gets corrupted when delivered to a class constructor. For example, the .second of and std::pair<float> appears to be the .first and the .second is garbage. This is deterministic, but different tests are failing depending on the combination: library C++17/C++14 <-> application C++14/C++17.
This is on Ubuntu 18.04 and gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04).
Nothing like this happens on Intel.
So: ARM, C++14: OK Intel, C++14: OK ARM, C++17: FAIL Intel, C++17: OK
Any ideas what could cause this? I know this is a bit vague, but this a commercial, closed-source application so I cannot yet give any other information.
Hi Jussi,
What target are you using? Is it 32-bit armhf (arm-linux-gnueabihf) or 64-bit AArch64 (aarch64-linux-gnu)?
If it is armhf, then take a look at notice at http://releases.linaro.org/components/toolchain/binaries/latest-7/ . There has been an ABI bug in GCC 5.x and GCC 6.x, which has been fixed in GCC 7.x. If you didn't fully recompile all you libraries with GCC 7.x, then you could be hitting that bug.
Another thing to try is to upgrade to latest GCC 9.x. GCC 7.x was EOL'ed for some time, and GCC 8.x will go EOL later this year. If your problem reproduces with GCC 9.x or GCC's master branch, then we'll do our best to investigate it (provided a reproducible testcase, of course).
Regards,
-- Maxim Kuvyrkov https://www.linaro.org