kcc (Kostya Serebryany)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 3 2012, 4:55 AM (263 w, 5 d)

Recent Activity

Tue, Oct 17

kcc added a comment to D38971: Enhance libsanitizer support for invalid-pointer-pair..

Please use the arc tool to submit the patch or otherwise paste the patch with full context.
Please always CC llvm-commits for changes in compiler-rt (phabricator doesn't do it automatically)

Tue, Oct 17, 5:41 PM
kcc added a comment to D38971: Enhance libsanitizer support for invalid-pointer-pair..

Shouldn't detect_invalid_pointer_pairs=1 be the default? I mean, the user already makes the decision to enable it through a compiler option/parameter and the generated code adds non-zero amount of .text space and some runtime cost, and there is no extra runtime costs for this if code isn't instrumented, so detect_invalid_pointer_pairs=0 by default only causes false assumption that code is error clean.

Tue, Oct 17, 5:19 PM
kcc added a reviewer for D38971: Enhance libsanitizer support for invalid-pointer-pair.: llvm-commits.

[disclaimer: this is the week of the LLVM developer conference, please expect delayed replies]

Tue, Oct 17, 5:17 PM
kcc added a comment to D38971: Enhance libsanitizer support for invalid-pointer-pair..

Thanks, I'll add some tests. May I please ask you how to run a single test-case (I guess using llvm-lit) ?

Tue, Oct 17, 5:09 PM
kcc requested changes to D39018: -fsanitize=noreturn sanitization.
  • please CC llvm-dev for any sanitizer changes
  • please CC cfe-dev for any changes that need to be done in clang
  • we can't accepts a patch like this w/o tests and w/o clang part.
Tue, Oct 17, 3:57 PM
kcc added inline comments to D38991: Unbreak libbacktrace symbolizer.
Tue, Oct 17, 11:57 AM
kcc accepted D38991: Unbreak libbacktrace symbolizer.

LGTM
Do you need me to commit it?
(If you don't have commit access yet, I 'm pretty sure you qualify for one long ago)

Tue, Oct 17, 11:31 AM

Mon, Oct 16

kcc added a reviewer for D38971: Enhance libsanitizer support for invalid-pointer-pair.: alekseyshl.

Thanks for the patch, but...

Mon, Oct 16, 1:41 PM
kcc committed rL315933: fix llvm-isel-fuzzer: LLVMFuzzerTestOneInput should never return non-zero….
fix llvm-isel-fuzzer: LLVMFuzzerTestOneInput should never return non-zero…
Mon, Oct 16, 1:37 PM

Fri, Oct 13

kcc accepted D38912: [libFuzzer] Delete llvm/lib/Fuzzer.

LGTM

Fri, Oct 13, 6:54 PM
kcc accepted D38912: [libFuzzer] Delete llvm/lib/Fuzzer.

Let's leave README.txt pointing to the new location.
LGTM otherwise.

Fri, Oct 13, 5:09 PM
kcc committed rL315778: [libFuzzer] print a better warning if we hit the ld bug.
[libFuzzer] print a better warning if we hit the ld bug
Fri, Oct 13, 5:07 PM

Thu, Oct 12

kcc committed rL315657: [libFuzzer] tweam use_feature_frequency to be less aggressive; run a dummy….
[libFuzzer] tweam use_feature_frequency to be less aggressive; run a dummy…
Thu, Oct 12, 6:12 PM
kcc accepted D38866: [llvm-isel-fuzzer] Use "--" as separator rather than '='..

LGTM

Thu, Oct 12, 5:17 PM
kcc added inline comments to D38858: [cmake] Allow building fuzzers with OSS-Fuzz flags..
Thu, Oct 12, 2:06 PM
kcc added a comment to D38855: Add a fuzz target for llvm's ItaniumDemangler..

Code LG, wait for Matt with cmake.

Thu, Oct 12, 11:01 AM
kcc accepted D38853: [clang-format] Allow building fuzzer with OSS-Fuzz flags..

+Justin FYI

Thu, Oct 12, 10:59 AM

Wed, Oct 11

kcc committed rL315503: [libFuzzer] disable use_feature_frequency as it degrades some of the benchmarks….
[libFuzzer] disable use_feature_frequency as it degrades some of the benchmarks…
Wed, Oct 11, 1:31 PM
kcc committed rL315490: [libFuzzer] make -use_feature_frequency less aggressive and enable by default.
[libFuzzer] make -use_feature_frequency less aggressive and enable by default
Wed, Oct 11, 12:01 PM
kcc accepted D38812: [clang-fuzzer] Allow linking with any fuzzing engine..

LGTM

Wed, Oct 11, 11:23 AM

Tue, Oct 10

kcc committed rL315407: [libFuzzer] experimental flag to tweak the corpus distribution. Seems to….
[libFuzzer] experimental flag to tweak the corpus distribution. Seems to…
Tue, Oct 10, 6:44 PM
kcc added a comment to D37495: llvm-isel-fuzzer: Handle a subset of backend flags in the executable name.

ping. :)
I'd like to add this target to oss-fuzz before the llvm dev meeting (sooooon!)

