dvyukov (Dmitry Vyukov)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 6 2012, 2:31 AM (254 w, 3 d)

Recent Activity

Yesterday

dvyukov added inline comments to D39124: Add NetBSD improvements in sanitizers.
Sat, Oct 21, 12:05 AM · Restricted Project

Fri, Oct 20

dvyukov added a comment to D39095: [tsan] Add Mutex annotation flag for constant-initialized __tsan_mutex_linker_init behavior.

+ http://llvm.org/viewvc/llvm-project?view=revision&revision=316210

Fri, Oct 20, 5:10 AM · Restricted Project
dvyukov committed rL316210: tsan: add tests missed in r316209.
tsan: add tests missed in r316209
Fri, Oct 20, 5:10 AM
dvyukov committed rL316209: [tsan] Add Mutex annotation flag for constant-initialized….
[tsan] Add Mutex annotation flag for constant-initialized…
Fri, Oct 20, 5:10 AM
dvyukov closed D39095: [tsan] Add Mutex annotation flag for constant-initialized __tsan_mutex_linker_init behavior.
Fri, Oct 20, 5:10 AM · Restricted Project
dvyukov accepted D39095: [tsan] Add Mutex annotation flag for constant-initialized __tsan_mutex_linker_init behavior.

Submitted in http://llvm.org/viewvc/llvm-project?view=revision&revision=316209

Fri, Oct 20, 5:10 AM · Restricted Project
dvyukov added a comment to D39095: [tsan] Add Mutex annotation flag for constant-initialized __tsan_mutex_linker_init behavior.

LGTM except that ninja check-tsan fails:

Fri, Oct 20, 5:05 AM · Restricted Project

Thu, Sep 28

dvyukov committed rL314384: tsan: handle signals in pause call.
tsan: handle signals in pause call
Thu, Sep 28, 12:33 AM

Tue, Sep 26

dvyukov accepted D38244: [scudo] Scudo thread specific data refactor, part 3.
Tue, Sep 26, 3:29 PM
dvyukov added a comment to D38245: [Sanitizers] Allocator: new "release memory to OS" implementation.

looks good to me

Tue, Sep 26, 3:29 PM

Mon, Sep 25

dvyukov accepted D38183: [scudo] Scudo thread specific data refactor, part 2.
Mon, Sep 25, 5:02 AM

Sep 21 2017

dvyukov accepted D38139: [scudo] Scudo thread specific data refactor, part 1.
Sep 21 2017, 10:16 PM

Sep 20 2017

dvyukov added inline comments to D38019: [asan] Fix nested error detection.
Sep 20 2017, 1:34 AM

Sep 19 2017

dvyukov added inline comments to D38019: [asan] Fix nested error detection.
Sep 19 2017, 12:32 AM

Sep 14 2017

dvyukov committed rL313347: tsan: respect LDFLAGS when build Go test.
tsan: respect LDFLAGS when build Go test
Sep 14 2017, 11:53 PM

Sep 12 2017

dvyukov added a comment to D35555: [MIPS][TSAN] Fix test user_malloc.cc.

Or perhaps just disable this test with explanation of the problem.

Disabled with https://reviews.llvm.org/rL313069
Disabling instrumentation with attribute does not work as tsan still somehow inserts FuncEntry instrumentation.

Sep 12 2017, 11:59 PM
dvyukov accepted rL313069: [tsan] Disable user_malloc test which fails glibc 2.24.
Sep 12 2017, 11:58 PM
dvyukov added a comment to D37590: [scudo] RFC thread specific data refactoring.

It would be interesting to benchmark Android with cache per thread model as well.

As of now, Android still doesn't have ELF TLS but is using emutls for its thread_local variables, which doesn't work for us.

Sep 12 2017, 9:00 AM
dvyukov added inline comments to D37590: [scudo] RFC thread specific data refactoring.
Sep 12 2017, 1:34 AM
dvyukov added a comment to D37590: [scudo] RFC thread specific data refactoring.

The model could ultimately be specified via defines as opposed to be set in stone for a given platform (eg: we could do shared caches on Linux).

Sep 12 2017, 1:27 AM
dvyukov added a comment to D37590: [scudo] RFC thread specific data refactoring.

Looks reasonable.

