external/sawbuck.git
7 weeks agoRemove Syzygy-related code from the Sawbuck repository. master
chrisha@chromium.org [Wed, 3 Sep 2014 13:12:50 +0000 (13:12 +0000)]
Remove Syzygy-related code from the Sawbuck repository.

Syzygy has now been moved to its own repository.

R=siggi@chromium.org

Review URL: https://codereview.appspot.com/133460044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2290 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoModify ZebraBlockHeap to accept a heap to use for internal allocations.
chrisha@chromium.org [Fri, 29 Aug 2014 21:20:43 +0000 (21:20 +0000)]
Modify ZebraBlockHeap to accept a heap to use for internal allocations.

This also adds an 'internal heap' to the BlockHeapManager. With this change
the ZebraBlockHeap no reports internal memory use directly to the shadow
memory.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/132410043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2289 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoAdd GetAllocationSize support to ZebraBlockHeap.
chrisha@chromium.org [Fri, 29 Aug 2014 20:04:35 +0000 (20:04 +0000)]
Add GetAllocationSize support to ZebraBlockHeap.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/135210045

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2288 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoAdded kUnboundedSize (~0) to specify unlimited capacity instead of using 0.
peterssen@google.com [Fri, 29 Aug 2014 19:11:46 +0000 (19:11 +0000)]
Added kUnboundedSize (~0) to specify unlimited capacity instead of using 0.
Trimming a quarantine with max size 0 should flush it.
BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/139830043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2287 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoAdd GetAllocationSize support to CtMallocHeap.
chrisha@chromium.org [Fri, 29 Aug 2014 18:43:48 +0000 (18:43 +0000)]
Add GetAllocationSize support to CtMallocHeap.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/134110044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2286 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoAdd GetAllocationSize support to WinHeap and InternalHeap.
chrisha@chromium.org [Fri, 29 Aug 2014 16:26:03 +0000 (16:26 +0000)]
Add GetAllocationSize support to WinHeap and InternalHeap.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/135200043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2285 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoRemove the unguarded allocation heap.
sebmarchand@chromium.org [Fri, 29 Aug 2014 15:48:57 +0000 (15:48 +0000)]
Remove the unguarded allocation heap.

This isn't really needed and it adds some useless complexity to the block heap manager.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/138880043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2284 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoAdd pushad/popad instructions to assembler.
siggi@chromium.org [Fri, 29 Aug 2014 15:25:41 +0000 (15:25 +0000)]
Add pushad/popad instructions to assembler.

R=sebmarchand@chromium.org, chrisha@chromium.org

Review URL: https://codereview.appspot.com/136990043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2283 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoAdd 'GetAllocationSize' to HeapInterface.
chrisha@chromium.org [Fri, 29 Aug 2014 15:19:38 +0000 (15:19 +0000)]
Add 'GetAllocationSize' to HeapInterface.

Currently no heaps support this feature. It will be added to the existing heaps one by one in later CLs.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/131680043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2282 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoRemove HeapProxy and use the BlockHeapManager by default.
sebmarchand@chromium.org [Fri, 29 Aug 2014 13:21:11 +0000 (13:21 +0000)]
Remove HeapProxy and use the BlockHeapManager by default.

