workaround clang-14 bug
[LibreOffice.git] / external / breakpad / ubsan.patch
blob29790b4c02d101fe839e8b01ad02cb33e464b8e8
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_allocator.h
13 +++ src/common/memory_allocator.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;