File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -964,7 +964,14 @@ class CommonFields : public CommonFieldsGenerationInfo {
964964
965965 ctrl_t * control () const {
966966 ABSL_SWISSTABLE_ASSERT (capacity () > 0 );
967- ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN (heap_or_soo_.control ().get ());
967+ // Assume that the control bytes don't alias `this`.
968+ ctrl_t * ctrl = heap_or_soo_.control ().get ();
969+ [[maybe_unused]] size_t num_control_bytes = NumControlBytes (capacity ());
970+ ABSL_ASSUME (reinterpret_cast <uintptr_t >(ctrl + num_control_bytes) <=
971+ reinterpret_cast <uintptr_t >(this ) ||
972+ reinterpret_cast <uintptr_t >(this + 1 ) <=
973+ reinterpret_cast <uintptr_t >(ctrl));
974+ ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN (ctrl);
968975 }
969976
970977 void set_control (ctrl_t * c) { heap_or_soo_.control ().set (c); }
You can’t perform that action at this time.
0 commit comments