1. Refactor getDeclAtPosition() to use SelectionTree + targetDecl() (details)
  2. [scudo][standalone] Fix Secondary bug w/ freelist (details)
Commit b6429cdd65ffa28591c5b0da37244ab66d0b1785 by zeratul976
Refactor getDeclAtPosition() to use SelectionTree + targetDecl()
Summary: This fixes issue #163, among other improvements to
Reviewers: sammccall
Subscribers: jkorous, mgrang, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision:
The file was modifiedclang-tools-extra/clangd/XRefs.cpp
The file was modifiedclang-tools-extra/clangd/unittests/SymbolInfoTests.cpp
The file was modifiedclang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp
The file was modifiedclang-tools-extra/clangd/unittests/XRefsTests.cpp
Commit c7bc3db23cafee2b51c43bfbe2c02f61cf115721 by kostyak
[scudo][standalone] Fix Secondary bug w/ freelist
Summary: cferris@ found an issue due to the new Secondary free list
behavior and unfortunately it's completely my fault. The issue is
- I lost track of the (major) fact that the Combined assumes that
all chunks returned by the Secondary are zero'd out apprioriately
when dealing with `ZeroContents`. With the introduction of the
freelist, it's no longer the case as there can be a small portion
of memory between the header and the next page boundary that is
left untouched (the rest is zero'd via release). So the next time
that block is returned, it's not fully zero'd out.
- There was no test that would exercise that behavior :(
There are several ways to fix this, the one I chose makes the most sense
to me: we pass `ZeroContents` to the Secondary's `allocate` and it
zero's out the block if requested and it's coming from the freelist. The
prevents an extraneous `memset` in case the block comes from `map`.
Another possbility could have been to `memset` in `deallocate`, but it's
probably overzealous as all secondary blocks don't need to be zero'd
Add a test that would have found the issue prior to fix.
Reviewers: morehouse, hctim, cferris, pcc, eugenis, vitalybuka
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision:
The file was modifiedcompiler-rt/lib/scudo/standalone/combined.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/combined_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/secondary.h