eurecom-s3 / symcc

SymCC: efficient compiler-based symbolic execution
http://www.s3.eurecom.fr/tools/symbolic_execution/symcc.html
GNU General Public License v3.0
773 stars 135 forks source link

Tests fail when ntohl contains inline assembly #29

Closed wuruoyu closed 3 years ago

wuruoyu commented 3 years ago

Hi,

When building and checking with ninja check, it shows that 8 cases fail. It is weird since it works perfectly months ago and I follow the exact same building script. Could you help me check the possible issue?

I build the symcc with these commands and outputs:

CC=clang-10 CXX=clang++-10 cmake -G Ninja -DQSYM_BACKEND=OFF . 

-- The C compiler identification is Clang 10.0.0
-- The CXX compiler identification is Clang 10.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang-10 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++-10 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found LLVM 10.0.0
-- Using LLVMConfig.cmake from /usr/lib/llvm-10/cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ruoyu/third_lib/symcc

And then ninja check: ninja check output.txt

Thank you in advance!

sebastianpoeplau commented 3 years ago

Hi @wuruoyu,

I think this is the same issue as the one we had with the Dockerfile (#22). The tl;dr is that the tests have been adjusted to work on big-endian systems, which unfortunately makes them fail on some little-endian ones. But it's only the tests - most normal code shouldn't be affected. (Your system's version of the ntohl function, which is used in the tests, likely translates to inline assembly, which SymCC doesn't understand. We should really find a better way to make the tests work independently of endianness...)

Hope this helps :)

wuruoyu commented 3 years ago

I notice that ntohl function in the test case. Thank you!