Tue, Oct 10, 12:30 PM

Fri, Oct 6

kcc added a comment to D38642: [clang-fuzzer] Allow building without coverage instrumentation..
In D38642#891074, @kcc wrote:

If you can *easily* share main() with the one in LLVM -- do it, otherwise don't bother.

Does the fuzzer main come from LLVM or compiler-rt now? There's still FuzzerMain.cpp in LLVM, but I'm not sure if we should be using that or not.

Fri, Oct 6, 5:02 PM
kcc added a reviewer for D38642: [clang-fuzzer] Allow building without coverage instrumentation.: vitalybuka.

conceptually ok, but please let Vitaly review the cmake part.

Fri, Oct 6, 3:34 PM
kcc added a comment to D38642: [clang-fuzzer] Allow building without coverage instrumentation..

grrr. I am sorry, I've just contradicted myself. :(
The goal here is to build the fuzz targets always and use them as tests, which includes building with any toolchain, including toolchains that don't support -fsanitize=fuzzer....
your original change actually solved this.
If you can *easily* share main() with the one in LLVM -- do it, otherwise don't bother.

Fri, Oct 6, 2:57 PM
kcc added a comment to D38642: [clang-fuzzer] Allow building without coverage instrumentation..

We often suggest to code owners to implement their own dummy main to run fuzz targets as regression tests.
But for ourselves (LLVM) this recommendations makes less sense since libFuzzer is part of LLVM and we can use it's main directly.

Fri, Oct 6, 1:59 PM
kcc added a comment to D38642: [clang-fuzzer] Allow building without coverage instrumentation..

Will we be able to reuse some of Justin's code instead of creating one more main() function?

This reuses the code that Justin moved to FuzzMutate/FuzzerCLI. That's why the main is so short. But perhaps we could move the main itself into FuzzerCLI?

Fri, Oct 6, 1:25 PM
kcc added a comment to D38642: [clang-fuzzer] Allow building without coverage instrumentation..

It's not about coverage instrumentation (not) being present, but about libFuzzer's main() being present, right?
Will we be able to reuse some of Justin's code instead of creating one more main() function?
Or, why not link with libFuzzer (-fsanitize=fuzzer at link time) even if we don't us einstrumentation at compile time?

Fri, Oct 6, 1:13 PM

Thu, Oct 5

kcc accepted D38604: [libFuzzer] Disable experimental clang coverage support by default..

LGTM with a nit

Thu, Oct 5, 3:14 PM
kcc accepted D38604: [libFuzzer] Disable experimental clang coverage support by default..

