Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Werror=strict-overflow] #163

Closed
tpgxyz opened this issue Nov 11, 2022 · 7 comments

Comments

@tpgxyz
Copy link

tpgxyz commented Nov 11, 2022

Hi, compiling latest 4.3.30 and got this error:

/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I/builddir/build/BUILD/libxcrypt-4.4.30  -I/builddir/build/BUILD/libxcrypt-4.4.30/lib -DIN_LIBCRYPT  -Wall -Wextra -Walloc-zero -Walloca -Wbad-function-cast -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation=1 -Wlogical-op -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnull-dereference -Wold-style-definition -Wpointer-arith -Wrestrict -Wshadow -Wstrict-overflow=2 -Wstrict-prototypes -Wundef -Wvla -Wwrite-strings -Wpedantic -Werror -fno-plt -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -mtune=generic -O3 -falign-functions=32 -fno-math-errno -fno-trapping-math -fno-strict-aliasing -fPIC -Wno-gnu-statement-expression -m32 -c -o lib/libcrypt_la-crypt-des.lo `test -f 'lib/crypt-des.c' || echo '/builddir/build/BUILD/libxcrypt-4.4.30/'`lib/crypt-des.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/builddir/build/BUILD/libxcrypt-4.4.30 -I/builddir/build/BUILD/libxcrypt-4.4.30/lib -DIN_LIBCRYPT -Wall -Wextra -Walloc-zero -Walloca -Wbad-function-cast -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation=1 -Wlogical-op -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnull-dereference -Wold-style-definition -Wpointer-arith -Wrestrict -Wshadow -Wstrict-overflow=2 -Wstrict-prototypes -Wundef -Wvla -Wwrite-strings -Wpedantic -Werror -fno-plt -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -mtune=generic -O3 -falign-functions=32 -fno-math-errno -fno-trapping-math -fno-strict-aliasing -fPIC -Wno-gnu-statement-expression -m32 -c /builddir/build/BUILD/libxcrypt-4.4.30/lib/crypt-des.c  -fPIC -DPIC -o lib/.libs/libcrypt_la-crypt-des.o
make[1]: Leaving directory '/builddir/build/BUILD/libxcrypt-4.4.30/build32'
/builddir/build/BUILD/libxcrypt-4.4.30/lib/crypt-des.c: In function 'des_gen_hash':
/builddir/build/BUILD/libxcrypt-4.4.30/lib/crypt-des.c:127:10: error: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Werror=strict-overflow]
  127 |       if (sptr >= end)
      |          ^
/builddir/build/BUILD/libxcrypt-4.4.30/lib/crypt-des.c:127:10: error: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Werror=strict-overflow]
At top level:
cc1: note: unrecognized command-line option '-Wno-gnu-statement-expression' may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
make[1]: *** [Makefile:2029: lib/libcrypt_la-crypt-des.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
@thesamesam
Copy link

thesamesam commented Nov 11, 2022

See #162 and its duplicates. It's fixed in master.

@besser82 I suspect we may want a new release for these 😄.

Oh wait, it's a different file?

@tpgxyz
Copy link
Author

tpgxyz commented Nov 11, 2022

Forgot to mention that i'm building with upstream commits on top of 4.3.30

Full build logs are available here https://abf.openmandriva.org/build_lists/249660

@thesamesam
Copy link

thesamesam commented Nov 11, 2022

Ah, thanks. See also #155.

@tpgxyz
Copy link
Author

tpgxyz commented Nov 11, 2022

I'm already on gcc-12.2.x and that issues occurs.

[tpg@omv-rockpro64 /]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-openmandriva-linux-gnu/12.2.0/lto-wrapper
Target: aarch64-openmandriva-linux-gnu
Configured with: ../configure --prefix=/usr --libexecdir=/usr/libexec --libdir=/usr/lib64 --with-slibdir=/usr/lib64 --mandir=/usr/share/man --infodir=/usr/share/info --with-cloog --with-ppl --disable-libmpx --enable-cloog-backend=isl --disable-cloog-version-check --disable-isl-version-check --disable-libquadmath --disable-libquadmath-support --disable-libssp --disable-werror --enable-__cxa_atexit --enable-gold=default --with-plugin-ld=/usr/bin/aarch64-openmandriva-linux-gnu-ld.bfd --enable-bootstrap --enable-checking=release --enable-gnu-unique-object --enable-gnu-indirect-function --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-linker-build-id --enable-plugin --enable-shared --enable-libcc1 --enable-lto --enable-libatomic --enable-threads=posix --enable-shared --enable-static --with-system-zlib --with-bugurl=https://issues.openmandriva.org --disable-multilib --host=aarch64-openmandriva-linux-gnu --build=aarch64-openmandriva-linux-gnu --with-glibc-version=2.32
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 20220819 (OpenMandriva) (GCC)

@besser82
Copy link
Owner

besser82 commented Nov 12, 2022

@tpgxyz, can you please check, if 502c671 will solve your issue?

tpgxyz added a commit to OpenMandrivaAssociation/libxcrypt that referenced this issue Nov 13, 2022
@tpgxyz
Copy link
Author

tpgxyz commented Nov 13, 2022

Issue closed with 502c671

@tpgxyz tpgxyz closed this as completed Nov 13, 2022
@besser82
Copy link
Owner

Fixed in release v4.4.31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants