Skip to content

Commit

Permalink
Enable TSan validation to detect when a mutable accessor of a message…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Jun 28, 2023
1 parent 68b34fe commit e2eae81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/google/protobuf/port_def.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e2eae81

Please sign in to comment.