[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

Brooks Moses via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 23:30:24 PST 2020


brooksmoses added a comment.

So, I have bad news: This causes OpenJDK to segfault.  The relevant code is here:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/memory/arena.cpp#L311

  void Arena::destruct_contents() {
    if (UseMallocOnly && _first != NULL) {
      char* end = _first->next() ? _first->top() : _hwm;
      free_malloced_objects(_first, _first->bottom(), end, _hwm);
    }
    // reset size before chop to avoid a rare racing condition
    // that can have total arena memory exceed total chunk memory
    set_size_in_bytes(0);
    _first->chop();
    reset();
  }

I've also seen a segfault in Verilator that root-causes to this patch, though I haven't yet tracked that down to the source code.

I hate to say it, but is this a significant enough problem to call for a (temporary, I hope) rollback?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D17993/new/

https://reviews.llvm.org/D17993



More information about the llvm-commits mailing list