Page MenuHomePhabricator

metzman (Jonathan Metzman)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 8 2016, 8:15 AM (131 w, 1 d)

Recent Activity

Nov 6 2018

metzman committed rCRT346279: [fuzzer] Read files as binary.
[fuzzer] Read files as binary
Nov 6 2018, 3:28 PM
metzman committed rL346279: [fuzzer] Read files as binary.
[fuzzer] Read files as binary
Nov 6 2018, 3:28 PM
metzman closed D54180: [fuzzer] Read files as binary.
Nov 6 2018, 3:27 PM
metzman updated the diff for D54180: [fuzzer] Read files as binary.
  • fix comment
Nov 6 2018, 3:23 PM
metzman added a comment to D54180: [fuzzer] Read files as binary.

@morehouse I added a test for this. Please take another look.

Nov 6 2018, 3:19 PM
metzman updated the diff for D54180: [fuzzer] Read files as binary.
  • Use echo instead of printf
Nov 6 2018, 3:04 PM
metzman updated the diff for D54180: [fuzzer] Read files as binary.
  • Add test
Nov 6 2018, 2:54 PM
metzman added a comment to D54180: [fuzzer] Read files as binary.

I guess it might be worth adding the binary mode argument to FuzzerMerge.cpp and FuzzerDataFlowTrace.cpp as well, since apparently we may have some unexpected platform-dependent specifics when reading files.

Nov 6 2018, 2:03 PM
metzman added reviewers for D54180: [fuzzer] Read files as binary: Dor1s, morehouse.

Please take a look

Nov 6 2018, 1:38 PM
metzman updated the diff for D54180: [fuzzer] Read files as binary.
  • Fix binary issue afl_driver
Nov 6 2018, 1:21 PM
metzman created D54180: [fuzzer] Read files as binary.
Nov 6 2018, 1:14 PM

Oct 16 2018

metzman committed rL344657: [SanitizerCoverage] Don't duplicate code to get section pointers.
[SanitizerCoverage] Don't duplicate code to get section pointers
Oct 16 2018, 4:46 PM
metzman closed D53211: [SanitizerCoverage] Don't duplicate code to get section pointers.
Oct 16 2018, 4:45 PM

Oct 14 2018

metzman committed rCRT344480: [libfuzzer][Windows] Silence linker warning in unittest.
[libfuzzer][Windows] Silence linker warning in unittest
Oct 14 2018, 10:12 AM
metzman committed rL344480: [libfuzzer][Windows] Silence linker warning in unittest.
[libfuzzer][Windows] Silence linker warning in unittest
Oct 14 2018, 10:10 AM
metzman closed D53225: [libfuzzer][Windows] Silence linker warning in unittest.
Oct 14 2018, 10:09 AM

Oct 12 2018

metzman retitled D53225: [libfuzzer][Windows] Silence linker warning in unittest from [fuzzer][Windows] Silence linker warning in unittest to [libfuzzer][Windows] Silence linker warning in unittest.
Oct 12 2018, 3:55 PM
metzman added a reviewer for D53225: [libfuzzer][Windows] Silence linker warning in unittest: morehouse.

Matt, could you please take a look at this trivial change.

Oct 12 2018, 3:54 PM
metzman updated the summary of D53225: [libfuzzer][Windows] Silence linker warning in unittest.
Oct 12 2018, 3:50 PM
metzman created D53225: [libfuzzer][Windows] Silence linker warning in unittest.
Oct 12 2018, 3:48 PM
metzman added reviewers for D53211: [SanitizerCoverage] Don't duplicate code to get section pointers: kcc, morehouse.

Please take a look at this NFC.
It merges code from the two places where we were getting section start and end pointers.
Though @kcc only asked for merging the code handling the start pointers on Windows, I decided to combine other nearby duplicated code.