Sep 12 2017, 1:26 AM
dvyukov added a comment to D35555: [MIPS][TSAN] Fix test user_malloc.cc.

Dmitry, I don't see how AllocateFromLocalPool approach can help here.
dlsym calls malloc() from the test, but it fails on instrumentations like tsan_func_entry even before reaching interceptor_malloc.

Sep 12 2017, 12:57 AM

Aug 31 2017

dvyukov committed rL312232: docs: don't say that data flow tracing interface is unstable.
docs: don't say that data flow tracing interface is unstable
Aug 31 2017, 4:04 AM

Aug 30 2017

dvyukov accepted D37306: Add NetBSD support in test/tsan/thread_name*.cc.
Aug 30 2017, 12:32 PM · Restricted Project
dvyukov accepted D37305: Add NetBSD support in tsan_interceptors.cc.
Aug 30 2017, 12:28 PM · Restricted Project
dvyukov created D37303: docs: don't say that data flow tracing interface is unstable.
Aug 30 2017, 11:58 AM

Aug 25 2017

dvyukov committed rL311776: tsan: fix darwin build.
tsan: fix darwin build
Aug 25 2017, 8:19 AM
dvyukov closed D37107: tsan: don't pass bogus PCs to __tsan_symbolize_external.
Aug 25 2017, 1:53 AM
dvyukov added a comment to D37107: tsan: don't pass bogus PCs to __tsan_symbolize_external.

Submitted in 311768.

Aug 25 2017, 1:53 AM
dvyukov committed rL311768: tsan: don't pass bogus PCs to __tsan_symbolize_external.
tsan: don't pass bogus PCs to __tsan_symbolize_external
Aug 25 2017, 1:53 AM
dvyukov added inline comments to D37107: tsan: don't pass bogus PCs to __tsan_symbolize_external.
Aug 25 2017, 1:53 AM
dvyukov updated the diff for D37107: tsan: don't pass bogus PCs to __tsan_symbolize_external.
Aug 25 2017, 1:53 AM

Aug 24 2017

dvyukov added a comment to D37107: tsan: don't pass bogus PCs to __tsan_symbolize_external.

I am open to suggestions. This is total mess.

Aug 24 2017, 6:55 AM
dvyukov created D37107: tsan: don't pass bogus PCs to __tsan_symbolize_external.
Aug 24 2017, 6:51 AM

Aug 8 2017

dvyukov added a comment to D36465: [RFC] Change cmp instrumentation to distinguish comparisons with const operands.
In D36465#835650, @kcc wrote:

I am fine with breaking the API. Whoever uses this API will need to add a tiny bit of code to work with the new compiler (and that code will be compatible with the old version).
It's better to break the API this way than to introduce the flags or weak aliases, etc

Please update the documentation in this patch. (mention that these functions are emitted by clang >= 2017-08-XX)

Make sure to run 'ninja check-fuzzer'. Most likely it will break due to the API change, fix it in libFuzzer (in a simple way, by calling __sanitizer_cov_trace_cmpN)

Find all uses of __sanitizer_cov_trace_cmp1 in projects/compiler-rt/lib/sanitizer_common and update those files.

Aug 8 2017, 11:13 AM
dvyukov added a comment to D36465: [RFC] Change cmp instrumentation to distinguish comparisons with const operands.

Kostya, Dima,

