Skip to content

test: fix DebugSymbolsTest.ReqWrapList on PPC64LE

Rodrigo Muino Tomonari requested to merge github/fork/danbev/ppc64le-lto into main

Currently, DebugSymbolsTest.ReqWrapList fails on PPC64LE when Node has been configured with Link Time Optimization (LTO) and using RHEL 8.5 and gcc:

$ . /opt/rh/gcc-toolset-11/enable
$ export CC='ccache gcc'
$ export CXX='ccache g++'
$ ./configure --enable-lto
$ make -j8 cctest
...
21:52:27 [ RUN      ] DebugSymbolsTest.ReqWrapList
21:52:27 ../test/cctest/test_node_postmortem_metadata.cc:203: Failure
21:52:27 Expected equality of these values:
21:52:27   expected
21:52:27     Which is: 140736537072320
21:52:27   calculated
21:52:27     Which is: 1099680328560
21:52:27 [  FAILED  ] DebugSymbolsTest.ReqWrapList (43 ms)

After looking into this is seems that the compiler is tampering with one or more of the queue, head, tail, and last variables when compiling with LTO enabled. This commit suggests adding volatile to these variables to prevent the compiler from tampering with them.


Some additional details can be found in these notes.

Merge request reports

Loading