vlc arguments are passed by environment variable in order to don't mess
libfuzzer arguments handling:
- "VLC_TARGET" to pass the target name (or demux name).
- "V" to specify the verbose level.
DIR is the dir path of the libFuzzer.a static library.
When used, it forces a static build without vlc binary and enable sanitize
coverage.
How to fetch and build libFuzzer.a from llvm.org:
$ git clone https://git.llvm.org/git/compiler-rt
$ cd compiler-rt/lib/fuzzer
for gcc:
$ CXX=g++ ./build.sh
for clang:
$ ./build.sh
This a partial merge of the work done by Shaleen during GSOC 2017. See
https://code.videolan.org/GSoC2017/shalzz/vlc.git
- don't match 2 possible slaves between each others
- The slave name len should not be twice longer than the item name len.
(avoid matching "2016 - blabla.aac" with "20.mkv" for example)
The matching algorithm is still quite dumb and far from perfect. We should
detect item as slaves only if they have a language indication in their path
name.
Fixes#18913
This includes support for statically linked plugins. It vastly increases
the test iteration speed, which is critical for fuzz testing.
Furthermore, it is necessary for coverage-driven fuzz testing to work at
all.
This also provides a (manually compiled only) back-end for LLVM's
LibFuzzer using mostly the same code.
1) Debugging, regression testing or unguided fuzzing:
- Make a normal build (debug and sanitization recommended).
- Execute: "test/vlc-demux-run [demux name] <file path>"
2) American Fuzzy Lop run:
- Make a *static* build with AFL as the toolchain.
- (Where applicable) perform adequate religious luck granting
offerings or other rites.
- Run AFL with test/vlc-demux-run as the fuzzed executable.
3) LibFuzzer:
- Make a preferrably static build with Clang as the toolchain.
- Manually build test/vlc-demux-libfuzzer.
- Run the executable with the LibFuzzer command line parameters syntax.
This adds transitional vlc_tls_ServerSessionCreateFD() helper for
compatiblity. This is only to maintain sequential builds. The helper
will be removed shortly.
The function does not open MRLs, as correctly described in its
documentation, as such it is rather unfortunate that its name uses MRL
instead of URL (especially given that it cannot handle MRLs).
These changes are simply renaming all occurrences of the function, so
that the behavior of the function is properly reflected by its name.
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
On Apple platforms, ALPN does not work as securetransport does
not provide any public API for that. So do not check for that
feature until support is added.