[all-commits] [llvm/llvm-project] 6f2de9: [scudo][standalone] Consolidate lists

Kostya Kortchinsky via All-commits all-commits at lists.llvm.org
Mon Oct 28 09:35:08 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f2de9cbb37fa53029ad861204366e87cce8fcb1
      https://github.com/llvm/llvm-project/commit/6f2de9cbb37fa53029ad861204366e87cce8fcb1
  Author: Kostya Kortchinsky <kostyak at google.com>
  Date:   2019-10-28 (Mon, 28 Oct 2019)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/list.h
    M compiler-rt/lib/scudo/standalone/primary32.h
    M compiler-rt/lib/scudo/standalone/primary64.h
    M compiler-rt/lib/scudo/standalone/quarantine.h
    M compiler-rt/lib/scudo/standalone/release.h
    M compiler-rt/lib/scudo/standalone/secondary.cpp
    M compiler-rt/lib/scudo/standalone/secondary.h
    M compiler-rt/lib/scudo/standalone/stats.h
    M compiler-rt/lib/scudo/standalone/tests/list_test.cpp
    M compiler-rt/lib/scudo/standalone/tests/release_test.cpp

  Log Message:
  -----------
  [scudo][standalone] Consolidate lists

Summary:
This is a clean patch using the last diff of D69265, but using git
instead of svn, since svn went ro and arc was making my life harded
than it needed to be.

I was going to introduce a couple more lists and realized that our
lists are currently a bit all over the place. While we have a singly
linked list type relatively well defined, we are using doubly linked
lists defined on the fly for the stats and for the secondary blocks.

This CL adds a doubly linked list object, reorganizing the singly list
one to extract as much of the common code as possible. We use this
new type in the stats and the secondary. We also reorganize the list
tests to benefit from this consolidation.

There are a few side effect changes such as using for iterator loops
that are, in my opinion, cleaner in a couple of places.

Reviewers: hctim, morehouse, pcc, cferris

Reviewed By: hctim

Subscribers: jfb, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D69516




More information about the All-commits mailing list