Тёмный

Keynote: Safety in C++: All the Safeties! - Sean Parent - C++ on Sea 2023 

cpponsea
Подписаться 13 тыс.
Просмотров 3,9 тыс.
50% 1

Наука

Опубликовано:

 

16 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 9   
@paulfloyd9258
@paulfloyd9258 9 месяцев назад
"Never reads uninitialized memory". Hmm. That's tough. All structs always 1-byte packed, no padding. No SIMD optimized string functions. How about "No outcome ever depends on uninitialized memory"?
@SeanParent
@SeanParent 9 месяцев назад
The typical way to address this is to ensure that all memory is zero initialized. This is all at the language level of abstraction not the processor, so it is sufficient for the language not to leak information about the content of padding.
@paulfloyd9258
@paulfloyd9258 8 месяцев назад
@@SeanParent It'll take a while to put all those worms back into the can. Will MSAN still report errors when reading such unintentionally initialized memory?
@bobweiram6321
@bobweiram6321 7 месяцев назад
Ada was designed with safety in mind without minimal impact on performance and resource efficiency. Unlike C++, the programmer just writes Ada code without concerning themselves with how its semantics impacts its execution and size.
@inf0phreak
@inf0phreak 10 месяцев назад
Wow. He actually *did* mention the R word at around 24:40. I honestly expected him to continue to carefully talk around the elephant in the room.
@qqi239z123
@qqi239z123 8 месяцев назад
If a project has thousands of functions and each and every one of them can return a failure indication (or throw an exception) no tool can help. Every project should have some basic underling guarantees to reduce the number of failure points first, but it is not happening this way.
@ABaumstumpf
@ABaumstumpf 10 месяцев назад
Signed integer overflow.... defining that behaviour does not make it any worse cause the compiler already is allowed to assume that it NEVER can happen which means if your code experiences overflow you ALREADY can not do anything about that. Hell because the compiler is allowed to assume it is also allowed to remove ANY AND ALL CODE that tries to check if such an overflow occured. The one thing this undefined behaviour does it give the compiler a bit more playroom with optimisation. Worse than just these problems occurring at runtime are the various things that cause "ill-formed no diagnostic required" - aka the compiler can (and mostly does) know that your code is not valid C++ but does not need to tell you and can do whatever bullshit.
@isodoublet
@isodoublet 10 месяцев назад
" defining that behaviour does not make it any worse cause the compiler already is allowed to assume that it NEVER can happen " It's the fact that it's UB that allows the compiler to assume it won't happen.
@raymundhofmann7661
@raymundhofmann7661 10 месяцев назад
Interesting that governments are concerned about "memory safety" while the proposed garbage collected managed or interpreted languages as alternative are a bloated mess killing the climate and increasing the CO2 footprint by wasting CPU and memory.
Далее
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Просмотров 1,6 млн
Minecraft Pizza Mods
00:18
Просмотров 2 млн
Beautiful game!😍
00:20
Просмотров 2,8 млн
Pacific++ 2018: Sean Parent "Generic Programming"
1:19:57
Delivering Safe C++ - Bjarne Stroustrup - CppCon 2023
1:29:16