[PATCH] D25199: [ubsan] Sanitize deleted pointers

Peter Collingbourne via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 14:59:16 PDT 2016


pcc added a reviewer: rsmith.
pcc added a comment.

It seems to me that this sanitizer would break the semantics of otherwise well-defined programs. For example:

  int *x = nullptr;
  delete x;
  if (x != nullptr) {
    // normally unreachable
  }

It may be that a null comparison would be enough to avoid the semantics break, but I am not certain of this. Richard, what do you think?


https://reviews.llvm.org/D25199





More information about the cfe-commits mailing list