Add some backticks to help dangling_ptr_guide.md layout Some of the text is being mangled otherwise under code search preview mode. Change-Id: Ib3d2bbf1237c4bee7f0469245f1374d9d9652d68 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4368420 Reviewed-by: danakj <danakj@chromium.org> Commit-Queue: danakj <danakj@chromium.org> Cr-Commit-Position: refs/heads/main@{#1121749}
diff --git a/docs/dangling_ptr_guide.md b/docs/dangling_ptr_guide.md index 93c53cf..39314e92b 100644 --- a/docs/dangling_ptr_guide.md +++ b/docs/dangling_ptr_guide.md
@@ -174,11 +174,11 @@ Q. Gee, this is a raw pointer. Does destroying it actually do anything? -A. Yes. On some platforms raw_ptr<T> is a synonym for T*, but on many platforms -(more every day) raw_ptr<T> is the interface to PartitionAlloc’s BackupRefPtr -(BRP) Use-after-Free (UaF) protection mechanism. Destroying the pointer thus -actually performs internal bookkeeping and may also null the pointer on -destruction to trap use-after-destruct errors. +A. Yes. On some platforms `raw_ptr<T>` is a synonym for `T*`, but on many +platforms (more every day) `raw_ptr<T>` is the interface to PartitionAlloc’s +BackupRefPtr (BRP) Use-after-Free (UaF) protection mechanism. Destroying the +pointer thus actually performs internal bookkeeping and may also null +the pointer on destruction to trap use-after-destruct errors. Q. So BRP mitigates these dangling pointers. What's the problem with just keeping them if they are not used? @@ -187,7 +187,7 @@ remaining, the object must be quarantined and overwritten with a “zapped” pattern as opposed to being simply freed. This costs cycles and memory pressure. Even worse, it is still possible that the raw_ptr is converted to -T* and used with the zap value, or even used after the quarantine is +`T*` and used with the zap value, or even used after the quarantine is gone. Hence we are inventing mechanisms for finding dangling pointers so we may remove the ones we know about. BRP will then make it harder to write exploits with the ones we don’t know about in the wild.