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

hyperscan fails to compile with gcc-10.1.0 #239

Closed
arkamar opened this issue May 14, 2020 · 2 comments
Closed

hyperscan fails to compile with gcc-10.1.0 #239

arkamar opened this issue May 14, 2020 · 2 comments

Comments

@arkamar
Copy link
Contributor

arkamar commented May 14, 2020

I cannot compile hyperscan with gcc-10.1.0. It fails with following error

[36/340] /usr/bin/gcc-10.1.0  -I. -I/var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1 -I/var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src -isystem /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/include  -pipe -march=native -mssse3 -mavx2  -O3 -std=c99 -Wall -Wextra -Wshadow -Wcast-qual -fno-strict-aliasing -Werror -Wno-array-bounds -Wno-maybe-uninitialized -Wno-abi -fno-omit-frame-pointer -Wvla -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes  -fPIC -MD -MT CMakeFiles/hs_exec_shared.dir/src/rose/stream.c.o -MF CMakeFiles/hs_exec_shared.dir/src/rose/stream.c.o.d -o CMakeFiles/hs_exec_shared.dir/src/rose/stream.c.o -c /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/rose/stream.c
FAILED: CMakeFiles/hs_exec_shared.dir/src/rose/stream.c.o 
/usr/bin/gcc-10.1.0  -I. -I/var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1 -I/var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src -isystem /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/include  -pipe -march=native -mssse3 -mavx2  -O3 -std=c99 -Wall -Wextra -Wshadow -Wcast-qual -fno-strict-aliasing -Werror -Wno-array-bounds -Wno-maybe-uninitialized -Wno-abi -fno-omit-frame-pointer -Wvla -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes  -fPIC -MD -MT CMakeFiles/hs_exec_shared.dir/src/rose/stream.c.o -MF CMakeFiles/hs_exec_shared.dir/src/rose/stream.c.o.d -o CMakeFiles/hs_exec_shared.dir/src/rose/stream.c.o -c /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/rose/stream.c
In file included from /usr/lib/gcc/x86_64-gentoo-linux-musl/10.1.0/include/immintrin.h:51,
                 from /usr/lib/gcc/x86_64-gentoo-linux-musl/10.1.0/include/x86intrin.h:32,
                 from /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/util/intrinsics.h:59,
                 from /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/util/simd_types.h:34,
                 from /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/ue2common.h:78,
                 from /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/hwlm/hwlm.h:36,
                 from /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/rose/catchup.h:51,
                 from /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/rose/stream.c:29:
In function ‘_mm256_storeu_si256’,
    inlined from ‘copy_upto_32_bytes’ at /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/util/simd_utils.h:610:5,
    inlined from ‘prepScanBuffer’ at /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/rose/stream_long_lit.h:209:13,
    inlined from ‘storeLongLiteralState’ at /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/rose/stream_long_lit.h:349:30,
    inlined from ‘ensureStreamNeatAndTidy’ at /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/rose/stream.c:411:5,
    inlined from ‘roseStreamExec’ at /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/rose/stream.c:676:9:
/usr/lib/gcc/x86_64-gentoo-linux-musl/10.1.0/include/avxintrin.h:928:8: error: writing 32 bytes into a region of size 24 [-Werror=stringop-overflow=]
  928 |   *__P = __A;
      |   ~~~~~^~~~~
In file included from /var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/rose/stream.c:37:
/var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/rose/stream.c: In function ‘roseStreamExec’:
/var/tmp/portage/dev-libs/hyperscan-5.2.1-r2/work/hyperscan-5.2.1/src/rose/stream_long_lit.h:348:12: note: at offset 0 to object ‘tempbuf’ with size 24 declared here
  348 |         u8 tempbuf[LONG_LIT_HASH_LEN];
      |            ^~~~~~~
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.
@xiangwang1
Copy link
Contributor

These are false positives generated by GCC-10 - our code logic guarantees that these situations won't happen. We'll work out a fix for this. Thanks.

arkamar added a commit to arkamar/gentoo that referenced this issue May 15, 2020
CMAKE_BUILD_TYPE=Release disables -Werror flag which used to trigger
false positive error in GCC-10.

intel/hyperscan#239

Closes: https://bugs.gentoo.org/722802
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
Nor7th pushed a commit that referenced this issue May 25, 2020
arkamar added a commit to arkamar/gentoo that referenced this issue Jun 3, 2020
CMAKE_BUILD_TYPE=Release disables -Werror flag which used to trigger
false positive error in GCC-10.

intel/hyperscan#239

Closes: https://bugs.gentoo.org/722802
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
@arkamar
Copy link
Contributor Author

arkamar commented Jun 8, 2020

Thank you for fixing this in 5.3.0!

@arkamar arkamar closed this as completed Jun 8, 2020
arkamar added a commit to arkamar/gentoo that referenced this issue Jun 8, 2020
* support non-English locales; The patch is taken from
  intel/hyperscan#217 (comment)
* respect cpu_flags_x86 USE flags
* respect -O flags
* set release build type; CMAKE_BUILD_TYPE=Release disables -Werror flag
  which used to trigger false positive error in GCC-10.
  intel/hyperscan#239

Closes: https://bugs.gentoo.org/674218
Closes: https://bugs.gentoo.org/707486
Closes: https://bugs.gentoo.org/722802
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Jun 10, 2020
* support non-English locales; The patch is taken from
  intel/hyperscan#217 (comment)
* respect cpu_flags_x86 USE flags
* respect -O flags
* set release build type; CMAKE_BUILD_TYPE=Release disables -Werror flag
  which used to trigger false positive error in GCC-10.
  intel/hyperscan#239

Closes: https://bugs.gentoo.org/674218
Closes: https://bugs.gentoo.org/707486
Closes: https://bugs.gentoo.org/722802
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
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

2 participants