Files
swift-mirror/lib/IRGen/GenBuiltin.h
Devin Coughlin 38503da505 [TSan] Don't instrument inout accesses on known-empty types
Empty types (such as structs without stored properties) have a
meaningless value for their address. To avoid crashes in the Thread
Sanitizer runtime, rather than passing this unspecified value as
the address of the inout access, skip emission of the runtime call.

The bug allowing unspecified behavior here has been present since we
first added TSan support for checking Swift access races -- but codegen
changes on arm64 have recently made crashes due to the bug much more
likely.

rdar://problem/47686212
2021-02-02 21:22:04 -08:00

1.3 KiB