~/talk

Dangling in French and English

Talkat CppCon 2018 · 2018-09-23..09-28· [rust]
links:none on file
slides:none on file

Code demonstrates that taking a char from string::c_str() inside a std::vector then push_backing more elements can either be safe or crash depending on small string optimization. A 18‑char French string allocates on the heap so the pointer survives vector growth; a 15‑char English string fits SSO and c_str() points into the string object, so after reallocation the pointer dangles and causes a segfault. SSO threshold 16 c_str() pointing into short-string buffer*

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.