I am also affected by this problem. It is an overflow check
using undefined behavior in an overflow check in test.c
that looks like "if (pe + SPINSZ > pe && pe != 0)"
but with >4G memory pe + SIINSZ wraps around.
I think the most simple fix would be the following:
Hi,
I am also affected by this problem. It is an overflow check
using undefined behavior in an overflow check in test.c
that looks like "if (pe + SPINSZ > pe && pe != 0)"
but with >4G memory pe + SIINSZ wraps around.
I think the most simple fix would be the following:
2020-12-15 Bernd Edlinger <email address hidden>
* Makefile: Use -fwrapv-pointer for test.c.
diff -u memtest86+ -5.01.orig/ Makefile memtest86+ -5.01/Makefile -5.01.orig/ Makefile 2020-12-15 06:50:42.000000000 +0100 -5.01/Makefile 2020-12-15 06:54:08.941390803 +0100 aliasing reloc.c
--- memtest86+
+++ memtest86+
@@ -58,7 +58,8 @@
$(CC) -c $(CFLAGS) -fno-strict-
test.o: test.c frame-pointer -fno-builtin -ffreestanding test.c frame-pointer -fno-builtin \
- $(CC) -c -Wall -march=i486 -m32 -O0 -fomit-
+ $(CC) -c -Wall -march=i486 -m32 -O0 -fomit-
+ -ffreestanding -fwrapv-pointer test.c
random.o: random.c frame-pointer -fno-builtin -ffreestanding random.c
$(CC) -c -Wall -march=i486 -m32 -O3 -fomit-