Skip to content

Improved Constraints Dumping Feature #3

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SonicStark
Copy link

Now the features about Constraints Dumping have been improved.

  • Switch to more stable and safer implementation which receives constraint strings and sends them to the file specified in TAINT_OPTIONS by user.
  • More friendly and practical README for users who need this feature.

😄Hope that'll help to you guys.

CHANGES:beginner:

:bulb: build.sh
 - Use BUILD_TYPE to control which feature will be deployed.
 - Wrong or unspecified will raise error.

:bulb: CMakeLists.txt
 - New interface to control how the features about constraints dumping be deployed.
 - The code controlled by the newly added is all located in dfsan.cc

:bulb: dfsan_flags.inc
 - Add new DFSan runtime flag to indicate where to dump the branch condition.
 - Considering its practical significance, it is not defined in sanitizer_flags.inc

:bulb: dfsan.cc
 - Switch to using macro for controlling the feature.
 - Recover missing call of __sanitizer_set_*_path. Similar calls can be found in llvm-project at ubsan/ubsan_init.cpp, lsan/lsan.cpp, lsan/lsan.cpp, msan/msan.cpp, tsan/rtl/tsan_rtl.cpp and asan/asan_rtl.cpp, but are missing here.
 - Recover missing call of CacheBinaryName. The call is necessary otherwise GetProcessName always gives a "".

:bulb: sanitizer_common.h
 - Declare ExtWrite defined in sanitizer_file.cc
 - Declare DmpExt defined in sanitizer_printf.cc

:bulb: sanitizer_printf.cc
 - Define DmpExt to printf extra things needed.
 - Insert new parameter is_extra in SharedPrintfCode and SharedPrintfCodeNoBuffer for sharing some intermediate processes between DmpExt, Printf and Report.

:bulb: sanitizer_file.cc :curly_loop: sanitizer_file.h
 - Just like an imitation show:neutral_face:. Add a new ReportFile object to provide an additional place for write extra things in.
 - Add __sanitizer_set_extfile_path for setting file path for the newly added.

:bulb: sanitizer_interface_internal.h :curly_loop: sanitizer_common_interface.inc :curly_loop: common_interface_defs.h :curly_loop: libclang_rt.dfsan-x86_64.a.syms
 - Add necessary declaration and some docs just like __sanitizer_set_report_path

:bulb: sanitizer_fuchsia.cc
 - Add __sanitizer_set_extfile_path here just because __sanitizer_set_report_path is here, too.
 - README.md:  A more useful version
 - build.sh:  Move un-easy scripts outside and avoid accidental interruption due to missing sudo
 - install_llvm.sh:  Use proper llvm version
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

Successfully merging this pull request may close these issues.

1 participant