1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/logger/loggerutils
Cory Snider 90c54320c8 daemon/logger: fix data race in LogFile
The log message's timestamp was being read after it was returned to the
pool. By coincidence the timestamp field happened to not be zeroed on
reset so much of the time things would work as expected. But if the
message value was to be taken back out of the pool before WriteLogEntry
returned, the timestamp recorded in the gzip header of compressed
rotated log files would be incorrect.

Make future use-after-put bugs fail fast by zeroing all fields of the
Message value, including the timestamp, when it is put into the pool.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2022-03-03 14:56:25 -05:00
..
cache
file_unix.go
file_windows.go
file_windows_test.go
follow.go
follow_test.go
log_tag.go
log_tag_test.go
logfile.go daemon/logger: fix data race in LogFile 2022-03-03 14:56:25 -05:00
logfile_race_test.go daemon/logger: add test to detect data races 2022-03-03 14:56:25 -05:00
logfile_test.go