Hi,
The test case files contain binary data, they are not
human-readable in general. For example, if you give a jpeg image
reader a symbolic file, at the end of the execution, the test case
will contain some image date that satisfies the path constraints
when the program terminated.
Vitaly
--
--
You received this message because you are a member of the S2E Developer Forum.
To post to this group, send email to s2e...@googlegroups.com
To unsubscribe from this group, send email to s2e-dev+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/s2e-dev
---
You received this message because you are subscribed to the Google Groups "S2E Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to s2e-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/97298a85-c97b-4f36-adee-c21781797403n%40googlegroups.com.
Hi,
Thank you for the explanation. But, my question is, if I do not get the human/program readable concrete test case files, how do I validate my design executable? If I want to used these test cases generated by S2E as input seeds to my fuzz engine, what is the way out, as the testcases generated will not be recognized by the fuzzer?
Testcases generated by S2E are directly usable by the program.
If your program expects input in a file and you made that file
symbolic, S2E will generate a concrete file that you can directly
use as an input to the program to validate it.
Whether that test case contains human-readable or binary data
depends entirely on the program that you test.
So if you create a new project like this: s2e new_project
my_program @@
You can then validate the test case like that: ./my_program
test_case_file
Another query is, if I do not use symbolic file marker, rather I use an initial seed, in that case the testcases files are not produced. Then how do I get the testcases generated files? Do I need to get it manually from the ExecutionTracer.jason file? Will that be feasible?
Test cases will be produced as well. Please refer to [1] for
details.
You need to create your project like this: s2e new_project
my_program /path/to/seed/file/on/the/host
s2e_env will detect any argument that looks like a file path and
will automatically use it as a seed.
You will need to edit the .symranges file to specify which part of
the file to make symbolic.
Is there any other usage of "tbcoverage-0.json" file rather than generating the coverage info by S2E?
Currently, no.
Vitaly
[1]
http://s2e.systems/docs/Tutorials/BasicLinuxSymbex/s2e.so.html?highlight=seed
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/0b2a4f4b-4617-497f-b15a-aeaf8c2b7c4bn%40googlegroups.com.
Hi,
The symranges file contains an example:
# This file specifies offset-size pairs to make symbolic
# 0-0
So if you want to make the 10th and 11th bytes symbolic, write
this:
10-2
You can have multiple lines with different ranges.
Vitaly
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/7ea38537-6e92-42e3-9aa0-81ae52ed72a5n%40googlegroups.com.
Hi,
Now I want to make the content of each line of the the file, i.e all the numbers as symbolic, So, how do I specify in the symranges file? I tried as follows:
0-20-20-2
This will make the first 2 bytes of the file symbolic, 3 times.
The offset in the pair is relative to the first byte of the file.
.... and so on. This is only taking the data in the first line of the file as symbolic and generating the test cases but not working for the following lines. Can you tell me where I' am going wrong? I am a bit unsure on how to specify the bytes of a file.
There are two ways:
1. Just keep your original symranges. Your "11 22 33 44 55" is now
"11\n22\n33\n44\n55", so nothing really changes.
2. Add one range for each line, assuming your line has 2
characters and don't make the new line character symbolic.
0-2
3-2
6-2
etc.
Vitaly
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/89bbec09-ca73-4d52-855f-67164e15bb5cn%40googlegroups.com.
Hi,
A detailed explanation of how seed files work can be found here in the SeedSearcher section: http://s2e.systems/docs/Tutorials/PoV/index.html?highlight=seeds
Vitaly
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/5b8a50dd-554f-45bf-832b-00df77e0d47dn%40googlegroups.com.
You're welcome!
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/562e24c2-1d87-4187-ba24-ef89d322882cn%40googlegroups.com.
Hi,
You can use a symranges file to specify which part of the file to
make symbolic. You must create it yourself.
This file is optional, the error is benign.
Vitaly
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/fc7b9376-0ae7-40cd-ba6b-3cf051def01fn%40googlegroups.com.
Hi,
Could you please elaborate what you mean by brute force and
redundant test cases? In principle, S2E generates one test case
per execution path, i.e., one input per path. Brute forcing may
occasionally happen with symbolic pointers, if the fork on
symbolic address is enabled [1]. In this case, you may have
multiple inputs for the same path.
Vitaly
[1]
https://github.com/S2E/s2e/blob/master/libs2ecore/src/S2EExecutor.cpp#L111
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/f418e741-95d9-4d1c-b331-41b999d39698n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/7e686686-6fc5-4ea0-98e8-f32dc21ecb54n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/eae48c32-7894-4fa0-a3bc-e0970f71af41%40email.android.com.