Oct 12 2018, 2:58 PM
metzman retitled D53211: [SanitizerCoverage] Don't duplicate code to get section pointers from Dont duplicate code to get section start and end pointers to [SanitizerCoverage] Don't duplicate code to get section pointers.
Oct 12 2018, 1:19 PM
metzman created D53211: [SanitizerCoverage] Don't duplicate code to get section pointers.
Oct 12 2018, 1:09 PM
metzman committed rCRT344391: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
[SanitizerCoverage] Prevent /OPT:REF from stripping constructors
Oct 12 2018, 11:14 AM
metzman committed rL344391: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
[SanitizerCoverage] Prevent /OPT:REF from stripping constructors
Oct 12 2018, 11:13 AM
metzman closed D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
Oct 12 2018, 11:13 AM
metzman retitled D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors from [SanitizerCoverage] Prevent /OPT:REF from stripping constructor to [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
Oct 12 2018, 11:11 AM
metzman updated the summary of D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
Oct 12 2018, 11:09 AM
metzman retitled D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors from [SanitizerCoverage] Don't make sancov module constructor comdat to [SanitizerCoverage] Prevent /OPT:REF from stripping constructor.
Oct 12 2018, 11:08 AM
metzman added inline comments to D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
Oct 12 2018, 10:10 AM
metzman added inline comments to D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
Oct 12 2018, 10:08 AM
metzman updated the diff for D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
  • Add support for i386.
Oct 12 2018, 9:28 AM

Oct 11 2018

metzman added a comment to D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.

@rnk
Please take another look.

Oct 11 2018, 10:32 AM
metzman updated the diff for D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
  • clang-format
Oct 11 2018, 9:02 AM
metzman updated the diff for D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
  • clang-format
Oct 11 2018, 8:54 AM
metzman updated the diff for D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
  • Improve comment.
  • Add test to compiler-rt
  • improve comment
  • fix spacing
  • Use COMDAT but force include of constructors and give them weak ODR linking
Oct 11 2018, 8:49 AM

Sep 21 2018

metzman planned changes to D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
In D52119#1237797, @rnk wrote:

I think we need to back up and think about what we're doing where and why.

If the application were fully statically linked, we wouldn't need to do anything in instrumentation code at all, we could just reference __start_*/__stop_* directly from the libfuzzer runtime, and that would contain all of sanitizer coverage data. The reason we have these module constructor calls is to deal with the case where the application is composed of multiple DSOs/DLLs. Each DSO will contain its own guards, counters, and pc arrays, and we can't arrange for them all to be contiguous.

Sep 21 2018, 9:09 AM

Sep 20 2018

metzman committed rL342698: [fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with….
[fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with…
Sep 20 2018, 4:28 PM
metzman committed rCRT342698: [fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with….
[fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with…
Sep 20 2018, 4:28 PM
metzman closed D51700: [fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp.
Sep 20 2018, 4:28 PM
metzman updated the diff for D51700: [fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp.
  • Remove unused file.
Sep 20 2018, 11:20 AM

Sep 17 2018

metzman added a comment to D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.

@rnk what do you think of this?
This change does cause many constructor calls to happen (thousands of times for some fuzzers) but there doesn't seem to be a problem with this as libFuzzer ignores the redundant calls.
Also, I'm not worried about a performance penalty from the redundant calls since they are cheap and only happen on program startup.

Sep 17 2018, 11:14 AM
metzman added reviewers for D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors: morehouse, rnk.
Sep 17 2018, 7:05 AM
metzman added reviewers for D51700: [fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp: rnk, morehouse.
Sep 17 2018, 7:05 AM
metzman retitled D51700: [fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp from Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp to [fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp.
Sep 17 2018, 7:05 AM

Sep 16 2018

metzman added a comment to D51700: [fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp.

Should I remove FuzzerExtFunctionsDlsymWin.cpp?
I'm unsure about doing so because in Marcos's patch he didn't remove FuzzerExtFunctionsWeakAlias.cpp and because I may find how use it properly later, in which case removing it might make the history uglier?

Sep 16 2018, 6:59 PM
metzman updated subscribers of D51700: [fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp.

@morehouse and @rnk: please take a look.

Sep 16 2018, 6:49 PM
metzman updated the summary of D51700: [fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp.
Sep 16 2018, 6:37 PM
metzman updated the summary of D51700: [fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp.
Sep 16 2018, 6:36 PM
metzman updated subscribers of D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.

@morehouse @rnk
Please take a look.
This patch allows libFuzzer targets to be compiled with /OPT:REF and adds a test to ensure this.

Sep 16 2018, 3:14 PM
metzman retitled D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors from Don't make sancov module constructor comdat. to [SanitizerCoverage] Don't make sancov module constructor comdat.
Sep 16 2018, 3:14 PM

Sep 14 2018

metzman updated the diff for D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
  • fix spacing
Sep 14 2018, 4:04 PM
metzman updated the diff for D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
  • Improve comments.
  • Add test to compiler-rt
Sep 14 2018, 4:00 PM
metzman updated the summary of D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
Sep 14 2018, 1:09 PM
metzman retitled D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors from Don't make sancov module constructor a comdat. Doing so causes the constructor to be stripped if the linker is told to strip unreferenced functions (/OPT:REF) to Don't make sancov module constructor comdat..
Sep 14 2018, 1:09 PM
metzman created D52119: [SanitizerCoverage] Prevent /OPT:REF from stripping constructors.
Sep 14 2018, 1:03 PM

Sep 6 2018

metzman committed rCRT341632: [libfuzzer] Enable trace-malloc-unballanced.test on Windows..
[libfuzzer] Enable trace-malloc-unballanced.test on Windows.
Sep 6 2018, 9:30 PM
metzman committed rL341632: [libfuzzer] Enable trace-malloc-unballanced.test on Windows..
[libfuzzer] Enable trace-malloc-unballanced.test on Windows.
Sep 6 2018, 9:30 PM
metzman closed D51760: [libfuzzer] Enable trace-malloc-unballanced.test on Windows..
Sep 6 2018, 9:29 PM
metzman updated the summary of D51760: [libfuzzer] Enable trace-malloc-unballanced.test on Windows..
Sep 6 2018, 9:27 PM
metzman committed rL341622: [libfuzzer] Use cl driver mode for tests and enable another test on Windows.
[libfuzzer] Use cl driver mode for tests and enable another test on Windows
Sep 6 2018, 6:12 PM
metzman committed rCRT341622: [libfuzzer] Use cl driver mode for tests and enable another test on Windows.
[libfuzzer] Use cl driver mode for tests and enable another test on Windows
Sep 6 2018, 6:12 PM
metzman closed D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows.
Sep 6 2018, 6:12 PM
metzman retitled D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows from [libfuzzer] Use cl driver mode for tests and enable another one on Windows to [libfuzzer] Use cl driver mode for tests and enable another test on Windows.
Sep 6 2018, 6:11 PM
metzman added inline comments to D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows.
Sep 6 2018, 5:51 PM
metzman updated the diff for D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows.
  • remove extra whitespace.
  • use target triple
Sep 6 2018, 5:48 PM
metzman added a reviewer for D51760: [libfuzzer] Enable trace-malloc-unballanced.test on Windows.: Dor1s.

Max could you please take a look when you get a chance (no rush).

Sep 6 2018, 5:20 PM
metzman updated the diff for D51760: [libfuzzer] Enable trace-malloc-unballanced.test on Windows..
  • Make comment more descriptive
Sep 6 2018, 4:55 PM
metzman created D51760: [libfuzzer] Enable trace-malloc-unballanced.test on Windows..
Sep 6 2018, 4:55 PM
metzman retitled D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows from [libfuzzer] Use cl driver mode for tests and enable another one on Windws to [libfuzzer] Use cl driver mode for tests and enable another one on Windows.
Sep 6 2018, 4:19 PM
metzman added inline comments to D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows.
Sep 6 2018, 4:06 PM
metzman added a reviewer for D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows: morehouse.

Matt, please take a look when you get a chance (no rush).

Sep 6 2018, 4:06 PM
metzman updated the diff for D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows.
  • undo accidental change
Sep 6 2018, 3:53 PM
metzman updated the diff for D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows.
  • Remove /Z7 flag.
Sep 6 2018, 3:49 PM
metzman retitled D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows from [libfuzzer] Use correct compilation flags for tests and enable another one on Windws to [libfuzzer] Use cl driver mode for tests and enable another one on Windws.
Sep 6 2018, 3:48 PM
metzman retitled D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows from [libfuzzer] Use compilation flags for tests and enable another one on Windws to [libfuzzer] Use correct compilation flags for tests and enable another one on Windws.
Sep 6 2018, 3:36 PM
metzman created D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows.
Sep 6 2018, 3:35 PM
metzman committed rL341569: [libfuzzer] Correct typo in comment (test commit)..
[libfuzzer] Correct typo in comment (test commit).
Sep 6 2018, 10:51 AM
metzman committed rCRT341569: [libfuzzer] Correct typo in comment (test commit)..
[libfuzzer] Correct typo in comment (test commit).
Sep 6 2018, 10:51 AM
metzman closed D51739: [libfuzzer] Correct typo in comment (test commit)..
Sep 6 2018, 10:51 AM
metzman added a reviewer for D51739: [libfuzzer] Correct typo in comment (test commit).: Dor1s.
Sep 6 2018, 10:38 AM
metzman created D51739: [libfuzzer] Correct typo in comment (test commit)..
Sep 6 2018, 10:37 AM
metzman added a comment to D51735: [libfuzzer] Fix fuzzer-oom.test on windows and reenable it..

I wonder if there is any trick in lit to resolve this .exe issue.

Sep 6 2018, 9:43 AM
metzman added reviewers for D51735: [libfuzzer] Fix fuzzer-oom.test on windows and reenable it.: Dor1s, morehouse.

Please take a look.
Another issue with the file extension.
These issues aren't trivial to figure out, I wonder if all tests should compile binaries with exe extensions so problems aren't accidentally introduced.

Sep 6 2018, 9:04 AM
metzman created D51735: [libfuzzer] Fix fuzzer-oom.test on windows and reenable it..
Sep 6 2018, 8:57 AM

Sep 5 2018

metzman added reviewers for D51712: [libfuzzer] Temporarily disable unittests failing on Windows.: morehouse, Dor1s.

Please take a look.

Sep 5 2018, 7:14 PM
metzman created D51712: [libfuzzer] Temporarily disable unittests failing on Windows..
Sep 5 2018, 7:08 PM
metzman added a comment to D51692: [libfuzzer] Replace memmem with strstr..

In my newest diff, we enter the if-body if argv0 was set by LLVMFuzzerInitialize and Data begins with "fuzz", which should be easy enough for most any test to pass.

Sep 5 2018, 1:59 PM
metzman updated the diff for D51692: [libfuzzer] Replace memmem with strstr..
  • use different comparison and check pointer is not null
Sep 5 2018, 1:56 PM
metzman added a comment to D51692: [libfuzzer] Replace memmem with strstr..

My first diff did an exact match on part of argv[0], doing the entire thing was too difficult: https://reviews.llvm.org/D51692?vs=on&id=164071&whitespace=ignore-most#toc
Do you think that solution is better than testing if argv0 was set?

Sep 5 2018, 1:02 PM
metzman added a comment to D51692: [libfuzzer] Replace memmem with strstr..

Sorry, Matt you had a better understanding of what my patch does than I did.
You are right that the if-body is taken when the lengths are the same but the string is different.
In any case though, I think testing if we can match strings is unnecessary anyway right? Can we just test that argv0 was set?

Sep 5 2018, 1:00 PM
metzman added a comment to D51692: [libfuzzer] Replace memmem with strstr..

That patch broke the behavior of this test. Looks like we used to print "BINGO" when the input matched the binary name. Now we print "BINGO" when the input size matches but the names do not.

Sep 5 2018, 12:54 PM
metzman added a comment to D51692: [libfuzzer] Replace memmem with strstr..

Actually, I think I know why.
It looks like exact match was too difficult for LF (was lit not always used for tests?).
This is why a search function was first added by @george.karpenkov
See
https://github.com/llvm-mirror/llvm/commit/6795f26af554ad58aaca056db03657653b2e4e60#diff-1034b931b86661aee0b11db45658a8b5

Sep 5 2018, 12:29 PM
metzman added a comment to D51692: [libfuzzer] Replace memmem with strstr..

Maybe memcmp would be cleaner here.

Sep 5 2018, 12:23 PM
metzman created D51700: [fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp.
Sep 5 2018, 11:58 AM
metzman added a reviewer for D51692: [libfuzzer] Replace memmem with strstr.: morehouse.

@morehouse
Please take a look.
This patch replaces use of memmem with strstr so that the two tests that use this code can compile on Windows (they still fail because LLVMFuzzerInitialize isn't working, but I have a fix for that, patch on the way).

Sep 5 2018, 11:03 AM
metzman retitled D51692: [libfuzzer] Replace memmem with strstr. from [libfuzzer] Replace memmem with memcmp. to [libfuzzer] Replace memmem with strstr..
Sep 5 2018, 10:57 AM
metzman updated the diff for D51692: [libfuzzer] Replace memmem with strstr..
  • remove comment
Sep 5 2018, 10:56 AM
metzman updated the diff for D51692: [libfuzzer] Replace memmem with strstr..

Replace memmem with strstr

Sep 5 2018, 10:56 AM
metzman created D51692: [libfuzzer] Replace memmem with strstr..
Sep 5 2018, 10:32 AM