Do we need to put this code behind a flag (probably yes, if we don't want to break the API for the existing users)?
Any other comments?

Aug 8 2017, 7:51 AM

Aug 1 2017

dvyukov accepted D36192: [tsan] Fix format string in WriteMemoryProfile.
Aug 1 2017, 11:08 PM · Restricted Project

Jul 23 2017

dvyukov accepted D35690: [Sanitizers] TSan allocator set errno on failure..
Jul 23 2017, 12:58 AM

Jul 20 2017

dvyukov added inline comments to D35690: [Sanitizers] TSan allocator set errno on failure..
Jul 20 2017, 10:41 PM
dvyukov added inline comments to D35690: [Sanitizers] TSan allocator set errno on failure..
Jul 20 2017, 10:34 PM
dvyukov added inline comments to D35690: [Sanitizers] TSan allocator set errno on failure..
Jul 20 2017, 10:49 AM

Jul 18 2017

dvyukov added a comment to D35555: [MIPS][TSAN] Fix test user_malloc.cc.

Running ninja check-tsan with this change on linux/amd64 gives me:
https://gist.githubusercontent.com/dvyukov/517dec28d8aecca5b3b8d6f94d0a0c9c/raw/adc41512c8cfdbf3022bfbc97aa75473c962b7bf/gistfile1.txt
This init sequence solves chicken and egg problem to large degree. This sequences served us well for years and I would feel nervous changing it even if no tests break on linux. I think it's better to do what asan does for dlsym (see AllocateFromLocalPool in asan sources), and I guess we need to move this code to sanitizer_common (not sure what msan does for this).

Jul 18 2017, 6:28 AM

Jul 14 2017

dvyukov committed rL308018: tsan: optimize sync clock memory consumption.
tsan: optimize sync clock memory consumption
Jul 14 2017, 4:30 AM
dvyukov closed D35323: tsan: optimize sync clock memory consumption.

Submitted as 308018.

Jul 14 2017, 4:30 AM
dvyukov added inline comments to D35323: tsan: optimize sync clock memory consumption.
Jul 14 2017, 4:29 AM
dvyukov updated the diff for D35323: tsan: optimize sync clock memory consumption.
Jul 14 2017, 4:28 AM

Jul 12 2017

dvyukov created D35323: tsan: optimize sync clock memory consumption.
Jul 12 2017, 12:55 PM
dvyukov committed rL307786: tsan: remove some clock-related stats.
tsan: remove some clock-related stats
Jul 12 2017, 5:55 AM
dvyukov committed rL307785: tsan: refactor SyncClock code.
tsan: refactor SyncClock code
Jul 12 2017, 5:51 AM
dvyukov committed rL307784: tsan: prepare clock for future changes.
tsan: prepare clock for future changes
Jul 12 2017, 5:45 AM
dvyukov committed rL307781: tsan: s/-1/kInvalidTid/.
tsan: s/-1/kInvalidTid/
Jul 12 2017, 5:37 AM
dvyukov committed rL307780: tsan: give debug names to dense allocators.
tsan: give debug names to dense allocators
Jul 12 2017, 5:34 AM
dvyukov committed rL307778: tsan: don't create sync objects on acquire-load.
tsan: don't create sync objects on acquire-load
Jul 12 2017, 5:28 AM
dvyukov committed rL307777: tsan: add another test for clock growth.
tsan: add another test for clock growth
Jul 12 2017, 5:25 AM
dvyukov committed rL307776: tsan: add test for __tsan_java_find.
tsan: add test for __tsan_java_find
Jul 12 2017, 5:24 AM

Jul 10 2017

dvyukov added a comment to D35217: Fix PR33732.

Please go over other sanitizer APIs and check if we have any other i8/16/32 args. dfsan?

Jul 10 2017, 12:22 PM
dvyukov edited reviewers for D35098: [asan] For iOS/AArch64, if the dynamic shadow doesn't fit, restrict the VM space, added: alekseyshl, vitalybuka; removed: dvyukov.
Jul 10 2017, 12:59 AM · Restricted Project
dvyukov accepted D35157: [tsan] Add support for running TSan tests on iOS simulator and devices.

LGTM with a nit

Jul 10 2017, 12:56 AM · Restricted Project
dvyukov added inline comments to D35154: [tsan] Add a max VM address check for Darwin/AArch64.
Jul 10 2017, 12:52 AM · Restricted Project
dvyukov accepted D35154: [tsan] Add a max VM address check for Darwin/AArch64.
Jul 10 2017, 12:50 AM · Restricted Project
dvyukov accepted D35147: [tsan] Add a mapping for Darwin/AArch64.
Jul 10 2017, 12:49 AM · Restricted Project
dvyukov accepted D35134: [tsan] Add comments for the bool argument of ThreadIgnoreBegin/ThreadIgnoreSyncBegin, NFC..
Jul 10 2017, 12:46 AM · Restricted Project
dvyukov accepted D35143: [tsan] Port setjmp/longjmp assembly to Darwin/AArch64.

LGTM with a nit

Jul 10 2017, 12:46 AM · Restricted Project

Jul 5 2017

dvyukov accepted D35016: [tsan] Use pthread_sigmask instead of sigprocmask to block signals in a thread on Darwin.
Jul 5 2017, 11:04 AM · Restricted Project
dvyukov added inline comments to D35016: [tsan] Use pthread_sigmask instead of sigprocmask to block signals in a thread on Darwin.
Jul 5 2017, 10:36 AM · Restricted Project

Jun 22 2017

dvyukov added a comment to D34451: [RFC] Add KMSAN instrumentation to MSan pass.

Evgenii, please take a look at actual pass changes.

Jun 22 2017, 1:57 AM · Restricted Project
dvyukov added inline comments to D34451: [RFC] Add KMSAN instrumentation to MSan pass.
Jun 22 2017, 1:56 AM · Restricted Project
dvyukov added inline comments to D34451: [RFC] Add KMSAN instrumentation to MSan pass.
Jun 22 2017, 1:45 AM · Restricted Project
dvyukov added a comment to D34451: [RFC] Add KMSAN instrumentation to MSan pass.

I know, not the feedback you was looking for :)

