Branch libreoffice-7-2-5
[LibreOffice.git] / external / breakpad / ubsan.patch
blobf4204516eed4e21ee039e13e219667721da6f2c4
1 --- src/client/linux/minidump_writer/directory_reader.h
2 +++ src/client/linux/minidump_writer/directory_reader.h
3 @@ -96,7 +96,7 @@
4 const int fd_;
5 bool hit_eof_;
6 unsigned buf_used_;
7 - uint8_t buf_[sizeof(struct kernel_dirent) + NAME_MAX + 1];
8 + uint8_t buf_[sizeof(struct kernel_dirent) + NAME_MAX + 1] __attribute__ ((aligned (__BIGGEST_ALIGNMENT__)));
9 };
11 } // namespace google_breakpad
12 --- src/common/memory.h
13 +++ src/common/memory.h
14 @@ -75,6 +75,7 @@
15 if (!bytes)
16 return NULL;
18 + bytes = (bytes + (__BIGGEST_ALIGNMENT__ - 1)) & ~(__BIGGEST_ALIGNMENT__ - 1);
19 if (current_page_ && page_size_ - page_offset_ >= bytes) {
20 uint8_t *const ret = current_page_ + page_offset_;
21 page_offset_ += bytes;