Wow, we don't have a test for this!?
Apparently it was lost when we migrated to compiler-rt :(
May I ask you to add one to compiler-rt/test/fuzzer?
(see fprofile-instr-generate.test in http://llvm.org/viewvc/llvm-project?view=revision&revision=310771)

Thu, Oct 5, 3:03 PM

Sep 22 2017

kcc added a comment to D38056: Partial fix for bug 34607: ASan misses global underflow in first symbol of data section.

Please address the comment around (uptr) and update the commit message.

Sep 22 2017, 12:49 PM

Sep 21 2017

kcc added a comment to D38056: Partial fix for bug 34607: ASan misses global underflow in first symbol of data section.

Yep, that's better. And we can do it w/o a flag.

Sep 21 2017, 9:24 PM
kcc added a comment to D38056: Partial fix for bug 34607: ASan misses global underflow in first symbol of data section.

+ asan_global meta = {(uptr) globals, 0, n * sizeof(asan_global), "asan_metadata", "asan", 0, 0, 0};
+ PoisonRedZones(meta);

Sep 21 2017, 5:08 PM
kcc added a comment to D38056: Partial fix for bug 34607: ASan misses global underflow in first symbol of data section.

Yes, thanks!
What if we poison the metadata?

Sep 21 2017, 12:13 PM
kcc added a reviewer for D38056: Partial fix for bug 34607: ASan misses global underflow in first symbol of data section: eugenis.

I'm still confused...
I'll be a sloppy reviewer in next 2 weeks, adding eugenis, who touched this code recently.
Ad please also add a test in test/Instrumentation/AddressSanitizer/ (with and w/o this flag)

Sep 21 2017, 11:42 AM

Sep 20 2017

kcc added a comment to D38107: [Coverage] Add an option to emit limited coverage info.

naming is hard. Maybe something like

-mllvm -clang-coverage-experimental-ignore-headers=1 ?

(anyway, bike-shedding...)

Sep 20 2017, 5:34 PM
kcc added a comment to D38056: Partial fix for bug 34607: ASan misses global underflow in first symbol of data section.

I would prefer to enable it by default though

Sep 20 2017, 4:35 PM
kcc added reviewers for D38107: [Coverage] Add an option to emit limited coverage info: Dor1s, morehouse.

I don't like the flag name, but it's bike-shedding

Sep 20 2017, 4:12 PM
kcc accepted D38026: Make LSan compliant with recovery mode when running on top of ASan.
Sep 20 2017, 4:08 PM

Sep 19 2017

kcc added a reviewer for D38056: Partial fix for bug 34607: ASan misses global underflow in first symbol of data section: compnerd.
In D38056#875680, @kcc wrote:

Please put this under a flag, off by default. (something like -mllvm -asan-globals-separate-section=1)
This is an obvious fix with totally non-obvious consequences, we don't want to find these consequences in the hard way.

Sure, I can put it under an option. Why do you think this change may have dangerous consequences? We already do something very similar with -fdata-sections.

Sep 19 2017, 3:32 PM
kcc added a comment to D38056: Partial fix for bug 34607: ASan misses global underflow in first symbol of data section.

Please put this under a flag, off by default. (something like -mllvm -asan-globals-separate-section=1)
This is an obvious fix with totally non-obvious consequences, we don't want to find these consequences in the hard way.

Sep 19 2017, 3:07 PM
kcc added inline comments to D38026: Make LSan compliant with recovery mode when running on top of ASan.
Sep 19 2017, 9:05 AM

Sep 18 2017

kcc added inline comments to D37937: Introduce the llvm-cfi-verify tool..
Sep 18 2017, 5:38 PM
kcc committed rL313562: [libFuzzer] one more trophy.
[libFuzzer] one more trophy
Sep 18 2017, 1:51 PM

Sep 15 2017

kcc committed rL313421: [libFuzzer] add linux-specific test for gc-sections.
[libFuzzer] add linux-specific test for gc-sections
Sep 15 2017, 4:08 PM
kcc committed rL313411: [libFuzzer] test fix.
[libFuzzer] test fix
Sep 15 2017, 3:30 PM
kcc committed rL313406: [libFuzzer] minor refactoring, NFC.
[libFuzzer] minor refactoring, NFC
Sep 15 2017, 3:12 PM
kcc committed rL313403: [libFuzzer] reduce the size of the merge control file by not dumping redundant….
[libFuzzer] reduce the size of the merge control file by not dumping redundant…
Sep 15 2017, 3:04 PM

Sep 14 2017

kcc added a reviewer for D37631: [libFuzzer] Support using libc++: vitalybuka.

This does seem to work. Right now it's only used if COMPILER_RT_ENABLE_LIBCXX is set, but we can make it the default whenever libc++ source is available if that's fine with you.

Sep 14 2017, 6:45 PM
kcc added a comment to D37439: [MachO] Prevent heap overflow when load command extends past EOF.

Thank you very much for addressing this!
Oss-fuzz has just confirmed the bug is fixed.

Sep 14 2017, 4:39 PM

Sep 13 2017

kcc added a comment to D37631: [libFuzzer] Support using libc++.

finally combine the two static libraries

Sep 13 2017, 6:21 PM

Sep 12 2017

kcc committed rL313081: [libFuzzer] factor out some code into GetSizedFilesFromDir; NFC.
[libFuzzer] factor out some code into GetSizedFilesFromDir; NFC
Sep 12 2017, 2:59 PM
kcc accepted D37661: [sancov] coverage-report-server.py: ServerHandler(): open file as UTF8.

I don't think we have any tests for this script :(

Sep 12 2017, 11:56 AM · Restricted Project
kcc edited reviewers for D37661: [sancov] coverage-report-server.py: ServerHandler(): open file as UTF8, added: kcc; removed: aizatsky.
Sep 12 2017, 11:50 AM · Restricted Project
kcc added a comment to D37661: [sancov] coverage-report-server.py: ServerHandler(): open file as UTF8.

can we just stick to python2?
I am not sure for how long this code will survive (I hope to migrate to clang's SourceBasedCodeCoverage) and don't want to spend time improving it.

Sep 12 2017, 11:50 AM · Restricted Project

Sep 11 2017

kcc accepted D37632: [libfuzzer] Compare TotalNumberOfRuns with MaxNumberOfRuns when testing a memory leak..

LGTM

Sep 11 2017, 6:39 PM
kcc accepted D37721: [libFuzzer] Fix lit files to make running tests more straightforward on Mac OS..

@Dor1s btw for full context instead of linking to the file you can just do git diff -U999.

Sep 11 2017, 6:06 PM
kcc added a comment to D37632: [libfuzzer] Compare TotalNumberOfRuns with MaxNumberOfRuns when testing a memory leak..

Looking at the test more, I think it's not really testing what we want to test.
And the test itself as a bad fuzz target, nondeterministic.

Sep 11 2017, 6:04 PM

Sep 8 2017

kcc committed rL312855: [sanitizer-coverage] call appendToUsed once per module, not once per function….
[sanitizer-coverage] call appendToUsed once per module, not once per function…
Sep 8 2017, 10:31 PM
kcc added a comment to D37631: [libFuzzer] Support using libc++.

So, how about linking a full private version of libc++?
Is that even possible?

Sep 8 2017, 6:02 PM
kcc committed rL312848: [libFuzzer] remove a couple of reduntant includes.
[libFuzzer] remove a couple of reduntant includes
Sep 8 2017, 5:57 PM
kcc added a comment to D37631: [libFuzzer] Support using libc++.

replacing std::istringstream with a hand-written-stuff would be very unfortunate :(

Sep 8 2017, 5:55 PM
kcc added a comment to D37631: [libFuzzer] Support using libc++.

If we can privatize vector, string, the other containers, and algorithms,
Will we be able to privatize sort? (I can see it in your output)
I'm ok to rewrite thread/mutex/stream/clock using C library (I can even do part of that). Will this be enough?

Sep 8 2017, 5:40 PM
kcc added a comment to D37631: [libFuzzer] Support using libc++.

What else?

Sep 8 2017, 4:43 PM
kcc added a comment to D37631: [libFuzzer] Support using libc++.

Let's see how many things you need first :)

Sep 8 2017, 4:30 PM
kcc added a comment to D37631: [libFuzzer] Support using libc++.

The ones I'm seeing in our build are references to basic_string and vector.

Sep 8 2017, 2:56 PM
kcc added a comment to D37631: [libFuzzer] Support using libc++.

What symbols are missing?

Sep 8 2017, 2:33 PM
kcc added inline comments to D37632: [libfuzzer] Compare TotalNumberOfRuns with MaxNumberOfRuns when testing a memory leak..
Sep 8 2017, 1:26 PM
kcc added inline comments to D37632: [libfuzzer] Compare TotalNumberOfRuns with MaxNumberOfRuns when testing a memory leak..
Sep 8 2017, 1:26 PM
kcc accepted D37609: [asan] Use more generic string in error message.

LGTM

Sep 8 2017, 12:47 PM
kcc accepted D37635: Prevent DCE on __lsan_is_turned_off and re-enable test case.

LGTM, thanks!

Sep 8 2017, 12:41 PM
kcc added a comment to D37635: Prevent DCE on __lsan_is_turned_off and re-enable test case.

May I ask you to also update the comments around the definition of __lsan_is_turned_off in lsan_interface.h?

// To avoid dead stripping you may need to define this function with __attribute__((used))
Sep 8 2017, 12:32 PM
kcc added a comment to D37631: [libFuzzer] Support using libc++.

If we can privatize STL this would be a much more preferable solution -- no driver changes and multiple versions.
This may also solve libFuzzer+msan (right now we have to recompile libFuzzer for msan).

Sep 8 2017, 12:26 PM
kcc added a comment to D37632: [libfuzzer] Compare TotalNumberOfRuns with MaxNumberOfRuns when testing a memory leak..

I prefer this way. ExecuteCallback is unaccounted for (e.g. it's used to run a dummy/emty input in the beginning)

Sep 8 2017, 11:08 AM
kcc added a comment to D37632: [libfuzzer] Compare TotalNumberOfRuns with MaxNumberOfRuns when testing a memory leak..

Code change LG, thanks!
Could you please also provide a (non-flaky) test?

Sep 8 2017, 11:02 AM
kcc added a comment to D37631: [libFuzzer] Support using libc++.

Copy-paste -- no.
But if we can completely privatize the use of STL with some trick, that would be great (e.g. #define the namespace name to be something other than std).
This may work with STL containers, likely to work with STL algorithms, and unlikely to work with STL streams. If streams are the only problem, we could probably get rid of them.

Sep 8 2017, 11:00 AM
kcc added a comment to D37631: [libFuzzer] Support using libc++.

Hm. Shouldn't we build two versions of libFuzzer by default?
(Oh my, this is one more trouble with using STL in a low-level library)

Sep 8 2017, 10:52 AM

Sep 6 2017

kcc committed rL312697: [libFuzzer] simplify CustomCrossOverTest even more.
[libFuzzer] simplify CustomCrossOverTest even more
Sep 6 2017, 10:34 PM
kcc committed rL312695: [libFuzzer] simplify CustomCrossOverTest a bit more.
[libFuzzer] simplify CustomCrossOverTest a bit more
Sep 6 2017, 10:24 PM
kcc committed rL312689: [libFuzzer] simplify and re-enable CustomCrossOverTest.
[libFuzzer] simplify and re-enable CustomCrossOverTest
Sep 6 2017, 7:07 PM

Sep 5 2017

kcc added inline comments to D37495: llvm-isel-fuzzer: Handle a subset of backend flags in the executable name.
Sep 5 2017, 7:57 PM
kcc added a comment to D37495: llvm-isel-fuzzer: Handle a subset of backend flags in the executable name.
some overview type docs (possibly pulling the Fuzzing components of LLVM parts out of the libFuzzer docs
Sep 5 2017, 5:25 PM
kcc committed rL312593: [libFuzzer] remporary disable an unstable test.
[libFuzzer] remporary disable an unstable test
Sep 5 2017, 4:47 PM
kcc added a reviewer for D37495: llvm-isel-fuzzer: Handle a subset of backend flags in the executable name: morehouse.

this handrolls a subset of cl::opts to recognize

Sep 5 2017, 4:30 PM

Sep 4 2017

kcc added a comment to D37439: [MachO] Prevent heap overflow when load command extends past EOF.

Looks good (but I don't know this code).
Thanks for adding the test input -- once the shallow bugs are cleaned up I'll use test/Object/Inputs/ as the seed corpus.

Sep 4 2017, 2:17 PM

Sep 1 2017

kcc committed rL312356: [libFuzzer] use more iterations for a test.
[libFuzzer] use more iterations for a test
Sep 1 2017, 12:46 PM
kcc committed rL312346: [libFuzzer] switch -fsanitize=fuzzer from trace-pc-guard to inline-8bit-counters.
[libFuzzer] switch -fsanitize=fuzzer from trace-pc-guard to inline-8bit-counters
Sep 1 2017, 11:36 AM

Aug 31 2017

kcc committed rL312269: [libFuzzer] tolerate missing files when loading the seed corpus.
[libFuzzer] tolerate missing files when loading the seed corpus
Aug 31 2017, 12:19 PM

Aug 30 2017

kcc accepted D37244: Finalize ASAN/NetBSD.

LGTM

Aug 30 2017, 4:00 PM · Restricted Project
kcc added inline comments to D37244: Finalize ASAN/NetBSD.
Aug 30 2017, 3:50 PM · Restricted Project
kcc accepted D37304: Add preliminary NetBSD support in libfuzzer.

LGTM, thanks!

Aug 30 2017, 3:25 PM · Restricted Project
kcc added a comment to D37304: Add preliminary NetBSD support in libfuzzer.

Mostly LG

Aug 30 2017, 2:56 PM · Restricted Project
kcc accepted D37307: Add NetBSD support in lsan_interceptors.cc.

LGTM

Aug 30 2017, 2:29 PM · Restricted Project
kcc accepted D37303: docs: don't say that data flow tracing interface is unstable.

LGTM,
although this will not prevent us from changing the interface in future :)

Aug 30 2017, 2:21 PM

Aug 29 2017

kcc committed rL312033: [libFUzzer] change the way we load the seed corpora: instead of loading all….
[libFUzzer] change the way we load the seed corpora: instead of loading all…
Aug 29 2017, 1:52 PM
kcc accepted D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer.

LGTM

Aug 29 2017, 12:47 PM
kcc added inline comments to D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer.
Aug 29 2017, 11:41 AM

Aug 28 2017

kcc committed rL311972: [libFuzzer] refactoring: move reading the seed corpus closer to where it's….
[libFuzzer] refactoring: move reading the seed corpus closer to where it's…
Aug 28 2017, 7:06 PM
kcc added a comment to D36275: Implement llvm-isel-fuzzer for fuzzing instruction selection.

I've run ./bin/llvm-isel-fuzzer -ignore_remaining_args=1 -mtriple x86_64-unknown-linux-gnu for a few minutes and I got this:

Aug 28 2017, 6:37 PM
kcc committed rL311968: fix llvm-dwarfdump-fuzzer.cpp to use the current libFuzzer API.
fix llvm-dwarfdump-fuzzer.cpp to use the current libFuzzer API
Aug 28 2017, 6:16 PM