Jun 22 2017, 1:28 AM · Restricted Project

Jun 13 2017

dvyukov committed rL305281: tsan: fix reading of mutex flags.
tsan: fix reading of mutex flags
Jun 13 2017, 2:38 AM
dvyukov committed rL305273: tsan: fix pedantic warnings.
tsan: fix pedantic warnings
Jun 13 2017, 12:10 AM

May 25 2017

dvyukov added a comment to D25509: tsan: intercept libatomic.

I don't have time to figure out how to support Mac. Filed https://github.com/google/sanitizers/issues/816 so that this is not lost.

May 25 2017, 2:28 AM
dvyukov accepted D33286: Don't require ThreadState to be contained within tls on all platforms.

LGTM with a nit

May 25 2017, 12:51 AM

May 24 2017

dvyukov accepted D33521: [sanitizer] Pair atomic acquire with release in BlockingMutex::Unlock.
May 24 2017, 11:59 PM
dvyukov added inline comments to D33286: Don't require ThreadState to be contained within tls on all platforms.
May 24 2017, 2:04 AM
dvyukov added a comment to D33454: [sanitizer] Change the 32-bit Primary AllocateRegion to reduce fragmentation.

looks good to me

May 24 2017, 1:41 AM
dvyukov added a comment to D33454: [sanitizer] Change the 32-bit Primary AllocateRegion to reduce fragmentation.

I am not certain about the Windows impact of this change

May 24 2017, 1:41 AM
dvyukov added a comment to D33454: [sanitizer] Change the 32-bit Primary AllocateRegion to reduce fragmentation.

FWIW I've solved a similar problem in tcmalloc by trimming blocks either on left or on right. Namely, if heap grows up we trim on right; if heap grows down we trim on left. But I don't see how it is better than this solution.

May 24 2017, 1:37 AM
dvyukov added inline comments to D33325: [sanitizer] Avoid possible deadlock in child process after fork.
May 24 2017, 1:19 AM · Restricted Project

May 23 2017

dvyukov added a comment to D33286: Don't require ThreadState to be contained within tls on all platforms.

I think that's because we use _shadow_ memory to store pointer to ThreadState. See cur_thread in tsan_platform_mac.cc. We probably need to skip that slot or something.

May 23 2017, 8:17 AM
dvyukov added inline comments to D33325: [sanitizer] Avoid possible deadlock in child process after fork.
May 23 2017, 7:32 AM · Restricted Project
dvyukov added a comment to D33325: [sanitizer] Avoid possible deadlock in child process after fork.

I don't completely understand this. allocator_fork_no_hang.cc is broken and deserves deadlocking. Why are we trying to fix this program only under sanitizers rather than detecting and reporting the bug? Sanitizers are meant to be less forgiving than production environment. Why are we trying to conceal the bug?

Yes, the testcase deserves deadlocking (malloc is not async signal safe). And the actual bug is reported here: https://bugzilla.gnome.org/show_bug.cgi?id=738620.
The motivation for "fixing" this in sanitizers is that most of modern allocators (Glibc, tcmalloc, jemalloc) are actually fork safe, so why not to do the same in sanitizers. And despite the fact that calling malloc after multi-threaded fork is not allowed, many people still would expect their code to work (since it works with Glibc/tcmalloc/jemalloc etc).

