[D-runtime] [D-Programming-Language/druntime] 17b226: Fix cache inconsistency when free'ing from GC

GitHub via D-runtime d-runtime at puremagic.com
Thu May 22 10:08:41 PDT 2014


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/druntime
  Commit: 17b226efeb7897eb144ba21dcf801c6b899dd388
      https://github.com/D-Programming-Language/druntime/commit/17b226efeb7897eb144ba21dcf801c6b899dd388
  Author: Etienne Cimon <etcimon at gmail.com>
  Date:   2014-05-21 (Wed, 21 May 2014)

  Changed paths:
    M src/gc/gc.d

  Log Message:
  -----------
  Fix cache inconsistency when free'ing from GC

After a pointer is freed, it is not removed from cache thus if it is allocated for another purpose any subsequent realloc calls will refer to the previous size.

This can cause memory corruption with an application that uses `GC.free`, `delete` or `realloc(p, 0)`, or a complete crash if a big allocation's size is cached and the page pool was reduced with minimize, ie. the call to `realloc` will try to resize in-place rather than with malloc.

Verify USE_CACHE at compile-time

Fix alignment


  Commit: b2fe3e5b0355785c916a307c4196c62f6a46506b
      https://github.com/D-Programming-Language/druntime/commit/b2fe3e5b0355785c916a307c4196c62f6a46506b
  Author: Etienne Cimon <etcimon at gmail.com>
  Date:   2014-05-22 (Thu, 22 May 2014)

  Changed paths:
    M src/gc/gc.d

  Log Message:
  -----------
  Fixed indentation and referencing error

Testing .editorconfig again...

Identation should be fine now...


  Commit: a3f43786f669a51c324af6e62b52bdc2fb445211
      https://github.com/D-Programming-Language/druntime/commit/a3f43786f669a51c324af6e62b52bdc2fb445211
  Author: Martin Nowak <code at dawg.eu>
  Date:   2014-05-22 (Thu, 22 May 2014)

  Changed paths:
    M src/gc/gc.d

  Log Message:
  -----------
  Merge pull request #797 from etcimon/patch-1

Fix cache inconsistency when free'ing from GC


Compare: https://github.com/D-Programming-Language/druntime/compare/8890678458e7...a3f43786f669


More information about the D-runtime mailing list