Canary: enable STL hardening and destructor tombstoning in all builds - #20544
Conversation
| Hardening prevents the misuse of containers more strictly than Container Debug and Iterator Debug. | ||
| Tombstoning prevents use-after-free by filling deleted pointers with a sentintel value. | ||
| --> | ||
| <PreprocessorDefinitions Condition="'$(WindowsTerminalBranding)'=='Canary'">_MSVC_STL_HARDENING=1;_MSVC_STL_DESTRUCTOR_TOMBSTONES=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
There was a problem hiding this comment.
I should consider including Dev as well, for local builds. That will probably prevent our future vexation when we can't repro an issue under debug :P
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Josh Soref (@jsoref) i think the check spelling bot is having a stronk
i can't get it to accept the more generic variant it tells me i have |
| tmultiple | ||
| tofrom | ||
| tombstoning | ||
| Tombstoning |
There was a problem hiding this comment.
Adding only the lowercase variant makes it work for the capitalized one too!
There was a problem hiding this comment.
Leonard Hecker (@lhecker) you say that, and it is what I thought too, but the spell checker did not agree (or I have subtly spelled it wrong in an undetectable way)
There was a problem hiding this comment.
Delete the lowercase and all caps flavors -- that should fix it. it says that it can't find the lowercase flavor anymore.
I'm more worried about the ⚠️ Dictionary not found, that usually means something's gone fairly wrong...
Indeed, this doesn't work:
"cspell":"https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20241114/dictionaries/"
cspell:django/dict/django.txt
I'll have to look later to see what's causing the config to be confused.
There was a problem hiding this comment.
oh fascinating, it's the title-case one that counts for both and not the lowercase one. thank you
that dictionary error, yeah, honestly I've been ignoring it forever :)
There was a problem hiding this comment.
- Anyway, Work around check-spelling v0.0.26 bug #20545 will fix the dictionary error

This may cause us some pain, but having a safer codebase is worth some pain.
More info at https://github.com/microsoft/STL/wiki/STL-Hardening.