May 23 2017, 7:29 AM · Restricted Project
dvyukov added a comment to D33325: [sanitizer] Avoid possible deadlock in child process after fork.

I don't completely understand this. allocator_fork_no_hang.cc is broken and deserves deadlocking. Why are we trying to fix this program only under sanitizers rather than detecting and reporting the bug? Sanitizers are meant to be less forgiving than production environment. Why are we trying to conceal the bug?

May 23 2017, 6:18 AM · Restricted Project
dvyukov accepted D33286: Don't require ThreadState to be contained within tls on all platforms.

Thanks!

May 23 2017, 12:22 AM

May 22 2017

dvyukov added a comment to D33286: Don't require ThreadState to be contained within tls on all platforms.

Yes, please do this only for Darwin. These things are extremely fragile, it's nice to be able to rely at least on some things. If we change it to if, it will silently break on other platforms and we will not notice.
You can either move some code to platform* files, or merely provide a flag in platform* files and use it here.

May 22 2017, 12:59 AM

May 10 2017

dvyukov added a comment to D33007: [scudo] Use our own combined allocator.

Looks fine to me. Aleksey, do you want to take a look?

May 10 2017, 2:30 PM

May 8 2017

dvyukov added inline comments to D32971: [scudo] CRC32 optimizations.
May 8 2017, 1:50 PM
dvyukov added inline comments to D32971: [scudo] CRC32 optimizations.
May 8 2017, 12:54 PM
dvyukov added inline comments to D32971: [scudo] CRC32 optimizations.
May 8 2017, 12:47 PM
dvyukov added inline comments to D32971: [scudo] CRC32 optimizations.
May 8 2017, 12:04 PM

May 5 2017

dvyukov edited reviewers for D32895: [ASAN] Insert call to __asan_init and load of dynamic shadow address in correct order, added: alekseyshl; removed: dvyukov.
May 5 2017, 7:29 AM · Restricted Project

May 3 2017

dvyukov accepted D31630: [tsan] Detect races on modifying accesses in Swift code.

Thanks!
I think this now provides a solid foundation for future extensions.

May 3 2017, 4:17 AM · Restricted Project

May 2 2017

dvyukov added a comment to D31395: [Asan] Disable inline instrumentation for MMU-less targets.

One more thing: now that D31592 is landed, would you mind if we do the same for Tsan?

May 2 2017, 9:46 AM · Restricted Project
dvyukov added a comment to D31395: [Asan] Disable inline instrumentation for MMU-less targets.

Dmitry, with your permission I'm going to update and commit this patch as it seems to be useful regardless of which way we support sanitizers on MMU-less platforms.

May 2 2017, 9:40 AM · Restricted Project
dvyukov committed rL301927: tsan: allow fast large MemoryRangeSet on non-Windows Go.
tsan: allow fast large MemoryRangeSet on non-Windows Go
May 2 2017, 8:28 AM
dvyukov accepted D32705: [compiler-rt] move tsan's Android __get_tls() to sanitizer_common.

Thanks!

May 2 2017, 8:07 AM
dvyukov added inline comments to D32705: [compiler-rt] move tsan's Android __get_tls() to sanitizer_common.
May 2 2017, 4:56 AM

May 1 2017

dvyukov added a comment to D31593: [Asan] Introduce the concept of physical shadow memory.

This patch introduces a class of shadow pointers designed to be the interface to physical shadow memory. The idea behind shadow pointers is to encapsulate the physical memory mechanics so that:

  • sequential accesses to the same shadow page do not cause extra virtual-to-physical address translations, thus providing acceptable performance in the MMU-less mode and
  • sanitizer developers are not forced to take care of the organization of physical memory when dealing with shadow accesses.

    This patch intentionally includes (not-yet-committed) D31395 so one could apply and test it if necessary. Once generally accepted, I will remove those common parts and update the patch.
May 1 2017, 3:58 AM · Restricted Project
dvyukov committed rL301795: tsan: support linker init flag in __tsan_mutex_destroy.
tsan: support linker init flag in __tsan_mutex_destroy
May 1 2017, 3:14 AM

Apr 29 2017

dvyukov added inline comments to D32649: [scudo] Add Android support.
Apr 29 2017, 2:07 PM