I've run some Dromaeo benchmarks and there's no significant performance difference between the 2 version (it's in the noise of the measure).

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/135780043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2281 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoAdd support for the HEAP_ZERO_MEMORY flag to HeapAlloc.
sebmarchand@chromium.org [Thu, 28 Aug 2014 21:13:41 +0000 (21:13 +0000)]
Add support for the HEAP_ZERO_MEMORY flag to HeapAlloc.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/139820043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2280 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoChange CircularQueueConstructor to accept an allocator rather than a MemoryNotifierIn...
chrisha@chromium.org [Thu, 28 Aug 2014 19:58:36 +0000 (19:58 +0000)]
Change CircularQueueConstructor to accept an allocator rather than a MemoryNotifierInterface.

This makes it more generic, and consistent with use elsewhere.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/132380043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2279 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoCreate InternalHeap.
chrisha@chromium.org [Thu, 28 Aug 2014 18:44:06 +0000 (18:44 +0000)]
Create InternalHeap.

This is a heap wrapper that takes any HeapInterface and a MemoryNotificationInterface, and makes the heap notify all allocations as being for internal use.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/136890043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2278 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoCleanup ZebraBlockHeap.
chrisha@chromium.org [Thu, 28 Aug 2014 18:07:30 +0000 (18:07 +0000)]
Cleanup ZebraBlockHeap.

This removes some things from the heap and makes them members of the heap itself.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/133160043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2277 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoFix a bug in Shadow::IsBeginningOfBlockBody
sebmarchand@chromium.org [Thu, 28 Aug 2014 16:28:17 +0000 (16:28 +0000)]
Fix a bug in Shadow::IsBeginningOfBlockBody

The beginning of a block might be in its trailer in the case of a 0 bytes block.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/133110044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2276 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoAdd a new method to check if an address point to the beginning of an user alloc
sebmarchand@chromium.org [Wed, 27 Aug 2014 20:37:16 +0000 (20:37 +0000)]
Add a new method to check if an address point to the beginning of an user alloc

This will be useful to check if a block has been allocated without guards.

R=chrisha@chromium.org

BUG=

Review URL: https://codereview.appspot.com/131430043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2275 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoCreate gitdeps.py script.
chrisha@chromium.org [Wed, 27 Aug 2014 20:32:59 +0000 (20:32 +0000)]
Create gitdeps.py script.

This emulates 'gclient' behaviour, but for 'deep' GIT dependencies. It will be necessary once Chrome has transitioned to a pure GIT checkout, as we will be unable to roll DEPS beyond that point.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/123660043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2274 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoFix a bug in Shadow::IsRightRedzone
sebmarchand@chromium.org [Wed, 27 Aug 2014 19:59:50 +0000 (19:59 +0000)]
Fix a bug in Shadow::IsRightRedzone

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/138740044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2273 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoIntegrated the ZebraBlockHeap to the BlockHeapManager.
peterssen@google.com [Tue, 26 Aug 2014 20:31:29 +0000 (20:31 +0000)]
Integrated the ZebraBlockHeap to the BlockHeapManager.

There are some details missing since the HeapManager is not finished yet.

I'm sorry for the delay. I faced not one, but two bugs with
non-deterministic behaviour, most times the tests passed, but a very
few times just failed on random places.
It was difficult to debug since I had no idea where or when it was
going to break.
Those bugs are fixed now, ironically were caused by use after free.
The good part is that now I have a very good idea how everything works
since I had to dig deep to discover the bugs.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/125510044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2272 15e8cca8-e42c-11de-a347-f34a4f72eb7d

8 weeks agoPromoted NullMemoryNotifier outside unit tests.
peterssen@google.com [Tue, 26 Aug 2014 17:58:30 +0000 (17:58 +0000)]
Promoted NullMemoryNotifier outside unit tests.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/130590043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2271 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd protobuf library to third_party.
chrisha@chromium.org [Mon, 25 Aug 2014 15:09:08 +0000 (15:09 +0000)]
Add protobuf library to third_party.

This is going to be used by SyzyASAN for enhanced crash reporting data.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/130390045

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2270 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoFix the HeapCheckerTest.IsHeapCorrupt test.
sebmarchand@chromium.org [Thu, 21 Aug 2014 18:55:10 +0000 (18:55 +0000)]
Fix the HeapCheckerTest.IsHeapCorrupt test.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/132780043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2269 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdded enable_zebra_block_heap flag to SyzyASan.
peterssen@google.com [Thu, 21 Aug 2014 18:23:15 +0000 (18:23 +0000)]
Added enable_zebra_block_heap flag to SyzyASan.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/130370043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2268 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoMake LargeBlockHeap use HeapAllocator rather than MemoryNotifierAllocator.
chrisha@chromium.org [Thu, 21 Aug 2014 15:38:00 +0000 (15:38 +0000)]
Make LargeBlockHeap use HeapAllocator rather than MemoryNotifierAllocator.

A further CL will add LBH support to BHM. The BHM will own an internal-use-only CtMallocHeap.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/125630043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2267 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoClean up an old TODO and make RPC utils reusable.
siggi@chromium.org [Wed, 20 Aug 2014 20:11:01 +0000 (20:11 +0000)]
Clean up an old TODO and make RPC utils reusable.

R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/130360043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2266 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoRemove the nested heap API.
sebmarchand@chromium.org [Wed, 20 Aug 2014 14:46:11 +0000 (14:46 +0000)]
Remove the nested heap API.

This isn't currently used and it isn't compatible with the new design, we'll reimplement this if needed.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/128460044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2265 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoRemove the references to HeapProxy in the unittest of HeapChecker.
sebmarchand@chromium.org [Tue, 19 Aug 2014 20:50:00 +0000 (20:50 +0000)]
Remove the references to HeapProxy in the unittest of HeapChecker.

Also remove the dependency between HeapChecker and AsanRuntime as we don't need it.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/126410044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2264 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoMove MemoryNotifierAllocator to its own file, and create HeapAllocator.
chrisha@chromium.org [Tue, 19 Aug 2014 18:42:35 +0000 (18:42 +0000)]
Move MemoryNotifierAllocator to its own file, and create HeapAllocator.

Turns out that MemoryNotifierAllocator isn't going to cut it for us, because the STL heap does alignments mod 4, and the
shadow memory barfs. The new approach will be to use a HeapAllocator combined with an instance of a reporting heap
(either a WinHeap or a CtMallocHeap), and have internal STL structures use *that*.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/123350045

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2263 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoRemove some references to HeapProxy from the unittests.
sebmarchand@chromium.org [Tue, 19 Aug 2014 14:18:39 +0000 (14:18 +0000)]
Remove some references to HeapProxy from the unittests.

Some tests are using a HeapProxy to create ASan blocks, this CL make them use a (new) SimpleHeapManager instead.

Some references to HeapProxy have also been removed from FakeAsanBlock.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/124230043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2262 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd a new flag to use ctmalloc in BlockHeapManager.
sebmarchand@chromium.org [Mon, 18 Aug 2014 23:07:55 +0000 (23:07 +0000)]
Add a new flag to use ctmalloc in BlockHeapManager.

This feature isn't supported yet, but I plan to plug it soon and then we'll have a flag to control it.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/124550044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2261 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoRemove DirectAllocation.
chrisha@chromium.org [Mon, 18 Aug 2014 15:37:24 +0000 (15:37 +0000)]
Remove DirectAllocation.

The functionality of this class has since been split up across LargeBlockHeap and block.*.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/130190043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2260 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoReorganize ShadowMarkers.
chrisha@chromium.org [Fri, 15 Aug 2014 20:58:39 +0000 (20:58 +0000)]
Reorganize ShadowMarkers.

This lifts the ShadowMarker definition out of the Shadow class, placing it on
its own. Due to the increased complexity and number of markers it also adds a
handful of functions for querying, modifying and generating shadow markers,
removing this knowledge from the Shadow implementation itself. Finally,
extensive unittests are added.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/128330043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2259 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdded a new flag to specify the ratio of the memory used by the quarantine of the...
peterssen@google.com [Fri, 15 Aug 2014 17:35:57 +0000 (17:35 +0000)]
Added a new flag to specify the ratio of the memory used by the quarantine of the ZebraBlockHeap in SyzyASan.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/126240043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2258 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd support for subsampling of SyzyASAN allocation guards to BlockHeapManager.
sebmarchand@chromium.org [Fri, 15 Aug 2014 16:00:06 +0000 (16:00 +0000)]
Add support for subsampling of SyzyASAN allocation guards to BlockHeapManager.

This is mostly a copy of the code living in asan_heap*.* ....

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/130070043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2257 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoDeclares WindowsHeapAdapter
sebmarchand@chromium.org [Thu, 14 Aug 2014 19:23:52 +0000 (19:23 +0000)]
Declares WindowsHeapAdapter

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/121510043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2256 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoReplace the STL queue by a circular queue in the ZebraBlockHeap.
peterssen@google.com [Wed, 13 Aug 2014 18:50:18 +0000 (18:50 +0000)]
Replace the STL queue by a circular queue in the ZebraBlockHeap.
This solves the memory fragmentation problem and makes the
ZebraBlockHeap twice as fast.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/122500044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2255 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoTest memory interceptor access errors.
siggi@chromium.org [Wed, 13 Aug 2014 16:26:20 +0000 (16:26 +0000)]
Test memory interceptor access errors.

Tweak test utilities to suit.

R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/122500043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2254 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoImplemented a circular queue.
peterssen@google.com [Wed, 13 Aug 2014 16:19:53 +0000 (16:19 +0000)]
Implemented a circular queue.
In the current ZebraBlockHeap implemetation the STL queues spawns
lots of small but expensive allocation. A circular queue should
boost performance and avoid memory fragmentation.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/121530043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2253 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoStart testing memory interceptors explicitly.
siggi@chromium.org [Tue, 12 Aug 2014 14:33:47 +0000 (14:33 +0000)]
Start testing memory interceptors explicitly.
A little more refactoring on test helper.

R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/127910043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2252 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd new AppVerifier exception due to changes in base.
chrisha@chromium.org [Mon, 11 Aug 2014 15:18:00 +0000 (15:18 +0000)]
Add new AppVerifier exception due to changes in base.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/128860044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2251 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoMove MemoryAccessorTester to unittest_util.h/cc for reuse.
siggi@chromium.org [Mon, 11 Aug 2014 13:43:04 +0000 (13:43 +0000)]
Move MemoryAccessorTester to unittest_util.h/cc for reuse.

R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/127880043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2250 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoRefactor memory interceptor test fixture into a class.
siggi@chromium.org [Sat, 9 Aug 2014 15:13:07 +0000 (15:13 +0000)]
Refactor memory interceptor test fixture into a class.

R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/125870044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2249 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdded MemoryNotifierInterface integration to ZebraBlockHeap internal
peterssen@google.com [Fri, 8 Aug 2014 21:27:03 +0000 (21:27 +0000)]
Added MemoryNotifierInterface integration to ZebraBlockHeap internal
data structures.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/126740043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2248 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoRoll DEPS.
chrisha@chromium.org [Fri, 8 Aug 2014 20:09:06 +0000 (20:09 +0000)]
Roll DEPS.

This hasn't happened in a while so a fw things have changed:

- There's a build dependency on a chrome/VERSION file. Added a dummy one.
- gyp_chrome is no longer usable outside of Chrome. Switched to using gyp
  itself, with a small compatibility wrapper in syzygy/build.
- process, string, logging and file related headers have seen significant
  revamps, including API changes.

Despite the change, most of this CL reflects mechanical substitutions.

BUG=
R=sebmarchand@chromium.org, siggi@chromium.org

Review URL: https://codereview.appspot.com/124930043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2247 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd a function to write a PDB file.
fdoray@chromium.org [Thu, 7 Aug 2014 21:39:25 +0000 (21:39 +0000)]
Add a function to write a PDB file.

The function receives a vector of symbols and generates a full valid
PDB file that contains them.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/123000043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2246 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoPlug the heap error callback into BlockHeapManager.
sebmarchand@chromium.org [Thu, 7 Aug 2014 21:27:07 +0000 (21:27 +0000)]
Plug the heap error callback into BlockHeapManager.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/115710043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2245 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoBreak memory interceptors out to a separate file.
siggi@chromium.org [Thu, 7 Aug 2014 15:30:08 +0000 (15:30 +0000)]
Break memory interceptors out to a separate file.

R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/123900043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2244 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoFix ASAN interceptor build uncleanliness.
siggi@chromium.org [Thu, 7 Aug 2014 14:58:38 +0000 (14:58 +0000)]
Fix ASAN interceptor build uncleanliness.

R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/124860043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2243 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd a PDB public stream writer.
fdoray@chromium.org [Wed, 6 Aug 2014 21:08:57 +0000 (21:08 +0000)]
Add a PDB public stream writer.

The public stream has reference to all symbols of the symbol record
stream that are public.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/117610044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2242 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoImplemented BlockQuarantineInterface properly in ZebraBlockHeap.
peterssen@google.com [Wed, 6 Aug 2014 20:41:33 +0000 (20:41 +0000)]
Implemented BlockQuarantineInterface properly in ZebraBlockHeap.
I used the old approach; just mark the addresses (Allocated/Quarantined)
in a hash table.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/122100043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2241 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd IsAllocated support to CtMallocHeap.
chrisha@chromium.org [Tue, 5 Aug 2014 18:23:46 +0000 (18:23 +0000)]
Add IsAllocated support to CtMallocHeap.

This adds support to the underlying CTMalloc library, and exposes the new functionality in CtMallocHeap. With this CL the heap is now fully functional.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/116670043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2229 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd a PDB symbol record writer.
fdoray@chromium.org [Tue, 5 Aug 2014 16:37:14 +0000 (16:37 +0000)]
Add a PDB symbol record writer.

Add a function that can write a PDB symbol record stream given a vector
of Symbol instances.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/122050043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2228 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd an ImageSymbol class to the PDB writer.
fdoray@chromium.org [Tue, 5 Aug 2014 15:24:48 +0000 (15:24 +0000)]
Add an ImageSymbol class to the PDB writer.

An ImageSymbol can write to the PDB symbol record stream a symbol that
associates a name and a type with a location in an image.

The symbol type must be one of S_LDATA32, S_GDATA32, S_PUB32,
S_LMANDATA or S_GMANDATA.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/120970044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2227 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoDeclares BlockHeapManager.
sebmarchand@chromium.org [Tue, 5 Aug 2014 15:07:29 +0000 (15:07 +0000)]
Declares BlockHeapManager.

It doesn't report any heap error yet (This CL is already pretty long).

Most of the unittests are coming from asan_heap_unittests.cc (with some modification to adapt them to BlockHeapManager).

R=chrisha@chromium.org

BUG=

Review URL: https://codereview.appspot.com/116510043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2226 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoMake CTMalloc use a LRU freelist for its partitions.
chrisha@chromium.org [Tue, 5 Aug 2014 14:23:11 +0000 (14:23 +0000)]
Make CTMalloc use a LRU freelist for its partitions.

This increases memory fragmentation, but also reduces the chance of memory aliasing occurring in a SyzyASan instrumented build.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/117560043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2225 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd a SectionOffsetAddress class.
fdoray@chromium.org [Mon, 4 Aug 2014 21:18:20 +0000 (21:18 +0000)]
Add a SectionOffsetAddress class.

Pdb files contain address represented as segment/offset
pairs. This CL introduces a class to encapsulate this
concept.

It has the same interface as AddressImpl, except for the
operator- that accepts another address of the same type.
The class is a lightweight wrapper for 2 integers, which
can be freely copied.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/114610045

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2224 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd a base class for PDB symbols.
fdoray@chromium.org [Mon, 4 Aug 2014 17:20:39 +0000 (17:20 +0000)]
Add a base class for PDB symbols.

Every PDB symbol has a type id and can be written to the
symbol record stream.

Types of symbols are defined in the Microsoft_Cci_Pdb::SYM enum.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/116500043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2223 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd a GetAlignment function in common.
fdoray@chromium.org [Mon, 4 Aug 2014 17:01:42 +0000 (17:01 +0000)]
Add a GetAlignment function in common.

Move the code from the AddressImpl::GetAlignement method to the
common::GetAlignment function, so that it can be shared by different
address implementations.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/121180043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2222 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoDisable CTMalloc heap debug features.
chrisha@chromium.org [Mon, 4 Aug 2014 14:20:11 +0000 (14:20 +0000)]
Disable CTMalloc heap debug features.

These cause all allocations to be aligned on a 4-byte boundary rather than an 8-byte boundary, in conflict with SyzyASan expectations.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/118600043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2221 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoRemoved odd 'const' qualifier in function GetCount because we need to be able to...
peterssen@google.com [Fri, 1 Aug 2014 21:00:25 +0000 (21:00 +0000)]
Removed odd 'const' qualifier in function GetCount because we need to be able to modify the state of the quarantine lock when calling this function.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/117390044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2220 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoCreate CtMallocHeap.
chrisha@chromium.org [Fri, 1 Aug 2014 20:38:21 +0000 (20:38 +0000)]
Create CtMallocHeap.

This is a first pass at integrating CTMalloc into the SyzyASan heap API. Later CLs will add 'IsAllocated' support, and LRU reuse.

Create ctmalloc heap.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/116520044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2219 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoSmall QuarantineInterface refactor.
chrisha@chromium.org [Fri, 1 Aug 2014 14:50:47 +0000 (14:50 +0000)]
Small QuarantineInterface refactor.

This refactors the quarantine interface by moving the SizeFunctor template paramter down a level in the hierarchy, to SizeLimitedQuarantine, as it wasn't referenced by QuarantineInterface. This also adds a quarantine object-count function to the base interface. Finally, a BlockQuarantine specialization is defined.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/122790043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2218 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoFix the namespace of the [Simple|Large]BlockHeap.
sebmarchand@chromium.org [Thu, 31 Jul 2014 22:31:08 +0000 (22:31 +0000)]
Fix the namespace of the [Simple|Large]BlockHeap.

R=chrisha@chromium.org
BUG=

Review URL: https://codereview.appspot.com/117420043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2217 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdded a new flag to specify the size of the ZebraBlockHeap in SyzyASan.
peterssen@google.com [Thu, 31 Jul 2014 21:15:07 +0000 (21:15 +0000)]
Added a new flag to specify the size of the ZebraBlockHeap in SyzyASan.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/115530043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2216 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoRolls Sawbuck deps to Chromium r271365 and deals with fallout.
siggi@chromium.org [Thu, 31 Jul 2014 17:04:06 +0000 (17:04 +0000)]
Rolls Sawbuck deps to Chromium r271365 and deals with fallout.

R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/120900043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2215 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd a PDB debug info stream writer.
fdoray@chromium.org [Thu, 31 Jul 2014 14:49:22 +0000 (14:49 +0000)]
Add a PDB debug info stream writer.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/117390043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2214 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoRename GetHeapType to GetHeapFeatures, and add optional IsAllocated function.
chrisha@chromium.org [Thu, 31 Jul 2014 14:23:27 +0000 (14:23 +0000)]
Rename GetHeapType to GetHeapFeatures, and add optional IsAllocated function.

This adds support for an optionally implemented ability to query a heap if it has made the given allocation. The HeapManager will require this when recovering from a corrupted BlockTrailer.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/114570043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2213 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoVarious tweaks to get Sawbuck mostly building with VS2013.
siggi@chromium.org [Thu, 31 Jul 2014 14:07:28 +0000 (14:07 +0000)]
Various tweaks to get Sawbuck mostly building with VS2013.

Another DEPS roll will be necessary, as this version of icu does not
build with VS2013.

R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/120290043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2212 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoFix a bug in NestedHeapTest.IntegrationTest
sebmarchand@chromium.org [Wed, 30 Jul 2014 22:27:16 +0000 (22:27 +0000)]
Fix a bug in NestedHeapTest.IntegrationTest

TBR=chrisha@chromium.org
BUG=

Review URL: https://codereview.appspot.com/117400043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2211 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoPlumb MemoryNotificationInterface into LargeBlockHeap.
chrisha@chromium.org [Wed, 30 Jul 2014 20:41:41 +0000 (20:41 +0000)]
Plumb MemoryNotificationInterface into LargeBlockHeap.

This augments large block heap to report its internal memory use via MemoryNotificationInterface.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/115360045

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2210 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd an empty PDB type info stream writer.
fdoray@chromium.org [Wed, 30 Jul 2014 20:39:48 +0000 (20:39 +0000)]
Add an empty PDB type info stream writer.

Add a function that writes a valid PDB type info stream that contains no
types.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/113710043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2209 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd a PDB header writer.
fdoray@chromium.org [Wed, 30 Jul 2014 20:34:39 +0000 (20:34 +0000)]
Add a PDB header writer.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/116420046

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2208 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd a PDB section header stream writer.
fdoray@chromium.org [Wed, 30 Jul 2014 20:28:20 +0000 (20:28 +0000)]
Add a PDB section header stream writer.

This stream contains the IMAGE_SECTION_HEADER structures extracted from
the PE file for which a PDB is being generated.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/117380043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2207 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoImplemented the ZebraHeap
peterssen@google.com [Wed, 30 Jul 2014 20:19:06 +0000 (20:19 +0000)]
Implemented the ZebraHeap

A zebra-stripe heap allocates a (maximum) predefined amount of memory
and serves allocation requests with size less or equal to the system page
size.
It divides the memory pages into "even" and "odd" types (like zebra-stripes).
all the allocations are done in the even pages, just before the "odd" pages.
The "odd" pages can be protected againt read/write which gives a basic
mechanism for detecting buffer overflows.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/115280044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2206 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd a PDB string table writer.
fdoray@chromium.org [Wed, 30 Jul 2014 20:06:37 +0000 (20:06 +0000)]
Add a PDB string table writer.

A string table is found in the name stream and in the EC info header of the debug info stream of a PDB file.

This CL also creates the PDB writer project.

BUG=
R=chrisha@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/119350043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2205 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoExpose the PDB hash function.
fdoray@chromium.org [Wed, 30 Jul 2014 19:43:09 +0000 (19:43 +0000)]
Expose the PDB hash function.

The hash function used in the named streams table of a PDB file is also
used to generate the "public symbols" stream.

This CL moves the hash function out of the anonymous namespace of
pdb_util.cc so that it can be used to generate a "public symbols"
stream.

BUG=
R=chrisha@chromium.org, etienneb@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/115370043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2204 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAdd new authors to keep the SVN <-> GIT synchronization happy.
chrisha@chromium.org [Wed, 30 Jul 2014 19:39:47 +0000 (19:39 +0000)]
Add new authors to keep the SVN <-> GIT synchronization happy.

BUG=
TBR=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/117360044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2203 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoAllow PDB bit sets to be written without their size.
fdoray@chromium.org [Wed, 30 Jul 2014 19:03:05 +0000 (19:03 +0000)]
Allow PDB bit sets to be written without their size.

The "public" stream of a PDB contains a bit set that is not preceded by
its size. Instead, the size seems to be a constant.

This CL allows a bit set to be written without its size.

BUG=
R=chrisha@chromium.org, etienneb@chromium.org, sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/115360043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2202 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoFix ShadowMemoryNotifier unittest.
chrisha@chromium.org [Tue, 29 Jul 2014 21:48:20 +0000 (21:48 +0000)]
Fix ShadowMemoryNotifier unittest.

BUG=
R=sebmarchand@chromium.org
TBR=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/116390045

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2201 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoDefine ShadowMemoryNotifier.
chrisha@chromium.org [Tue, 29 Jul 2014 20:31:58 +0000 (20:31 +0000)]
Define ShadowMemoryNotifier.

This will be used by runtime components to notify the shadow memory of internal memory use.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/113650043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2200 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoDefine MemoryNotificationInterface.
chrisha@chromium.org [Tue, 29 Jul 2014 18:42:32 +0000 (18:42 +0000)]
Define MemoryNotificationInterface.

This defines an interface for internal SyzyASAN RTL classes to use to notify the runtime of their memory use for internal reasons. Similarly, it contains an STL-compatible allocator that calls the notification API, allowing internal classes to make use of STL containers transparently.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/114530043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2199 15e8cca8-e42c-11de-a347-f34a4f72eb7d

2 months agoDeclares HeapManager.
sebmarchand@chromium.org [Tue, 29 Jul 2014 14:12:23 +0000 (14:12 +0000)]
Declares HeapManager.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/113980043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2198 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoMove the ASan error info struct and function into their own file.
sebmarchand@chromium.org [Fri, 25 Jul 2014 18:12:45 +0000 (18:12 +0000)]
Move the ASan error info struct and function into their own file.

Sorry for the size of this CL... Most of this code has just been moved, here's more details for the file with a big positive diff:
- asan_error_info.[h/cc]: All the access/error information structure and functions have been moved here, there's no new code here, just some code shuffling.
- asan_error_info_unittest.cc: only AsanErrorInfoTest.ErrorInfoGetAsanBlockInfo is new, the rest is just some code shuffling.
- block_utils.cc: new file (but only 8 lines long !).
- block_utils_unittest.cc: Tests have been moved from asan_heap_unittest.cc
- unittest_util.h: I've moved some useful fixtures that were used in asan_heap.cc, no new code.
BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/113510043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2195 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoDefine LargeBlockHeap.
chrisha@chromium.org [Fri, 25 Jul 2014 14:19:36 +0000 (14:19 +0000)]
Define LargeBlockHeap.

This heap makes allocations directly from the operating system, prefixing and suffixing them with entire page-sized redzones. This is only intended for use with large allocations (hence the name) so that redzone overhead doesn't get too large.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/118290043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2194 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoCreate RecursiveLock.
chrisha@chromium.org [Thu, 24 Jul 2014 21:32:56 +0000 (21:32 +0000)]
Create RecursiveLock.

This creates a new lock reentrant lock primitive. Base specifically avoids having such a primitive. However, the Windows heap uses such a locking primitive and we need to emulate this with out own heap implementations in SyzyASAN.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/117170043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2193 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoUse the new block structure and remove the old one.
sebmarchand@chromium.org [Wed, 23 Jul 2014 21:18:48 +0000 (21:18 +0000)]
Use the new block structure and remove the old one.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/111360044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2192 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoCreate BlockHeapInterface.
chrisha@chromium.org [Wed, 23 Jul 2014 19:28:20 +0000 (19:28 +0000)]
Create BlockHeapInterface.

This creates an extension to HeapInterface that makes it aware of the fact that it is allocating blocks. Certain heaps (like the zebra heap) will need to be able to modify redzone sizes, thus must have a sufficiently expressive API.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/115200044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2191 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoFix a compile issue in block_unittest.cc
sebmarchand@chromium.org [Wed, 23 Jul 2014 17:55:02 +0000 (17:55 +0000)]
Fix a compile issue in block_unittest.cc

R=chrisha@chromium.org

BUG=

Review URL: https://codereview.appspot.com/116190043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2190 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoAdds support for the nested blocks to BlockInitialize.
sebmarchand@chromium.org [Wed, 23 Jul 2014 17:40:42 +0000 (17:40 +0000)]
Adds support for the nested blocks to BlockInitialize.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/113420043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2189 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoRemove bogus missing input file from asan.gyp.
chrisha@chromium.org [Tue, 22 Jul 2014 18:42:40 +0000 (18:42 +0000)]
Remove bogus missing input file from asan.gyp.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/119060043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2188 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoFix how we retrieve the trailer of a block in BlockInfoFromMemoryImpl.
sebmarchand@chromium.org [Mon, 21 Jul 2014 15:41:01 +0000 (15:41 +0000)]
Fix how we retrieve the trailer of a block in BlockInfoFromMemoryImpl.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/115950043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2187 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoUse the new quarantine in HeapProxy.
sebmarchand@chromium.org [Mon, 21 Jul 2014 15:37:25 +0000 (15:37 +0000)]
Use the new quarantine in HeapProxy.

This is a temporary change that will later be replaced by a whole new heap implementation. In the meantime it allows to test the new quarantine API and to lift out some logic from HeapProxy.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/110500043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2186 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoDeclare QuarantineInterface and ShardedQuarantine.
chrisha@chromium.org [Mon, 14 Jul 2014 16:32:31 +0000 (16:32 +0000)]
Declare QuarantineInterface and ShardedQuarantine.

This lifts the quarantine implementation from HeapProxy and generalizes it. A future CL will replace the HeapProxy quarantine with it.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/105550044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2185 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoBump version number to produce new binaries.
sebmarchand@chromium.org [Mon, 14 Jul 2014 15:56:05 +0000 (15:56 +0000)]
Bump version number to produce new binaries.

TBR=chrisha@chromium.org

BUG=

Review URL: https://codereview.appspot.com/113090043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2184 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoFix the interceptor of wcsstr.
sebmarchand@chromium.org [Mon, 14 Jul 2014 15:49:15 +0000 (15:49 +0000)]
Fix the interceptor of wcsstr.

TBR=chrisha@chromium.org
BUG=393515

Review URL: https://codereview.appspot.com/113080043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2183 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoFix an invalid comparison in the interceptor of HeapSetInformation.
sebmarchand@chromium.org [Wed, 9 Jul 2014 15:06:24 +0000 (15:06 +0000)]
Fix an invalid comparison in the interceptor of HeapSetInformation.

Those 2 lines were supposed to prevent us from setting the HeapEnableTerminationOnCorruption flag, but a missing '=' in the comparison made this interceptor ineffective:
  if (info_class = ::HeapEnableTerminationOnCorruption)
      return true;

The fix is to add the missing '=' to those line and to test this correctly.

R=siggi@chromium.org

BUG=

Review URL: https://codereview.appspot.com/106540043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2182 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoMemzero the corrupt info buffer before reporting it.
sebmarchand@chromium.org [Tue, 8 Jul 2014 17:30:38 +0000 (17:30 +0000)]
Memzero the corrupt info buffer before reporting it.

One of the side effect of this is that it sets the TIDs of the corrupt blocks to 0 before reporting them.

BUG=
R=siggi@chromium.org

Review URL: https://codereview.appspot.com/110410043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2181 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoBump version number to produce new binaries.
sebmarchand@chromium.org [Mon, 7 Jul 2014 23:05:55 +0000 (23:05 +0000)]
Bump version number to produce new binaries.

TBR=chrisha@chromium.org

BUG=

Review URL: https://codereview.appspot.com/112730044

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2180 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoAdds a new flag to disable Breakpad error reporting in SyzyASan.
sebmarchand@chromium.org [Mon, 7 Jul 2014 22:45:59 +0000 (22:45 +0000)]
Adds a new flag to disable Breakpad error reporting in SyzyASan.

TBR=chrisha@chromium.org, siggi@chromium.org
BUG=

Review URL: https://codereview.appspot.com/101710049

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2179 15e8cca8-e42c-11de-a347-f34a4f72eb7d

3 months agoAdd statistics and variable allocation lengths to page allocator.
chrisha@chromium.org [Fri, 4 Jul 2014 20:39:48 +0000 (20:39 +0000)]
Add statistics and variable allocation lengths to page allocator.

These are required by StackCaptureCache's use of a page allocator.

BUG=
R=sebmarchand@chromium.org

Review URL: https://codereview.appspot.com/105570043

git-svn-id: http://sawbuck.googlecode.com/svn/trunk@2178 15e8cca8-e42c-11de-a347-f34a4f72eb7d