Odd ubsan issue when building on macOS

Open
#516 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
macos, shell

Research direction

Start with fuzzbuild.sh and the generic arguments shown in the issue, then reproduce by launching out/fuzzbuild/d8 from the build directory and from another working directory on macOS. The work is done when d8 no longer fails to locate libclang_rt.ubsan_osx_dynamic.dylib when launched outside out/fuzzbuild/.

Written by the indexing model from the issue text.

Description

I've noticed that when building d8 on macOS using the generic fuzzbuild.sh args. 'is_debug=false dcheck_always_on=true v8_static_library=true v8_enable_verify_heap=true v8_fuzzilli=true sanitizer_coverage_flags="trace-pc-guard" target_cpu="x64"' It tries to statically load a ubsan library via a ../../ path which works fine when d8 is launched from <v8>/out/fuzzbuild/ but fails when launching from anywhere else.

 % ~/project/v8/out/fuzzbuild/d8
dyld[30191]: Library not loaded: @rpath/libclang_rt.ubsan_osx_dynamic.dylib
  Referenced from: <4C4C4449-5555-3144-A1CD-576D2F414F8F> /Users/emma/project/v8/out/fuzzbuild/d8
  Reason: tried: '/Users/emma/project/v8/out/fuzzbuild/libclang_rt.ubsan_osx_dynamic.dylib' (no such file), '../../third_party/llvm-build/Release+Asserts/lib/clang/21/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib' (no such file), '/Users/emma/project/v8/out/fuzzbuild/libclang_rt.ubsan_osx_dynamic.dylib' (no such file), '../../third_party/llvm-build/Release+Asserts/lib/clang/21/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib' (no such file)
zsh: abort      ~/project/v8/out/fuzzbuild/d8

I've temporarily solved this problem by copying third_party to ~/ and then launching fuzzilli from two nested folders. Not sure why this occurring though

Dominant language
Swift
Stars
2.3k
Forks
367
Avg merge
23h 53m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from googleprojectzero/fuzzilli

All issues in googleprojectzero/fuzzilli

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.