Enable TSan validation to detect when a mutable accessor of a message is called concurrently with another accessor on the same message, which is a data race.

This is the third phase, in which we enable validation for string fields.

PiperOrigin-RevId: 544078735
pull/13162/head
Protobuf Team Bot 1 year ago committed by Copybara-Service
parent 68b34feb5a
commit e2eae81b97
  1. 4
      src/google/protobuf/port_def.inc

@ -864,11 +864,11 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
// fields/maps, enum/primitive fields, string fields, message fields.
#define PROTOBUF_TSAN_READ_REPEATED(addr) PROTOBUF_TSAN_READ(addr)
#define PROTOBUF_TSAN_READ_PRIMITIVE(addr) PROTOBUF_TSAN_READ(addr)
#define PROTOBUF_TSAN_READ_STRING(addr)
#define PROTOBUF_TSAN_READ_STRING(addr) PROTOBUF_TSAN_READ(addr)
#define PROTOBUF_TSAN_READ_MESSAGE(addr)
#define PROTOBUF_TSAN_WRITE_REPEATED(addr) PROTOBUF_TSAN_WRITE(addr)
#define PROTOBUF_TSAN_WRITE_PRIMITIVE(addr) PROTOBUF_TSAN_WRITE(addr)
#define PROTOBUF_TSAN_WRITE_STRING(addr)
#define PROTOBUF_TSAN_WRITE_STRING(addr) PROTOBUF_TSAN_WRITE(addr)
#define PROTOBUF_TSAN_WRITE_MESSAGE(addr)
#ifdef PROTOBUF_USE_TABLE_PARSER_ON_REFLECTION

Loading…
Cancel
Save