GithubHelp home page GithubHelp logo

Comments (7)

mdb256 avatar mdb256 commented on June 14, 2024

To summarise: you've built the Hyperscan library on a machine with the AVX2 microarchitecture, and then used that binary on a machine that only has SSE4.2/POPCNT, and hit an illegal instruction while compiling a pattern.

I cannot tell how you have built the library, but I don't think the fat runtime option has been enabled.

Is it a Release or RelWithDebInfo build, or a Debug build? The fat runtime is only enabled by default for Release/RelWithDebInfo builds. For debug and other builds, we default to building for the host platform using -march=native. More importantly, in a fat runtime build, the compiler part of the HS library is built without a -march target so that it can run anywhere.

To force the fat runtime, enable FAT_RUNTIME in the CMake config.

from hyperscan.

TidyHuang avatar TidyHuang commented on June 14, 2024

Thanks Mdb256, I firstly built with Release version and found a illegal instruction, but can't get detail information for the core information. So then I built a debug version to get detail core information.

-Tidy

from hyperscan.

TidyHuang avatar TidyHuang commented on June 14, 2024

@mdb256 , if the binary process built with -march=native but hs shared library built with Release version, will cause illegal instruction coredump.

from hyperscan.

TidyHuang avatar TidyHuang commented on June 14, 2024

built with release flag and binary process built without -march=native, will also trigger illegal instruction.

./CMakeFiles/CMakeOutput.log:59:Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux

from hyperscan.

TidyHuang avatar TidyHuang commented on June 14, 2024

build log FAT_RUNTIME is off for release version, is it right
"./cbuild/libhs-prefix/src/libhs-build/CMakeCache.txt:180:FAT_RUNTIME:BOOL=OFF
./cbuild/libhs-prefix/src/libhs-build/config.h:19:/* #undef FAT_RUNTIME */

from hyperscan.

mdb256 avatar mdb256 commented on June 14, 2024

If you've configured Hyperscan from scratch as a release build, then FAT_RUNTIME should be on. So you could try changing it to on and then rebuilding. CMake should pick up the change and reconfigure the build.

The only reason it might not be set is if a prerequisite has failed in previous checks, but it should be ok with gcc-4.8

from hyperscan.

TidyHuang avatar TidyHuang commented on June 14, 2024

it works and FAT_RUNTIME is on now, the binary program linked the lib also needed without -march=native

from hyperscan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.