YoVDO

The C++ Rvalue Lifetime Disaster - Understanding and Mitigating Issues

Offered By: cpponsea via YouTube

Tags

C++ Courses Memory Management Courses Generic Programming Courses Memory Corruption Courses

Course Description

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the intricacies of C++ rvalue lifetimes in this conference talk from C++ on Sea 2023. Delve into the challenges and potential pitfalls of rvalue references, including their impact on memory management and code safety. Learn about the unexpected behavior of rvalues binding to const& and the limitations of temporary lifetime extension. Discover a library-only approach to mitigate these issues and consider a proposal for potential language improvements. Gain insights from real-world examples of memory corruption caused by these problems and understand their implications for generic code and the C++ standard library.

Syllabus

Introduction
Rvalue Lifetime
Named Return Value Optimization
No Named Return Value Optimization
A Special Case
Recommendations
Temporary Lifetime Extension
Generic Code
Lifetime Extension
Example
The problem
The solution
Declaration type
Autocrf
Autocrf const
Autocrf rvalue
Accessors
C
What C does
We made a mess
Warning
Requirements
Reference Binding
Trying it out
Impact on the standard library
Mitigations
Member Accessors
Conclusion


Taught by

cpponsea

Related Courses

Binder - The Bridge To Root - Hongli Han and Mingjian Zhou
Hack In The Box Security Conference via YouTube
JARVIS Never Saw It Coming - Hacking Machine Learning in Speech, Text and Face Recognition
44CON Information Security Conference via YouTube
SyScan360'16 Singapore - Memory Corruption Is For Wussies
SyScan360 via YouTube
Select Code Execution From Using SQLite
media.ccc.de via YouTube
BLEEDINGBIT - Your APs Belong to Us
Black Hat via YouTube