~/talk

How to break an ABI and keep your users happy

Talkat CppCon 2017 · 2017-09-24..09-29· [software-architecture]
links:none on file
slides:none on file

Google had long used a custom global string implementation (copy‑on‑write vs SSO) that costs about 2% slowdown and becomes unmanageable across a growing codebase (from ~1M to 150M LOC over the years). The team auto‑refactors sources (half a year) and builds the standard library twice with different inline namespaces, producing a fat standard library that contains both ABIs so old prebuilt binaries keep working; it succeeds at compatibility but doubles library size and is acknowledged as a suboptimal, temporary fix.

AI-written summary · about

  1. 0:00Introduction to the topic
  2. 1:33History of string classes
  3. 2:51Copy-on-write limitations
  4. 3:55Small string optimization
  5. 5:04Inline namespaces explained
  6. 6:16Understanding ABI vs API
  7. 7:15Google C++ history
  8. 8:23The COW string problem
  9. 9:45Moving to standard libraries
  10. 10:33The impostor string solution
  11. 11:47Lessons from the impostor
  12. 12:48Dependencies and performance
  13. 14:05The hidden string piece
  14. 15:32Fixing the global namespace
  15. 16:25Open sourcing common libraries
  16. 17:37Replacing standard string
  17. 18:51Serving two masters
  18. 20:14The technical solution
  19. 21:53Lessons in design
  20. 22:52Mistakes are inevitable
  21. 23:42Fail faster
  22. 24:37Design for change
  23. 25:29API contracts
  24. 26:26Avoiding forward declaration
  25. 27:40Defining behavior
  26. 28:35Function contracts
  27. 29:43ABI and memory layout
  28. 30:58ABI and virtual tables
  29. 32:19Calling conventions
  30. 33:02Mangled names
  31. 34:22Innocent changes
  32. 35:10Summary of ABI stability
  33. 35:45Binary break preparation
  34. 37:06Pimpl idiom
  35. 37:45Q&A and conclusion
~/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.