googleprojectzero / fuzzilli

A JavaScript Engine Fuzzer
Apache License 2.0
1.89k stars 306 forks source link

An error while running './fuzzbuild.sh' #54

Closed ty5491003 closed 4 years ago

ty5491003 commented 4 years ago

My platform is Ubuntu16.04, and i met an error while running './fuzzbuild.sh'. The info are as follows:

(base) xibeiidaxue@xibeiidaxue-X299-WU8:webkit$ ./fuzzbuild.sh
+  cmake -DPORT="JSCOnly" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -G Ninja -DDEVELOPER_MODE=ON -DENABLE_STATIC_JSC=ON -DCMAKE_C_COMPILER='/usr/bin/clang' -DCMAKE_CXX_COMPILER='/usr/bin/clang++' -DCMAKE_CXX_FLAGS='-fsanitize-coverage=trace-pc-guard -O3 -lrt'  -DENABLE_FTL_JIT=ON "/home/xibeiidaxue/ty/webkit"
-- The C compiler identification is Clang 4.0.0
-- The CXX compiler identification is Clang 4.0.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CMake build type is: Debug
-- Found Perl: /usr/bin/perl (found suitable version "5.22.1", minimum required is "5.10.0")
-- Found PerlModules_JSON::PP: TRUE
-- Found PerlModules: TRUE  found components:  JSON::PP
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.12", minimum required is "2.7.0")
-- Could NOT find Ruby (missing: RUBY_INCLUDE_DIR RUBY_LIBRARY RUBY_CONFIG_INCLUDE_DIR) (found suitable version "2.3.0", minimum required is "1.9")
-- Performing Test C_COMPILER_SUPPORTS_-fno-strict-aliasing
-- Performing Test C_COMPILER_SUPPORTS_-fno-strict-aliasing - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-fno-strict-aliasing
-- Performing Test CXX_COMPILER_SUPPORTS_-fno-strict-aliasing - Success
-- Performing Test C_COMPILER_SUPPORTS_-fno-exceptions
-- Performing Test C_COMPILER_SUPPORTS_-fno-exceptions - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-fno-exceptions
-- Performing Test CXX_COMPILER_SUPPORTS_-fno-exceptions - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-fno-rtti
-- Performing Test CXX_COMPILER_SUPPORTS_-fno-rtti - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wcast-align
-- Performing Test C_COMPILER_SUPPORTS_-Wcast-align - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wformat-security
-- Performing Test C_COMPILER_SUPPORTS_-Wformat-security - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wmissing-format-attribute
-- Performing Test C_COMPILER_SUPPORTS_-Wmissing-format-attribute - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wpointer-arith
-- Performing Test C_COMPILER_SUPPORTS_-Wpointer-arith - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wundef
-- Performing Test C_COMPILER_SUPPORTS_-Wundef - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wwrite-strings
-- Performing Test C_COMPILER_SUPPORTS_-Wwrite-strings - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wcast-align
-- Performing Test CXX_COMPILER_SUPPORTS_-Wcast-align - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wformat-security
-- Performing Test CXX_COMPILER_SUPPORTS_-Wformat-security - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wmissing-format-attribute
-- Performing Test CXX_COMPILER_SUPPORTS_-Wmissing-format-attribute - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wpointer-arith
-- Performing Test CXX_COMPILER_SUPPORTS_-Wpointer-arith - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wundef
-- Performing Test CXX_COMPILER_SUPPORTS_-Wundef - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wwrite-strings
-- Performing Test CXX_COMPILER_SUPPORTS_-Wwrite-strings - Success
-- Performing Test C_COMPILER_SUPPORTS_-Qunused-arguments
-- Performing Test C_COMPILER_SUPPORTS_-Qunused-arguments - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wno-maybe-uninitialized
-- Performing Test C_COMPILER_SUPPORTS_-Wno-maybe-uninitialized - Failed
-- Performing Test C_COMPILER_SUPPORTS_-Wno-noexcept-type
-- Performing Test C_COMPILER_SUPPORTS_-Wno-noexcept-type - Failed
-- Performing Test C_COMPILER_SUPPORTS_-Wno-parentheses-equality
-- Performing Test C_COMPILER_SUPPORTS_-Wno-parentheses-equality - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wno-psabi
-- Performing Test C_COMPILER_SUPPORTS_-Wno-psabi - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-Qunused-arguments
-- Performing Test CXX_COMPILER_SUPPORTS_-Qunused-arguments - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-maybe-uninitialized
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-maybe-uninitialized - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-noexcept-type
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-noexcept-type - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-parentheses-equality
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-parentheses-equality - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-psabi
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-psabi - Failed
-- Performing Test C_COMPILER_SUPPORTS_-Wall
-- Performing Test C_COMPILER_SUPPORTS_-Wall - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wextra
-- Performing Test C_COMPILER_SUPPORTS_-Wextra - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wall
-- Performing Test CXX_COMPILER_SUPPORTS_-Wall - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wextra
-- Performing Test CXX_COMPILER_SUPPORTS_-Wextra - Success
-- Performing Test C_COMPILER_SUPPORTS_-fcolor-diagnostics
-- Performing Test C_COMPILER_SUPPORTS_-fcolor-diagnostics - Success
-- Performing Test C_COMPILER_SUPPORTS_-fdiagnostics-color=always
-- Performing Test C_COMPILER_SUPPORTS_-fdiagnostics-color=always - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-fcolor-diagnostics
-- Performing Test CXX_COMPILER_SUPPORTS_-fcolor-diagnostics - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-fdiagnostics-color=always
-- Performing Test CXX_COMPILER_SUPPORTS_-fdiagnostics-color=always - Success
-- Performing Test ATOMIC_INT64_IS_BUILTIN
-- Performing Test ATOMIC_INT64_IS_BUILTIN - Failed
-- Performing Test ATOMIC_INT64_REQUIRES_LIBATOMIC
-- Performing Test ATOMIC_INT64_REQUIRES_LIBATOMIC - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_GSPLIT_DWARF
-- Performing Test CXX_COMPILER_SUPPORTS_GSPLIT_DWARF - Success
-- Looking for features.h
-- Looking for features.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for langinfo.h
-- Looking for langinfo.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for pthread_np.h
-- Looking for pthread_np.h - not found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/timeb.h
-- Looking for sys/timeb.h - found
-- Looking for linux/memfd.h
-- Looking for linux/memfd.h - found
-- Looking for _aligned_malloc
-- Looking for _aligned_malloc - not found
-- Looking for IsDebuggerPresent
-- Looking for IsDebuggerPresent - not found
-- Looking for localtime_r
-- Looking for localtime_r - found
-- Looking for malloc_trim
-- Looking for malloc_trim - found
-- Looking for strnstr
-- Looking for strnstr - not found
-- Looking for timegm
-- Looking for timegm - found
-- Looking for vasprintf
-- Looking for vasprintf - found
-- Looking for regexec
-- Looking for regexec - found
-- Looking for pthread_main_np
-- Looking for pthread_main_np - not found
-- Looking for SIGTRAP
-- Looking for SIGTRAP - found
-- Performing Test HAVE_STAT_BIRTHTIME_value
-- Performing Test HAVE_STAT_BIRTHTIME_value - Failed
-- Performing Test HAVE_TM_GMTOFF_value
-- Performing Test HAVE_TM_GMTOFF_value - Success
-- Performing Test HAVE_TM_ZONE_value
-- Performing Test HAVE_TM_ZONE_value - Success
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of __int128_t
-- Check size of __int128_t - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found the following ICU libraries:
--   data (required)
--   i18n (required)
--   uc (required)
-- Found ICU: /usr/include/x86_64-linux-gnu (found version "55.1")
-- Platform-specific CMakeLists not found: /home/xibeiidaxue/ty/webkit/Source/bmalloc/PlatformJSCOnly.cmake
-- Using platform-specific CMakeLists: /home/xibeiidaxue/ty/webkit/Source/WTF/wtf/PlatformJSCOnly.cmake
-- Using platform-specific CMakeLists: /home/xibeiidaxue/ty/webkit/Source/JavaScriptCore/PlatformJSCOnly.cmake
-- Performing Test CXX_COMPILER_SUPPORTS_-ffp-contract=off
-- Performing Test CXX_COMPILER_SUPPORTS_-ffp-contract=off - Success
-- Platform-specific CMakeLists not found: /home/xibeiidaxue/ty/webkit/Source/JavaScriptCore/shell/PlatformJSCOnly.cmake
-- Using source list file: Sources.txt
-- Platform-specific CMakeLists not found: /home/xibeiidaxue/ty/webkit/Source/ThirdParty/gtest/PlatformJSCOnly.cmake
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-undef
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-undef - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-stringop-truncation
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-stringop-truncation - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-suggest-attribute=format
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-suggest-attribute=format - Failed
-- Platform-specific CMakeLists not found: /home/xibeiidaxue/ty/webkit/Source/PlatformJSCOnly.cmake
-- Platform-specific CMakeLists not found: /home/xibeiidaxue/ty/webkit/Tools/PlatformJSCOnly.cmake
-- Using platform-specific CMakeLists: /home/xibeiidaxue/ty/webkit/Tools/TestWebKitAPI/PlatformJSCOnly.cmake
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-dangling-else
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-dangling-else - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-sign-compare
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-sign-compare - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-unused-parameter
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-unused-parameter - Success
-- Platform-specific CMakeLists not found: /home/xibeiidaxue/ty/webkit/PerformanceTests/MallocBench/MallocBench/PlatformJSCOnly.cmake
-- Platform-specific CMakeLists not found: /home/xibeiidaxue/ty/webkit/PerformanceTests/PlatformJSCOnly.cmake
-- Enabled features:
--  ENABLE_STATIC_JSC ............................. ON
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xibeiidaxue/ty/webkit/FuzzBuild/Debug
+  cmake --build FuzzBuild/Debug --config Debug -- jsc testb3 testair testapi testmasm testdfg -j16
[718/1496] Building CXX object Source/...sources/UnifiedSource-23a5fd0e-9.cpp.o
FAILED: /usr/bin/clang++  -DBUILDING_JSCONLY__ -DBUILDING_JavaScriptCore -DBUILDING_WITH_CMAKE=1 -DHAVE_CONFIG_H=1 -DSTATICALLY_LINKED_WITH_WTF -IDerivedSources/ForwardingHeaders -I. -I../../Source/JavaScriptCore -I../../Source/JavaScriptCore/API -I../../Source/JavaScriptCore/assembler -I../../Source/JavaScriptCore/b3 -I../../Source/JavaScriptCore/b3/air -I../../Source/JavaScriptCore/bindings -I../../Source/JavaScriptCore/builtins -I../../Source/JavaScriptCore/bytecode -I../../Source/JavaScriptCore/bytecompiler -I../../Source/JavaScriptCore/dfg -I../../Source/JavaScriptCore/disassembler -I../../Source/JavaScriptCore/disassembler/ARM64 -I../../Source/JavaScriptCore/disassembler/udis86 -I../../Source/JavaScriptCore/domjit -I../../Source/JavaScriptCore/ftl -I../../Source/JavaScriptCore/heap -I../../Source/JavaScriptCore/debugger -I../../Source/JavaScriptCore/inspector -I../../Source/JavaScriptCore/inspector/agents -I../../Source/JavaScriptCore/inspector/augmentable -I../../Source/JavaScriptCore/inspector/remote -I../../Source/JavaScriptCore/interpreter -I../../Source/JavaScriptCore/jit -I../../Source/JavaScriptCore/llint -I../../Source/JavaScriptCore/parser -I../../Source/JavaScriptCore/profiler -I../../Source/JavaScriptCore/runtime -I../../Source/JavaScriptCore/tools -I../../Source/JavaScriptCore/wasm -I../../Source/JavaScriptCore/wasm/js -I../../Source/JavaScriptCore/yarr -IDerivedSources/JavaScriptCore -IDerivedSources/JavaScriptCore/inspector -IDerivedSources/JavaScriptCore/runtime -IDerivedSources/JavaScriptCore/yarr -IDerivedSources -I../../Source/ThirdParty -fdiagnostics-color=always -fcolor-diagnostics -Wextra -Wall -Wno-parentheses-equality -Qunused-arguments -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -fsanitize-coverage=trace-pc-guard -O3 -lrt -fno-strict-aliasing -fno-exceptions -fno-rtti -gsplit-dwarf -g -fPIC   -ffp-contract=off -std=c++1z -MD -MT Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-23a5fd0e-9.cpp.o -MF Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-23a5fd0e-9.cpp.o.d -o Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-23a5fd0e-9.cpp.o -c DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-23a5fd0e-9.cpp
In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-23a5fd0e-9.cpp:1:
../../Source/JavaScriptCore/b3/B3Type.cpp:62:20: error: no template named 'is_pod_v' in namespace 'std'; did you mean 'is_pod'?
static_assert(std::is_pod_v<JSC::B3::TypeKind>);
              ~~~~~^~~~~~~~
                   is_pod
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/type_traits:656:12: note: 'is_pod' declared here
    struct is_pod
           ^
