Skip to content

Commit

Permalink
driver: Fix startup crash when fuzzing native libraries (#883)
Browse files Browse the repository at this point in the history
driver: Fix startup crashes when fuzzing native libraries

Fixes a JVM crash with the following frame while fuzzing native
libraries:
```
[libstdc++.so.6+0x13bf8a]  std::ostream::sentry::sentry(std::ostream&)+0x1a
```
  • Loading branch information
fmeum authored Nov 6, 2023
1 parent 7b17073 commit 1f2bdf9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ extern "C" [[maybe_unused]] bool __sanitizer_weak_is_relevant_pc(
Java_com_code_1intelligence_jazzer_runtime_TraceDataFlowNativeCallbacks_handleLibraryLoad(
JNIEnv *, jclass) {
std::call_once(ignore_list_flag, [] {
// Force std::cout to be fully initialized.
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26123
static std::ios_base::Init initIostreams;
std::cout << "INFO: detected a native library load, enabling interception "
"for libc functions"
<< std::endl;
Expand Down

0 comments on commit 1f2bdf9

Please sign in to comment.