sfu-rsl / symrustc

SymRustC is a hybrid fuzzer for Rust combining concolic execution using SymCC and fuzzing using LibAFL.
9 stars 2 forks source link

Dockerfile improvements #3

Open momvart opened 2 years ago

momvart commented 2 years ago

Here's a list of changes that I think would improve the readability of the Dockerfile.

tuong commented 1 year ago

We can omit this condition because it simply does nothing if there's no submodule. In addition, it is true for both cases of the proceeding statements. https://github.com/sfu-rsl/symrustc/blob/d7bfc86de417da8d1e7167081ed4cd20c6a97415/generated/Dockerfile#L81

Most of the time, I run build_all.sh ( https://github.com/sfu-rsl/symrustc/blob/d7bfc86de417da8d1e7167081ed4cd20c6a97415/build_all.sh ) to build everything. However there is also build_rustc.sh that can be used as an alternative ( https://github.com/sfu-rsl/symrustc/blob/d7bfc86de417da8d1e7167081ed4cd20c6a97415/build_rustc.sh ). The above condition is to detect in which situation we are running the build, in particular SYMRUSTC_RUST_VERSION is set to some specific value in the latter script, whereas it is not set in build_all.sh.

Can't we use ~ in this case? Using $HOME is a little confusing as we have used ~ so far. https://github.com/sfu-rsl/symrustc/blob/d7bfc86de417da8d1e7167081ed4cd20c6a97415/generated/Dockerfile#L195

I would have wished also, but at the time of writing the current semantics of a Dockerfile is to not expand ~, at least inside a COPY command.

Do we build anything in this layer? It seems to be just copying so can be merged with the previous layer. https://github.com/sfu-rsl/symrustc/blob/d7bfc86de417da8d1e7167081ed4cd20c6a97415/generated/Dockerfile#L233-L241

Here I was separating the build process with content that might be less generic. In the future, belcarra_source/examples may not be provided as part of SymRustC...

tuong commented 1 year ago

At the time of writing, here is the organization of branches:

In addition, branches starting with no_insert/ and appended with an element of $versions1 are also stable.

tuong commented 1 year ago

Some notes regarding the workflow: