Merge "[Coverage] Fix coverage bug in which extra garbage is being written" into main

This commit is contained in:
Snehal Koukuntla 2024-04-30 15:58:41 +00:00 committed by Gerrit Code Review
commit 8240c53ec2

View file

@ -174,7 +174,7 @@ Result<void> CoverageRecord::SaveFile(const std::string& filename) {
}
uintptr_t* begin = (uintptr_t*)((char *)shm_ + sizeof(struct control));
bool ret = WriteFully(output_fd, begin, record_len_);
bool ret = WriteFully(output_fd, begin, record_len_ - sizeof(struct control));
if(!ret) {
fprintf(stderr, "Coverage write to file failed\n");
}