In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-23a5fd0e-9.cpp:1:
../../Source/JavaScriptCore/b3/B3Type.cpp:62:47: error: expected '(' for function-style cast or type construction
static_assert(std::is_pod_v<JSC::B3::TypeKind>);
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
2 errors generated.
[718/1496] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-23a5fd0e-10.cpp.o
ninja: build stopped: subcommand failed.

I don't know what should i do, can anyone help me? If you need more detailed information, you can contact me. Thanks in advance. Thx!!!

ty5491003 commented 4 years ago

I tried it on another machine and it worked. But I didn't type patch into the specified commit version of JSC. Will this have any effect?

saelo commented 4 years ago

As long as webkit.patch applies without any failures it should work fine. Fuzzilli will also do some startup tests to verify that the engine behaves as expected

ty5491003 commented 4 years ago

@saelo Thanks for ur reply.

When i run swift run -c release -Xlinker='-lrt' FuzzilliCli --profile=jsc --logLevel=warning --numIterations=1 --storagePath=/home/ty/fuzzilli/mutated_data_3 ~/new_webkit/webkit/FuzzBuild/Debug/bin/jsc

The output info as follows:

Fuzzer Statistics
-----------------
Total Samples:                500
Interesting Samples Found:    216
Valid Samples Found:          373
Corpus Size:                  217
Success Rate:                 74.60%
Timeout Rate:                 0.40%
Crashes Found:                0
Timeouts Hit:                 2
Coverage:                     8.76%
Avg. program size:            104.13
Connected workers:            0
Execs / Second:               0.00
Total Execs:                  11651

Does it means everything is ok?

saelo commented 4 years ago

Yep, looks good

ty5491003 commented 4 years ago

@saelo Thanks for your reply. Closed.