R-Fuzz / symsan

A LLVM Sanitizer for Symbolic Tracing
Apache License 2.0
206 stars 29 forks source link

test failed #22

Open lz1159435992 opened 1 year ago

lz1159435992 commented 1 year ago

I have configured the symsan environment in two virtual machines. When I conducted the final test, all test cases in one of the virtual machines failed, while only three of them passed in the other. I don't know if this is a normal phenomenon.

003039c6bebd47c16a3408d14c3eae9 69e471723095c5e9532d99fc8959b97

If this is abnormal, where should I check?

yagol2020 commented 1 year ago

I've configured the environment of SYMSAN similarly to your Figure 1. While I managed to pass 3 test cases, and failures in 21. I think this is not right, perhaps some configuration are not set properly. Have you been able to find a solution for this issue? @lz1159435992 @chenju2k6 @ChengyuSong

chenju2k6 commented 1 year ago

I can reproduce the issue. Looks like all cpp tests pass but all c test failed. Let me figure out why.

chenju2k6 commented 1 year ago

Looks like compiling C programs needs libunwind library. I just submitted a PR #23 which installslibunwind-dev in the docker containers.

If you are testing with docker with the single line fix in this PR #23 , you should be able to see 25 out 26 tests pass. See my results as below:

-- Testing: 26 tests, 26 workers --
FAIL: SymSan :: bitflip/bitflip.c (1 of 26)
PASS: SymSan :: unaligned_load.c (2 of 26)
PASS: SymSan :: shift_and.c (3 of 26)
PASS: SymSan :: sign.c (4 of 26)
PASS: SymSan :: cf1.c (5 of 26)
PASS: SymSan :: call_fn2.c (6 of 26)
PASS: SymSan :: call_fn3.c (7 of 26)
PASS: SymSan :: memcmp.c (8 of 26)
PASS: SymSan :: pointer.c (9 of 26)
PASS: SymSan :: bitflip.c (10 of 26)
PASS: SymSan :: strcmp2.c (11 of 26)
PASS: SymSan :: if_eq.c (12 of 26)
PASS: SymSan :: partial_concrete.c (13 of 26)
PASS: SymSan :: infer_type.c (14 of 26)
PASS: SymSan :: mini.c (15 of 26)
PASS: SymSan :: call_fn.c (16 of 26)
PASS: SymSan :: gep.c (17 of 26)
PASS: SymSan :: strcmp.c (18 of 26)
PASS: SymSan :: switch.c (19 of 26)
PASS: SymSan :: bool.c (20 of 26)
PASS: SymSan :: mini2.c (21 of 26)
PASS: SymSan :: context.c (22 of 26)
PASS: SymSan :: aggregate.c (23 of 26)
PASS: SymSan :: cpp_string.cpp (24 of 26)
PASS: SymSan :: cpp_map.cpp (25 of 26)
PASS: SymSan :: cpp_fstream.cpp (26 of 26)
********************
Failed Tests (1):
  SymSan :: bitflip/bitflip.c

Testing Time: 1.63s
  Passed: 25
  Failed:  1

If you are testing on Ubuntu, you can probably fix the issue by

apt install libunwind-dev

I will check why bitflip fails the test.

lz1159435992 commented 1 year ago

After installinglibunwind-dev, all 24 test cases in one of the virtual machines passed, while all of them still failed in the other virtual machine. It seems that there might be some issues with my compilation configuration.

ChengyuSong commented 1 year ago

you can check the failure details by using lit -v

mingjun97 commented 6 months ago

Reproduce the same issue on ubuntu 20.04.

lit tests -v reports it cannot find libunwind.so.1.

Run the following commands:

ls /usr/lib/x86_64-linux-gnu/libunwind.*

From the output, /usr/lib/x86_64-linux-gnu/libunwind.so /usr/lib/x86_64-linux-gnu/libunwind.so.8 presents but no /usr/lib/x86_64-linux-gnu/libunwind.so.1

Workaround:

cd /usr/lib/x86_64-linux-gnu/
ln -s libunwind.so.8 libunwind.so.1

This will create a symbol link for libunwind.so.1 point to libunwind.so.8 which will solve the issue.