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

test failed #22

Open
lz1159435992 opened this issue Sep 20, 2023 · 6 comments
Open

test failed #22

lz1159435992 opened this issue Sep 20, 2023 · 6 comments

Comments

@lz1159435992
Copy link

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
Copy link

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
Copy link
Contributor

chenju2k6 commented Sep 26, 2023

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

@chenju2k6
Copy link
Contributor

chenju2k6 commented Sep 26, 2023

Looks like compiling C programs needs libunwind library. I just submitted a PR #23 which installs libunwind-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
Copy link
Author

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
Copy link
Collaborator

you can check the failure details by using lit -v

@mingjun97
Copy link
Contributor

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.

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

5 participants