[llvm-bugs] [Bug 34729] std::string_view encourages use-after-free

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 11 11:37:56 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=34729

Eric Fiselier <eric at efcs.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WONTFIX                     |---
             Status|RESOLVED                    |REOPENED

--- Comment #6 from Eric Fiselier <eric at efcs.ca> ---
Reopening. I'm working to roll out changes that diagnosed cases where the
argument to string view's constructor outlives the string view itself. 

Clang provides an attribute, lifetimebound, that gives us the ability to
diagnose this.

It has found dozens of bugs at Google. And I still have hundreds of untriaged
failures to go.

I hope to land the changes in upstream by the end of the month.

similarly we can use this atribute to diagnose when a strings data outlive the
string itself.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200211/efcd21fd/attachment.html>


More information about the llvm-bugs mailing list