Closed jamesjer closed 2 years ago
I changed the test to not choose the most negative integer and got the same failure with -2147483647, so my guess that the most negative integer had something to do with it is wrong.
@jamesjer I cannot reproduce this on an i386 running Debian.
What are the versions of the dependencies that you are using?
The dependencies have changed some since July 16, but I still see the issue. Currently:
The build flags used by Fedora are as follows:
-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
Things I have tried, without success:
../e-antic/renf_elem_class.hpp:213:48: warning: 'renf_elem_t' violates the C++ One Definition Rule [-Wodr]
213 | std::add_lvalue_reference_t<::renf_elem_t> renf_elem_t() const;
| ^
renf_elem_class.cpp:661:17: note: return value type mismatch
661 | ::renf_elem_t & renf_elem_class::renf_elem_t() const
| ^
renf_elem_class.cpp:661:17: note: 'renf_elem_t' was previously declared here
I changed line 661 of libeantic/srcxx/renf_elem_class.cpp to this, to match the header:
std::add_lvalue_reference_t<::renf_elem_t> renf_elem_class::renf_elem_t() const
@jamesjer any recommendations on how to reproduce this?
There does not seem to be a 32bit fedora image for docker and I am somewhat reluctant to create a VM from scratch here...
As mentioned in the linked pull request, renf_elem_cmp_ui
can return values other than -1, 0, and 1 (namely 2, in this case). If that shouldn't happen, we can dig deeper, but that commit does make all tests pass on i386 Fedora Rawhide.
You are right about there being no 32-bit Fedora image for docker. I don't think Fedora distributes an i386 installer anymore. That architecture is halfway to being dropped altogether. If you have an x86_64 Fedora Rawhide machine, do this:
You are now sitting at a shell inside the directory where e-antic was built.
I am attempting to build e-antic 1.0.1 for the Fedora Linux distribution. The build succeeded on every 64-bit architecture, but tests failed on both 32-bit architectures (i686 and ARM). In both cases, test-suite.log shows the following:
GDB shows that when this test fails, the value of b is -2147483648; i.e., the most negative integer, and the only integer besides zero that is the negation of itself. Let me know if I can provide any other information.