New issue
Advanced search Search tips

Issue 884849 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Nov 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug

Blocked on:
issue 884545
issue 884848
issue 890639

Blocking:
issue 883538
issue 892979



Sign in to add a comment

Reduce the size of libFuzzer builds on Windows.

Project Member Reported by metzman@chromium.org, Sep 17

Issue description

A build directory containing most fuzzers that can be built on Windows is ~120 GB.
Much of it seems to be taken up by pdb files, which are necessary for symbolizing.
I'm guessing this situation can be improved by ensuring the builds are doing the equivalent of gline-tables-only on Linux.
Another cause may be the problems stripping dead code when linking.
 
Blockedon: 884848
Blocking: 883538
Labels: OS-Windows
Blockedon: 890639
Blockedon: 884545
Setting the gn arg symbol_level=1 passes -gline-tables to clang which significantly reduced build sizes, bringing them down to ~75 GB. Using symbol_level=0 would break symbolizing stack traces. So we won't go lower.
optimize_for_fuzzing seemed to shave off ~5 GB from unpacked build size. 
Finally /OPT:REF will probably help quite a bit.
With symbol_level=1, compressed build size is 21.6 GB, which is comparable to ~18 GB for Linux.
Blocking: 892979
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 9

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/tools/clusterfuzz/+/5fbc8e40b8f9fe639fa3f34599f1e7a065344126

commit 5fbc8e40b8f9fe639fa3f34599f1e7a065344126
Author: Abhishek Arya <inferno@chromium.org>
Date: Tue Oct 09 19:45:55 2018

> Setting the gn arg symbol_level=1 passes -gline-tables to clang

That's true on non-Windows, but at least in non-fuzzer builds isn't true on Windows. On Windows, sybmol_level=1 means that we don't ask the compiler for debug info at all, but pass /DEBUG to the linker so that it generates debug info with symbol names. In that setup, you still get symbolized stack frames, but without line numbers.
Oh, apparently that's not true in sanitizer builds:

  if (is_win) {
    # Linker symbols for backtraces only.
    cflags = []
    ldflags = [ "/DEBUG" ]

    # For win/asan, get stack traces with full line numbers.
    # AddressSanitizerTests.TestAddressSanitizer needs this, and since
    # win/asan isn't a default cq bot the build time hit is ok.
    if (is_clang && using_sanitizer) {
      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
      # former.
      cflags += [ "-gline-tables-only" ]
    }
  } else {

Please ignore :-)
Build sizes are no longer so concerning, since  issue 884545  was fixed, they are now less than half the previous size, and the current size of Linux builds).
Status: Verified (was: Assigned)

Sign in to add a comment