Skip to content

Commit

Permalink
i#1734 Create Dr. Fuzz: add exception API
Browse files Browse the repository at this point in the history
This CL adds the exception API, along with a
general iterator for walking the set of fuzz
targets currently live on the call stack.
It also adds a single-threaded test of the
new fault handling API, and the Dr. Fuzz
entries in the doxygen tree.

Review-URL: https://codereview.appspot.com/257120043
  • Loading branch information
Byron Hawkins committed Aug 12, 2015
1 parent 74936bf commit 32827fa
Show file tree
Hide file tree
Showing 15 changed files with 1,293 additions and 91 deletions.
2 changes: 1 addition & 1 deletion common/utils.h
Expand Up @@ -939,7 +939,7 @@ heap_dump_stats(file_t f);
char *
drmem_strdup(const char *src, heapstat_t type);

/* note: Guarantees that even if src overflows n, the allocated buffer will be
/* note: Guarantees that even if src overflows max, the allocated buffer will be
* large enough for max characters plus the null-terminator.
*/
char *
Expand Down
4 changes: 3 additions & 1 deletion docs/CMakeLists.txt
Expand Up @@ -61,6 +61,7 @@ set(headers
${PROJECT_SOURCE_DIR}/drsyscall/drsyscall.h
${PROJECT_SOURCE_DIR}/drsymcache/drsymcache.h
${PROJECT_SOURCE_DIR}/umbra/umbra.h
${PROJECT_SOURCE_DIR}/drfuzz/drfuzz.h
${PROJECT_SOURCE_DIR}/framework/public.h)

# some defines are set by DR config files so we must add here
Expand Down Expand Up @@ -104,7 +105,8 @@ add_custom_command(
# When adding new DRMF extension docs, also add to Doxyfile.in and to
# DR's api/docs/ext.gendox.
ARGS -D srcdir=${PROJECT_SOURCE_DIR}/${tooldir}/docs
-D srclist=${PROJECT_SOURCE_DIR}/framework/drmf.dox\;${PROJECT_SOURCE_DIR}/drsyscall/drsyscall.dox\;${PROJECT_SOURCE_DIR}/drsymcache/drsymcache.dox\;${PROJECT_SOURCE_DIR}/umbra/umbra.dox
-D
srclist=${PROJECT_SOURCE_DIR}/framework/drmf.dox\;${PROJECT_SOURCE_DIR}/drsyscall/drsyscall.dox\;${PROJECT_SOURCE_DIR}/drsymcache/drsymcache.dox\;${PROJECT_SOURCE_DIR}/umbra/umbra.dox\;${PROJECT_SOURCE_DIR}/drfuzz/drfuzz.dox
-Dcommondir=${CMAKE_CURRENT_SOURCE_DIR}
-Doutfile=${doxyfile}
-Dversion_number=${TOOL_VERSION_NUMBER}
Expand Down
2 changes: 1 addition & 1 deletion docs/CMake_doxyfile.cmake
Expand Up @@ -205,7 +205,7 @@ if (PACKAGED_WITH_DYNAMORIO)
endif()

# XXX: share w/ list of source paths in CMakeLists.txt ${headers}
set(headers "${commondir}/../drsyscall/drsyscall.h ${commondir}/../umbra/umbra.h")
set(headers "${commondir}/../drsyscall/drsyscall.h ${commondir}/../umbra/umbra.h ${commondir}/../drfuzz/drfuzz.h")
set(headers "${headers} ${commondir}/../drsymcache/drsymcache.h")
set(headers "${headers} ${outdir}/../drmf/include/drmemory_framework.h")
if (TOOL_DR_MEMORY)
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile.in
Expand Up @@ -106,7 +106,7 @@ WARN_LOGFILE =
# to DR's api/docs/ext.gendox.
INPUT = using.dox \
options-docs.dox release.dox main.dox \
drmf.dox drsyscall.dox drsymcache.dox umbra.dox
drmf.dox drsyscall.dox drsymcache.dox umbra.dox drfuzz.dox
FILE_PATTERNS =
RECURSIVE = NO
EXCLUDE =
Expand Down
4 changes: 4 additions & 0 deletions drfuzz/CMakeLists.txt
Expand Up @@ -51,6 +51,10 @@ if (WIN32)
set(DEFINES_NO_D ${DEFINES_NO_D} RC_IS_DRFUZZ)
endif ()

# We set DR libc option on b/c this is needed to link with drsyms_static
# on VS2010. It has a downside of increase in pdb and dll size (xref DRi#714).
set(DynamoRIO_USE_LIBC ON)

macro(configure_drfuzz_target target drwrap drmgr drsyms)
use_DynamoRIO_extension(drfuzz ${drwrap})
use_DynamoRIO_extension(drfuzz ${drmgr})
Expand Down

0 comments on commit 32827fa

Please sign in to comment.