Unverified Commit 7122f55c authored by Malavika Samak's avatar Malavika Samak Committed by GitHub
Browse files

[-Wunsafe-buffer-usage] Warning for unsafe invocation of span::data (#75650)



…-Wunsafe-buffer-usage,

there maybe accidental re-introduction of new OutOfBound accesses into
the code bases. One such case is invoking span::data() method on a span
variable to retrieve a pointer, which is then cast to a larger type and
dereferenced. Such dereferences can introduce OutOfBound accesses.

To address this, a new WarningGadget is being introduced to warn against
such invocations.

---------

Co-authored-by: default avatarMalavikaSamak <malavika2@apple.com>
parent e32b1d15
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment