~/talk

The Safety of Unsafe Swift

Talkat try! Swift Tokyo 2017 · 2017-03-02..03-04· [swift, security]
slides:none on file

Swift forbids direct memory access by default but exposes controlled unsafe APIs so code can be fast without undefined behavior. The standard library supplies hashing for many types, yet custom hashing mistakes turn O(1) lookups into linear or quadratic attacks; a naive XOR of identical fields collapses to zero and causes collisions. Better implementations consume bytes and spit out a final value using over a half a dozen pointer types, avoiding heap allocation is expensive by keeping unsafe code isolated in small, well-tested APIs.

AI-written summary · about

  1. 0:00Introduction
  2. 0:32Unsafe behavior
  3. 1:27Pointer types
  4. 2:35Hash value example
  5. 2:52Hash to 0
  6. 3:14Fake Hash
  7. 3:35Heap Allocation
  8. 4:06Client Hashing
  9. 4:20Protocol Extensions
  10. 4:39Conclusion
~/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.