[Libreoffice-commits] core.git: external/breakpad external/liborcus external/pdfium external/zxing

2022-05-23 Thread Stephan Bergmann (via logerrit)
 external/breakpad/UnpackedTarball_breakpad.mk |1 +
 external/breakpad/include.patch   |   10 ++
 external/liborcus/UnpackedTarball_liborcus.mk |1 +
 external/liborcus/include.patch.0 |   20 
 external/pdfium/UnpackedTarball_pdfium.mk |2 ++
 external/pdfium/include.patch |   11 +++
 external/zxing/UnpackedTarball_zxing.mk   |1 +
 external/zxing/include.patch.0|   10 ++
 8 files changed, 56 insertions(+)

New commits:
commit 1e51a325a8e21eb5f900336a0c9e1bd78ed330ab
Author: Stephan Bergmann 
AuthorDate: Mon May 23 10:21:54 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 23 12:08:30 2022 +0200

Missing #include  in various external code

...which is a problem presumably since GCC 13 trunk


"libstdc++: Avoid including  for std::char_traits".  (All the 
broken
C++ code used unqualified uintptr_t etc. rather than std::uintptr_t etc., 
so I
deemed it more appropriate to include  rather than .)

Change-Id: Id9dfc383c5986126a425971c4557b90ac45ac963
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134760
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index 9a10a5ac1abb..eca3d550d0d4 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/breakpad-no-env.patch.1 \
external/breakpad/SIGSTKSZ.patch \
external/breakpad/sanitizer.patch \
+   external/breakpad/include.patch \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_files,breakpad,src/tools/windows/dump_syms,\
diff --git a/external/breakpad/include.patch b/external/breakpad/include.patch
new file mode 100644
index ..e90ae9c11744
--- /dev/null
+++ b/external/breakpad/include.patch
@@ -0,0 +1,10 @@
+--- src/client/linux/handler/minidump_descriptor.h
 src/client/linux/handler/minidump_descriptor.h
+@@ -31,6 +31,7 @@
+ #define CLIENT_LINUX_HANDLER_MINIDUMP_DESCRIPTOR_H_
+ 
+ #include 
++#include 
+ #include 
+ 
+ #include 
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index eaa730255071..2ad70119179b 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/forcepoint-87.patch.1 \
external/liborcus/forcepoint-88.patch.1 \
external/liborcus/forcepoint-95.patch.1 \
+   external/liborcus/include.patch.0 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/include.patch.0 
b/external/liborcus/include.patch.0
new file mode 100644
index ..1131d04d3046
--- /dev/null
+++ b/external/liborcus/include.patch.0
@@ -0,0 +1,20 @@
+--- include/orcus/base64.hpp
 include/orcus/base64.hpp
+@@ -9,6 +9,7 @@
+ #define __ORCUS_BASE64_HPP__
+ 
+ #include "env.hpp"
++#include 
+ #include 
+ #include 
+ 
+--- include/orcus/types.hpp
 include/orcus/types.hpp
+@@ -16,6 +16,7 @@
+ #pragma GCC diagnostic ignored "-Wshadow"
+ #endif
+ 
++#include 
+ #include 
+ #include 
+ #include 
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk 
b/external/pdfium/UnpackedTarball_pdfium.mk
index da4a016cf9d8..06b94e4d064d 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -24,6 +24,8 @@ pdfium_patches += AndroidNDK19.patch.1
 # --with-latest-c++:
 pdfium_patches += gcc-c++20-comparison.patch
 
+pdfium_patches += include.patch
+
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,pdfium,$(PDFIUM_TARBALL)))
diff --git a/external/pdfium/include.patch b/external/pdfium/include.patch
new file mode 100644
index ..75c0e3b9272a
--- /dev/null
+++ b/external/pdfium/include.patch
@@ -0,0 +1,11 @@
+--- constants/annotation_flags.h
 constants/annotation_flags.h
+@@ -5,6 +5,8 @@
+ #ifndef CONSTANTS_ANNOTATION_FLAGS_H_
+ #define CONSTANTS_ANNOTATION_FLAGS_H_
+ 
++#include 
++
+ namespace pdfium {
+ namespace annotation_flags {
+ 
diff --git a/external/zxing/UnpackedTarball_zxing.mk 
b/external/zxing/UnpackedTarball_zxing.mk
index ff5f45e71c30..a171c86de7db 100644
--- a/external/zxing/UnpackedTarball_zxing.mk
+++ b/external/zxing/UnpackedTarball_zxing.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,zxing, \
external/zxing/0002-Update-stb_image_write-from-1.14-to-1.16.patch \
external/zxing/0003-Update-stb_image-from-2.25-to-2.27.patch \
external/zxing/0004-Apply-stb-PR-1223-to-stb_image.patch \
+   external/zxing/include.patch.0 

[Libreoffice-commits] core.git: external/breakpad

2021-10-26 Thread Stephan Bergmann (via logerrit)
 external/breakpad/UnpackedTarball_breakpad.mk |1 
 external/breakpad/sanitizer.patch |   29 ++
 2 files changed, 30 insertions(+)

New commits:
commit 11ecb45eb922037082feda3fabd8d0eed3e3ffb0
Author: Stephan Bergmann 
AuthorDate: Tue Oct 26 23:01:48 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Oct 27 07:38:56 2021 +0200

external/breakpad: Silence some UBSan warnings

...which I happened to run into when the breakpad code kicked in due to some
crash happening,

> src/client/linux/minidump_writer/minidump_writer.cc:721:12: runtime 
error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here

> src/client/linux/minidump_writer/minidump_writer.cc:763:14: runtime 
error: applying non-zero offset to non-null pointer 0x0020 produced 
null pointer

> src/client/linux/minidump_writer/minidump_writer.cc:772:64: runtime 
error: applying non-zero offset 3200848 to null pointer

(Unlike the changes in the existing external/breakpad/ubsan.patch, which is 
only
applied when doing sanitizer builds, these changes should be 
non-controversial
and OK to apply always, so they go into a different patch file.)

Change-Id: Ib1b3f87ba22f96d5fb93b8fcb9951ddc3c353697
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124245
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index 994a87fcd95a..9a10a5ac1abb 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/breakpad-dump_syms.patch.1 \
external/breakpad/breakpad-no-env.patch.1 \
external/breakpad/SIGSTKSZ.patch \
+   external/breakpad/sanitizer.patch \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_files,breakpad,src/tools/windows/dump_syms,\
diff --git a/external/breakpad/sanitizer.patch 
b/external/breakpad/sanitizer.patch
new file mode 100644
index ..5d673103d95b
--- /dev/null
+++ b/external/breakpad/sanitizer.patch
@@ -0,0 +1,29 @@
+--- src/client/linux/minidump_writer/minidump_writer.cc
 src/client/linux/minidump_writer/minidump_writer.cc
+@@ -717,7 +717,7 @@
+ const std::vector crash_exception_info =
+ dumper_->crash_exception_info();
+ stream->exception_record.number_parameters = crash_exception_info.size();
+-memcpy(stream->exception_record.exception_information,
++if (!crash_exception_info.empty()) 
memcpy(stream->exception_record.exception_information,
+crash_exception_info.data(),
+sizeof(uint64_t) * crash_exception_info.size());
+ stream->thread_context = crashing_thread_context_;
+@@ -760,7 +760,7 @@
+   // Adjust base address with the virtual address of the PT_LOAD segment
+   // corresponding to offset 0
+   if (ph.p_type == PT_LOAD && ph.p_offset == 0) {
+-base -= ph.p_vaddr;
++base = reinterpret_cast(reinterpret_cast(base) - 
ph.p_vaddr);
+   }
+   if (ph.p_type == PT_DYNAMIC) {
+ dyn_addr = ph.p_vaddr;
+@@ -769,7 +769,7 @@
+ if (!dyn_addr)
+   return false;
+ 
+-ElfW(Dyn)* dynamic = reinterpret_cast(dyn_addr + base);
++ElfW(Dyn)* dynamic = reinterpret_cast(dyn_addr + 
reinterpret_cast(base));
+ 
+ // The dynamic linker makes information available that helps gdb find all
+ // DSOs loaded into the program. If this information is indeed available,


[Libreoffice-commits] core.git: external/breakpad

2021-10-22 Thread Stephan Bergmann (via logerrit)
 external/breakpad/ubsan.patch |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit de0581c77228eb00ff84a3996bfd252d6928a056
Author: Stephan Bergmann 
AuthorDate: Thu Oct 21 17:43:56 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 22 12:03:18 2021 +0200

Make external/breakpad/ubsan.patch apply again

(It apparently silently broke with something like
ff673ce838a5538b1432daf9007c047f6455a5ba "update breakpad to the current
chrome_m90 snapshot" and nobody doing ASan/UBSan builds with 
--enable-breakpad
in the meantime.)

Change-Id: Ic955e1725d2493d849b460a09dfa0238815e2c8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124033
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/breakpad/ubsan.patch b/external/breakpad/ubsan.patch
index f4204516eed4..29790b4c02d1 100644
--- a/external/breakpad/ubsan.patch
+++ b/external/breakpad/ubsan.patch
@@ -9,13 +9,13 @@
  };
  
  }  // namespace google_breakpad
 src/common/memory.h
-+++ src/common/memory.h
+--- src/common/memory_allocator.h
 src/common/memory_allocator.h
 @@ -75,6 +75,7 @@
  if (!bytes)
return NULL;
  
 +bytes = (bytes + (__BIGGEST_ALIGNMENT__ - 1)) & ~(__BIGGEST_ALIGNMENT__ - 
1);
  if (current_page_ && page_size_ - page_offset_ >= bytes) {
-   uint8_t *const ret = current_page_ + page_offset_;
+   uint8_t* const ret = current_page_ + page_offset_;
page_offset_ += bytes;


[Libreoffice-commits] core.git: external/breakpad

2021-10-15 Thread Stephan Bergmann (via logerrit)
 external/breakpad/UnpackedTarball_breakpad.mk |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 797458374ff3919070abdaf876cebbd855ce6d8a
Author: Stephan Bergmann 
AuthorDate: Fri Oct 15 15:59:34 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 15 18:29:16 2021 +0200

Mark external/breakpad/SIGSTKSZ.patch as upstreamed

Change-Id: I895b034ecda257e1488c46054b13140196790639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123658
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index a44cb91e62bf..994a87fcd95a 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -15,7 +15,10 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,breakpad,$(BREAKPAD_TARBALL)))
 
 # 
external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch
 upstreamed at
 #   
"Handle race between
-#  ExceptionHandler::SignalHandler and ~ExceptionHandler":
+#  ExceptionHandler::SignalHandler and ~ExceptionHandler";
+# external/breakpad/SIGSTKSZ.patch upstreamed at
+#   
"Adpat to SIGSTKSZ type
+#  in glibc 2.34":
 $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/breakpad-use-correct-http-header.patch.1 \
external/breakpad/breakpad-wshadow.patch.1 \


[Libreoffice-commits] core.git: external/breakpad

2021-10-12 Thread Stephan Bergmann (via logerrit)
 external/breakpad/SIGSTKSZ.patch  |   11 +++
 external/breakpad/UnpackedTarball_breakpad.mk |1 +
 2 files changed, 12 insertions(+)

New commits:
commit c90cb1b3c265c1f81e614e47652fe24137d7928c
Author: Stephan Bergmann 
AuthorDate: Tue Oct 12 14:42:05 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Oct 12 17:07:08 2021 +0200

external/breakpad: Adpat to SIGSTKSZ type in glibc 2.34



"sysconf: Add _SC_MINSIGSTKSZ/_SC_SIGSTKSZ [BZ #20305]" introduced
sysdeps/unix/sysv/linux/bits/sigstksz.h containing

> # define SIGSTKSZ sysconf (_SC_SIGSTKSZ)

so that SIGSTKSZ would have type long, causing

> src/client/linux/handler/exception_handler.cc: In function ‘void 
google_breakpad::{anonymous}::InstallAlternateStackLocked()’:
> src/client/linux/handler/exception_handler.cc:141:49: error: no matching 
function for call to ‘max(int, long int)’
>   141 |   static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
>   | ^

when building ExternalProject_breakpad.  At least SuS4 appears to be silent
about a required type of SIGSTKSZ defined in signal.h.

Change-Id: I4d87017e10825ef051721f4e9ca751a77bb0d5c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123455
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/breakpad/SIGSTKSZ.patch b/external/breakpad/SIGSTKSZ.patch
new file mode 100644
index ..d37c58a2f84b
--- /dev/null
+++ b/external/breakpad/SIGSTKSZ.patch
@@ -0,0 +1,11 @@
+--- src/client/linux/handler/exception_handler.cc
 src/client/linux/handler/exception_handler.cc
+@@ -138,7 +138,7 @@
+   // SIGSTKSZ may be too small to prevent the signal handlers from overrunning
+   // the alternative stack. Ensure that the size of the alternative stack is
+   // large enough.
+-  static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
++  static const unsigned kSigStackSize = std::max(16384, 
SIGSTKSZ);
+ 
+   // Only set an alternative stack if there isn't already one, or if the 
current
+   // one is too small.
diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index 1b92728946cd..a44cb91e62bf 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/c++20-allocator.patch \
external/breakpad/breakpad-dump_syms.patch.1 \
external/breakpad/breakpad-no-env.patch.1 \
+   external/breakpad/SIGSTKSZ.patch \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_files,breakpad,src/tools/windows/dump_syms,\


[Libreoffice-commits] core.git: external/breakpad

2021-06-24 Thread Christian Lohmaier (via logerrit)
 external/breakpad/UnpackedTarball_breakpad.mk |1 +
 external/breakpad/breakpad-no-env.patch.1 |   13 +
 2 files changed, 14 insertions(+)

New commits:
commit 47282cc577eda78b9cceff0860e74ce7b3f121cd
Author: Christian Lohmaier 
AuthorDate: Sat Jun 19 15:57:21 2021 +0200
Commit: Christian Lohmaier 
CommitDate: Thu Jun 24 11:32:35 2021 +0200

breakpad: don't include the users's env in linux dumps

Change-Id: I004b862295686789c0a88dc678bd098d81c76421
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117503
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index 4eb10158ca18..1b92728946cd 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\

external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 \
external/breakpad/c++20-allocator.patch \
external/breakpad/breakpad-dump_syms.patch.1 \
+   external/breakpad/breakpad-no-env.patch.1 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_files,breakpad,src/tools/windows/dump_syms,\
diff --git a/external/breakpad/breakpad-no-env.patch.1 
b/external/breakpad/breakpad-no-env.patch.1
new file mode 100644
index ..d1b37bd21868
--- /dev/null
+++ b/external/breakpad/breakpad-no-env.patch.1
@@ -0,0 +1,13 @@
+diff -ur breakpad.org/src/client/linux/minidump_writer/minidump_writer.cc 
breakpad/src/client/linux/minidump_writer/minidump_writer.cc
+--- breakpad.org/src/client/linux/minidump_writer/minidump_writer.cc   
2021-06-19 15:32:57.258078847 +0200
 breakpad/src/client/linux/minidump_writer/minidump_writer.cc   
2021-06-19 15:35:07.014082452 +0200
+@@ -289,7 +289,8 @@
+ dir.CopyIndex(dir_index++, );
+ 
+ dirent.stream_type = MD_LINUX_ENVIRON;
+-if (!WriteProcFile(, GetCrashThread(), "environ"))
++// don't include the user's env
++if (true || !WriteProcFile(, GetCrashThread(), "environ"))
+   NullifyDirectoryEntry();
+ dir.CopyIndex(dir_index++, );
+ 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/breakpad Makefile.in

2021-06-11 Thread Christian Lohmaier (via logerrit)
 Makefile.in   |2 
 external/breakpad/ExternalProject_breakpad.mk |7 +
 external/breakpad/Module_breakpad.mk  |3 
 external/breakpad/UnpackedTarball_breakpad.mk |6 +
 external/breakpad/breakpad-dump_syms.patch.1  |   34 
 external/breakpad/dump_syms.sln   |   25 ++
 external/breakpad/dump_syms.vcxproj   |  108 ++
 7 files changed, 182 insertions(+), 3 deletions(-)

New commits:
commit 73299faa75a4974eb49c93ffdfb2d6329cb4e519
Author: Christian Lohmaier 
AuthorDate: Fri Jun 11 14:44:31 2021 +0200
Commit: Christian Lohmaier 
CommitDate: Fri Jun 11 17:05:08 2021 +0200

use freshly compiled dump_syms.exe on windows for symbolinfo extraction

while self compiled one still segfaults frequently, it is a tad better
than the included one (and compiling froms source instead of using
precompiled binaries is a net win in any case)

Out of 50 attempts with the mergedlo.dll, the new compiled dump_syms
succeeded 11 times, the shipped one succeeded 7 times - so could still
be regular variance in that small sample size, but at least not
significantly worse either.

Change-Id: I86c213fe6aece58f1391d4c2bf9906b85eee9c57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117056
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/Makefile.in b/Makefile.in
index 88c82e479846..b6a93cdeb8c6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -430,7 +430,7 @@ symbols:
rm -fr $(WORKDIR)/symbols/
mkdir -p $(WORKDIR)/symbols/
 ifeq ($(OS),WNT)
-   $(SRCDIR)/bin/symbolstore.py 
$(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/binaries/dump_syms.exe 
$(WORKDIR)/symbols/ $(INSTDIR)/program/*
+   $(SRCDIR)/bin/symbolstore.py 
$(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/dump_syms/Release/dump_syms.exe
 $(WORKDIR)/symbols/ $(INSTDIR)/program/*
$(SRCDIR)/bin/symstore.sh
 else
$(SRCDIR)/bin/symbolstore.py 
$(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms 
$(WORKDIR)/symbols/ $(INSTDIR)/program/*
diff --git a/external/breakpad/ExternalProject_breakpad.mk 
b/external/breakpad/ExternalProject_breakpad.mk
index 56a7be987837..db1d1c9df83a 100644
--- a/external/breakpad/ExternalProject_breakpad.mk
+++ b/external/breakpad/ExternalProject_breakpad.mk
@@ -16,6 +16,13 @@ $(eval $(call gb_ExternalProject_register_targets,breakpad,\
 
 ifeq ($(COM),MSC)
 
+$(call gb_ExternalProject_get_state_target,breakpad,build) :
+   $(call gb_Trace_StartRange,breakpad,EXTERNAL)
+   $(call gb_ExternalProject_run,build,\
+   MSBuild.exe src/tools/windows/dump_syms/dump_syms.sln 
-p:Configuration=Release \
+   )
+   $(call gb_Trace_EndRange,breakpad,EXTERNAL)
+
 else # !ifeq($(COM),MSC)
 
 $(call gb_ExternalProject_get_state_target,breakpad,build) :
diff --git a/external/breakpad/Module_breakpad.mk 
b/external/breakpad/Module_breakpad.mk
index aeb3c42a9d6d..f68385ffb4c7 100644
--- a/external/breakpad/Module_breakpad.mk
+++ b/external/breakpad/Module_breakpad.mk
@@ -13,11 +13,10 @@ $(eval $(call gb_Module_add_targets,breakpad,\
UnpackedTarball_breakpad \
 ))
 
-ifneq ($(OS),WNT)
 $(eval $(call gb_Module_add_targets,breakpad,\
ExternalProject_breakpad \
 ))
-else
+ifeq ($(OS),WNT)
 $(eval $(call gb_Module_add_targets,breakpad,\
StaticLibrary_breakpad \
 ))
diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index 1b804aef2eb9..4eb10158ca18 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -22,6 +22,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/breakpad-stackwalk.patch.1 \

external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 \
external/breakpad/c++20-allocator.patch \
+   external/breakpad/breakpad-dump_syms.patch.1 \
+))
+
+$(eval $(call 
gb_UnpackedTarball_add_files,breakpad,src/tools/windows/dump_syms,\
+external/breakpad/dump_syms.vcxproj \
+external/breakpad/dump_syms.sln \
 ))
 
 ifeq ($(COM_IS_CLANG),TRUE)
diff --git a/external/breakpad/breakpad-dump_syms.patch.1 
b/external/breakpad/breakpad-dump_syms.patch.1
new file mode 100644
index ..d895be7ef57a
--- /dev/null
+++ b/external/breakpad/breakpad-dump_syms.patch.1
@@ -0,0 +1,34 @@
+diff -ur breakpad.org/src/common/windows/pdb_source_line_writer.cc 
breakpad/src/common/windows/pdb_source_line_writer.cc
+--- breakpad.org/src/common/windows/pdb_source_line_writer.cc  2021-06-11 
12:37:22.682324700 +0200
 breakpad/src/common/windows/pdb_source_line_writer.cc  2021-06-11 
12:44:24.480184800 +0200
+@@ -34,7 +34,7 @@
+ #include 
+ #include 
+ #include 
+-#include 
++#include 
+ #include 
+ 
+ #include 
+diff -ur breakpad.org/src/common/windows/pe_util.cc 

[Libreoffice-commits] core.git: external/breakpad

2019-10-28 Thread Stephan Bergmann (via logerrit)
 external/breakpad/UnpackedTarball_breakpad.mk |1 +
 external/breakpad/c++20-allocator.patch   |   11 +++
 2 files changed, 12 insertions(+)

New commits:
commit 245c2c463186189636f548d278250ca71beee21c
Author: Stephan Bergmann 
AuthorDate: Mon Oct 28 09:26:41 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Oct 28 10:32:18 2019 +0100

external/breakpad: Adapt to std::allocator parts removed in C++20


"Deprecating Vestigial Library Parts in C++17" deprecated, among others,
std::allocator::pointer, and

"Reviewing Deprecated Facilities of C++17 for C++20" removed it completely.
(And  "Remove redundant std::allocator
members for C++20" removed it from libstdc++ now for -std=c++2a.)

The change to src/common/memory.h was necessary in Library_crashreport:

> In file included from 
workdir/UnpackedTarball/breakpad/src/client/linux/dump_writer_common/thread_info.h:37,
>  from 
workdir/UnpackedTarball/breakpad/src/client/linux/minidump_writer/linux_dumper.h:51,
>  from 
workdir/UnpackedTarball/breakpad/src/client/linux/minidump_writer/minidump_writer.h:41,
>  from 
workdir/UnpackedTarball/breakpad/src/client/linux/handler/exception_handler.h:42,
>  from desktop/source/app/crashreport.cxx:29:
> workdir/UnpackedTarball/breakpad/src/common/memory.h: In instantiation of 
‘struct google_breakpad::PageStdAllocator’:
> gcc/trunk/inst/include/c++/10.0.0/bits/stl_vector.h:84:21:   required 
from ‘struct std::__cxx1998::_Vector_base >’
> gcc/trunk/inst/include/c++/10.0.0/bits/stl_vector.h:386:11:   required 
from ‘class std::__cxx1998::vector 
>’
> gcc/trunk/inst/include/c++/10.0.0/debug/vector:118:11:   required from 
‘class std::__debug::vector >’
> workdir/UnpackedTarball/breakpad/src/common/memory.h:197:7:   required 
from ‘class google_breakpad::wasteful_vector’
> 
workdir/UnpackedTarball/breakpad/src/client/linux/minidump_writer/linux_dumper.h:187:26:
   required from here
> workdir/UnpackedTarball/breakpad/src/common/memory.h:165:47: error: no 
type named ‘pointer’ in ‘class std::allocator’
>   165 |   typedef typename std::allocator::pointer pointer;
>   |   ^~~

Change-Id: Id7559456cc75311837aaa9f3a531f8820d5f593d
Reviewed-on: https://gerrit.libreoffice.org/81585
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index 633574cd34a7..b9e14874d72d 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/ucontext.patch \

external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 \

external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1
 \
+   external/breakpad/c++20-allocator.patch \
 ))
 
 ifeq ($(COM_IS_CLANG),TRUE)
diff --git a/external/breakpad/c++20-allocator.patch 
b/external/breakpad/c++20-allocator.patch
new file mode 100644
index ..588d7db4dc7c
--- /dev/null
+++ b/external/breakpad/c++20-allocator.patch
@@ -0,0 +1,11 @@
+--- src/common/memory.h
 src/common/memory.h
+@@ -162,7 +162,7 @@
+ // Wrapper to use with STL containers
+ template 
+ struct PageStdAllocator : public std::allocator {
+-  typedef typename std::allocator::pointer pointer;
++  typedef T* pointer;
+   typedef typename std::allocator::size_type size_type;
+ 
+   explicit PageStdAllocator(PageAllocator& allocator): allocator_(allocator) 
{}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: external/breakpad

2019-09-26 Thread Stephan Bergmann (via logerrit)
 
external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1
 |   49 ++
 external/breakpad/UnpackedTarball_breakpad.mk  
 |1 
 2 files changed, 50 insertions(+)

New commits:
commit 6a4cebbb35f15e7989bf0a6e276db99944e3
Author: Stephan Bergmann 
AuthorDate: Thu Sep 26 22:09:56 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 27 07:09:37 2019 +0200

external/breakpad: glibc 2.30 declares tgkill

...so building against glibc-headers-2.30-4.fc31.x86_64 fails with

> src/client/linux/handler/exception_handler.cc:109:12: error: static 
declaration of 'tgkill' follows non-static declaration
> static int tgkill(pid_t tgid, pid_t tid, int sig) {
>^
> /usr/include/bits/signal_ext.h:29:12: note: previous declaration is here
> extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal);
>^
> 1 error generated.

Upstream commit  "Fix double declaration of
tgkill when using Android NDK Headers" looks like the perfect fit.

Change-Id: I1b4805886fb7c770cf9733f34a31296e6b859d92
Reviewed-on: https://gerrit.libreoffice.org/79661
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git 
a/external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1
 
b/external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1
new file mode 100644
index ..7c8a68c2451a
--- /dev/null
+++ 
b/external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1
@@ -0,0 +1,49 @@
+From 7e3c165000d44fa153a3270870ed500bc8bbb461 Mon Sep 17 00:00:00 2001
+From: Nicholas Baldwin 
+Date: Fri, 27 Oct 2017 11:44:36 -0700
+Subject: [PATCH] Fix double declaration of tgkill when using Android NDK
+ Headers.
+
+As of Android API level 16 tgkill is declared in the NDK version of
+signal.h, which conflicts with the static definition found in
+src/client/linux/handler/exception_handler.cc. This change removes
+the static tgkill definition and replaces its use with sys_tgkill
+from the linux syscall support library.
+
+Bug:
+Change-Id: Ic70addd8a064cfa36345d86b7e36409e2089e909
+Reviewed-on: https://chromium-review.googlesource.com/738912
+Reviewed-by: Mike Frysinger 
+---
+ src/client/linux/handler/exception_handler.cc | 8 +---
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/src/client/linux/handler/exception_handler.cc 
b/src/client/linux/handler/exception_handler.cc
+index 95005209..cd94e3b5 100644
+--- a/src/client/linux/handler/exception_handler.cc
 b/src/client/linux/handler/exception_handler.cc
+@@ -105,12 +105,6 @@
+ #define PR_SET_PTRACER 0x59616d61
+ #endif
+ 
+-// A wrapper for the tgkill syscall: send a signal to a specific thread.
+-static int tgkill(pid_t tgid, pid_t tid, int sig) {
+-  return syscall(__NR_tgkill, tgid, tid, sig);
+-  return 0;
+-}
+-
+ namespace google_breakpad {
+ 
+ namespace {
+@@ -400,7 +394,7 @@ void ExceptionHandler::SignalHandler(int sig, siginfo_t* 
info, void* uc) {
+ // In order to retrigger it, we have to queue a new signal by calling
+ // kill() ourselves.  The special case (si_pid == 0 && sig == SIGABRT) is
+ // due to the kernel sending a SIGABRT from a user request via SysRQ.
+-if (tgkill(getpid(), syscall(__NR_gettid), sig) < 0) {
++if (sys_tgkill(getpid(), syscall(__NR_gettid), sig) < 0) {
+   // If we failed to kill ourselves (e.g. because a sandbox disallows us
+   // to do so), we instead resort to terminating our process. This will
+   // result in an incorrect exit code.
+-- 
+2.23.0
+
diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index b70510234e38..633574cd34a7 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/breakpad-stackwalk.patch.1 \
external/breakpad/ucontext.patch \

external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 \
+   
external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1
 \
 ))
 
 ifeq ($(COM_IS_CLANG),TRUE)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: external/breakpad

2018-08-16 Thread Libreoffice Gerrit user
 
external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8cde5d96a2172acfa748235186e700029de62ee1
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 13:59:43 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 16 13:59:43 2018 +0200

Adapt external/breakpad/0001-Handle-race-between-ExceptionHandler...

to old compilers that default to < C++11.  (Explicitly passing 
CXXFLAGS_CXX11
into ExternalProject_breakpad wouldn't work well for now, as it would cause
-Wregister error with -std=c++17 at
workdir/UnpackedTarball/breakpad/src/common/dwarf/dwarf2reader.cc:878:43.)

Change-Id: I1d04e0f05e36e2f9622991fb477f430a062fee0b

diff --git 
a/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 
b/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
index a88c2cdd32bb..00762650f5f5 100644
--- 
a/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
+++ 
b/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
@@ -21,7 +21,7 @@ index b895f6d7..4d58e510 100644
bool handled = false;
 -  for (int i = g_handler_stack_->size() - 1; !handled && i >= 0; --i) {
 -handled = (*g_handler_stack_)[i]->HandleSignal(sig, info, uc);
-+  if (g_handler_stack_ != nullptr) {
++  if (g_handler_stack_ != NULL) {
 +for (int i = g_handler_stack_->size() - 1; !handled && i >= 0; --i) {
 +  handled = (*g_handler_stack_)[i]->HandleSignal(sig, info, uc);
 +}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/breakpad

2018-08-16 Thread Libreoffice Gerrit user
 
external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 |   33 ++
 external/breakpad/UnpackedTarball_breakpad.mk  
 |4 +
 2 files changed, 37 insertions(+)

New commits:
commit ac4e861203054479d06a31784a3385fc77d76b35
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 10:16:43 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 16 13:40:11 2018 +0200

Handle race in external/breakpad

...that hit once in a UBSan build in UITest_calc_tests4:

> soffice.bin: 
/data/sbergman/lo-san/core/include/com/sun/star/uno/Reference.h:420: 
interface_type 
*com::sun::star::uno::Reference::operator->()
 const [interface_type = com::sun::star::xml::crypto::XXMLSecurityContext]: 
Assertion `_pInterface != NULL' failed.
> warn:desktop:11041:11425:desktop/source/app/sofficemain.cxx:82: minidump 
generated: 
/data/sbergman/lo-san/core/workdir/UITest/calc_tests4/user/crash//0585280b-6f1e-fa99-4b711485-60baa6f1.dmp
> src/client/linux/handler/exception_handler.cc:367:34: runtime error: 
member call on null pointer of type 
'std::vector >'
> warn:sal.osl.mutex:11041:11041:sal/osl/unx/mutex.cxx:82: 
pthread_mutex_destroy failed: Device or resource busy
>  #0 in google_breakpad::ExceptionHandler::SignalHandler(int, siginfo_t*, 
void*) at  (instdir/program/libsofficeapp.so +0x963904)
> 
warn:unotools.config:11041:11041:unotools/source/config/configmgr.cxx:169: 
ConfigManager not empty
>  #1  at  (/lib64/libpthread.so.0 +0x11fbf)

Change-Id: Icf46adea879c0541a297e5f54f9ce936caa9858b
Reviewed-on: https://gerrit.libreoffice.org/59157
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git 
a/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 
b/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
new file mode 100644
index ..a88c2cdd32bb
--- /dev/null
+++ 
b/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
@@ -0,0 +1,33 @@
+From caa6f1ea462d0f0c612b871106e3e309fe0290f5 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann 
+Date: Thu, 16 Aug 2018 09:04:35 +0200
+Subject: [PATCH] Handle race between ExceptionHandler::SignalHandler and
+ ~ExceptionHandler
+
+...where thread A is blocked locking g_handler_stack_mutex_ in SignalHandler
+while thread B executes ~ExceptionHandler and sets g_handler_stack to null, but
+which thread A didn't expect to be null once it acquired the lock.
+---
+ src/client/linux/handler/exception_handler.cc | 6 --
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/client/linux/handler/exception_handler.cc 
b/src/client/linux/handler/exception_handler.cc
+index b895f6d7..4d58e510 100644
+--- a/src/client/linux/handler/exception_handler.cc
 b/src/client/linux/handler/exception_handler.cc
+@@ -372,8 +372,10 @@ void ExceptionHandler::SignalHandler(int sig, siginfo_t* 
info, void* uc) {
+   }
+ 
+   bool handled = false;
+-  for (int i = g_handler_stack_->size() - 1; !handled && i >= 0; --i) {
+-handled = (*g_handler_stack_)[i]->HandleSignal(sig, info, uc);
++  if (g_handler_stack_ != nullptr) {
++for (int i = g_handler_stack_->size() - 1; !handled && i >= 0; --i) {
++  handled = (*g_handler_stack_)[i]->HandleSignal(sig, info, uc);
++}
+   }
+ 
+   // Upon returning from this signal handler, sig will become unmasked and 
then
+-- 
+2.17.1
+
diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index e970bd5ad3f3..b70510234e38 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -13,12 +13,16 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,breakpad,0))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,breakpad,$(BREAKPAD_TARBALL)))
 
+# 
external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch
 upstreamed at
+#   
"Handle race between
+#  ExceptionHandler::SignalHandler and ~ExceptionHandler":
 $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/breakpad-use-correct-http-header.patch.1 \
external/breakpad/breakpad-wshadow.patch.1 \
external/breakpad/breakpad-wshadow2.patch.1 \
external/breakpad/breakpad-stackwalk.patch.1 \
external/breakpad/ucontext.patch \
+   
external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 \
 ))
 
 ifeq ($(COM_IS_CLANG),TRUE)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/breakpad

2017-11-14 Thread Stephan Bergmann
 external/breakpad/UnpackedTarball_breakpad.mk |1 
 external/breakpad/ucontext.patch  |  194 ++
 2 files changed, 195 insertions(+)

New commits:
commit 935f76d0edeb0025dee39f95e1f0bc1a840e316e
Author: Stephan Bergmann 
Date:   Tue Nov 14 18:21:22 2017 +0100

Use proper ucontext_t in external/breakpad

SUSv4 merely claims that ucontext_t is defined as a structure type (in
), and at least /usr/include/sys/ucontext.h in
glibc-headers-2.26-15.fc27.x86_64 now defines it as

  typedef struct ucontext_t { ... } ucontext_t;

instead of as

  typedef struct ucontext { ... } ucontext_t;

as was done in older glibc, so referring to it as "struct ucontext" (C/C++) 
or
"ucontext" (C++) no longer works.

Change-Id: I3d515a4ce7e5a49d0277136cad2b982bdf799ac5

diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index 108004ddee36..e970bd5ad3f3 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/breakpad-wshadow.patch.1 \
external/breakpad/breakpad-wshadow2.patch.1 \
external/breakpad/breakpad-stackwalk.patch.1 \
+   external/breakpad/ucontext.patch \
 ))
 
 ifeq ($(COM_IS_CLANG),TRUE)
diff --git a/external/breakpad/ucontext.patch b/external/breakpad/ucontext.patch
new file mode 100644
index ..a108ae11cd59
--- /dev/null
+++ b/external/breakpad/ucontext.patch
@@ -0,0 +1,194 @@
+--- src/client/linux/dump_writer_common/ucontext_reader.cc
 src/client/linux/dump_writer_common/ucontext_reader.cc
+@@ -40,15 +40,15 @@
+ 
+ #if defined(__i386__)
+ 
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.gregs[REG_ESP];
+ }
+ 
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.gregs[REG_EIP];
+ }
+ 
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct _libc_fpstate* fp) {
+   const greg_t* regs = uc->uc_mcontext.gregs;
+ 
+@@ -88,15 +88,15 @@
+ 
+ #elif defined(__x86_64)
+ 
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.gregs[REG_RSP];
+ }
+ 
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.gregs[REG_RIP];
+ }
+ 
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct _libc_fpstate* fpregs) {
+   const greg_t* regs = uc->uc_mcontext.gregs;
+ 
+@@ -145,15 +145,15 @@
+ 
+ #elif defined(__ARM_EABI__)
+ 
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.arm_sp;
+ }
+ 
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.arm_pc;
+ }
+ 
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) 
{
+   out->context_flags = MD_CONTEXT_ARM_FULL;
+ 
+   out->iregs[0] = uc->uc_mcontext.arm_r0;
+@@ -184,15 +184,15 @@
+ 
+ #elif defined(__aarch64__)
+ 
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.sp;
+ }
+ 
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.pc;
+ }
+ 
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct fpsimd_context* fpregs) {
+   out->context_flags = MD_CONTEXT_ARM64_FULL;
+ 
+@@ -210,15 +210,15 @@
+ 
+ #elif defined(__mips__)
+ 
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+   return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP];
+ }
+ 
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t 

[Libreoffice-commits] core.git: external/breakpad

2017-02-01 Thread Stephan Bergmann
 external/breakpad/UnpackedTarball_breakpad.mk |   10 ++
 external/breakpad/ubsan.patch |   21 +
 2 files changed, 31 insertions(+)

New commits:
commit b834fad4a5b7fb6bd642769ed8803d0a65e50b00
Author: Stephan Bergmann 
Date:   Wed Feb 1 12:37:54 2017 +0100

external/breakpad: Work around -fsanitize=alignment

...as seen in the scenario described in 
5997121a51e240c762b4d002d7d16b94ac13d4a1
"Support signal handlers registered with SA_SIGINFO", first

> src/client/linux/minidump_writer/directory_reader.h:82:19: runtime error: 
member access within misaligned address 0x7f3f8235c2cc for type 'struct 
kernel_dirent', which requires 8 byte alignment
> 0x7f3f8235c2cc: note: pointer points here
>   10 02 00 00 d8 f8 3b 00  00 00 00 00 01 00 00 00  00 00 00 00 18 00 2e 
00  00 00 00 04 02 c7 3b 00

and then

> src/client/linux/minidump_writer/linux_dumper.cc:382:19: runtime error: 
member access within misaligned address 0x7f96c225d7bc for type 
'google_breakpad::MappingInfo', which requires 8 byte alignment
> 0x7f96c225d7bc: note: pointer points here
>   20 0a 32 30 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 
00  00 00 00 00 00 00 00 00
>   ^

Change-Id: I7f739567879093a404bee3e351ce9e8257676183

diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index 445047b..108004d 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -9,6 +9,8 @@
 
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,breakpad))
 
+$(eval $(call gb_UnpackedTarball_set_patchlevel,breakpad,0))
+
 $(eval $(call gb_UnpackedTarball_set_tarball,breakpad,$(BREAKPAD_TARBALL)))
 
 $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
@@ -18,4 +20,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/breakpad-stackwalk.patch.1 \
 ))
 
+ifeq ($(COM_IS_CLANG),TRUE)
+ifneq ($(filter -fsanitize=%,$(CC)),)
+$(eval $(call gb_UnpackedTarball_add_patches,breakpad, \
+external/breakpad/ubsan.patch \
+))
+endif
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/breakpad/ubsan.patch b/external/breakpad/ubsan.patch
new file mode 100644
index 000..f420451
--- /dev/null
+++ b/external/breakpad/ubsan.patch
@@ -0,0 +1,21 @@
+--- src/client/linux/minidump_writer/directory_reader.h
 src/client/linux/minidump_writer/directory_reader.h
+@@ -96,7 +96,7 @@
+   const int fd_;
+   bool hit_eof_;
+   unsigned buf_used_;
+-  uint8_t buf_[sizeof(struct kernel_dirent) + NAME_MAX + 1];
++  uint8_t buf_[sizeof(struct kernel_dirent) + NAME_MAX + 1] __attribute__ 
((aligned (__BIGGEST_ALIGNMENT__)));
+ };
+ 
+ }  // namespace google_breakpad
+--- src/common/memory.h
 src/common/memory.h
+@@ -75,6 +75,7 @@
+ if (!bytes)
+   return NULL;
+ 
++bytes = (bytes + (__BIGGEST_ALIGNMENT__ - 1)) & ~(__BIGGEST_ALIGNMENT__ - 
1);
+ if (current_page_ && page_size_ - page_offset_ >= bytes) {
+   uint8_t *const ret = current_page_ + page_offset_;
+   page_offset_ += bytes;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/breakpad

2016-06-26 Thread Markus Mohrhard
 external/breakpad/breakpad-stackwalk.patch.1 |   30 ---
 1 file changed, 23 insertions(+), 7 deletions(-)

New commits:
commit 74c01bb89faa1c900fb9b63a04c469a8166996d9
Author: Markus Mohrhard 
Date:   Mon Jun 27 02:14:58 2016 +0200

better use a backward compatible way to change the output

Change-Id: If5829e321db8af1f09cccafaf34a18343492f514

diff --git a/external/breakpad/breakpad-stackwalk.patch.1 
b/external/breakpad/breakpad-stackwalk.patch.1
index 26803f1..9a3ce95 100644
--- a/external/breakpad/breakpad-stackwalk.patch.1
+++ b/external/breakpad/breakpad-stackwalk.patch.1
@@ -1,16 +1,32 @@
 diff -ur breakpad.org/src/processor/stackwalk_common.cc 
breakpad/src/processor/stackwalk_common.cc
 breakpad.org/src/processor/stackwalk_common.cc 2016-06-25 
01:38:53.282302964 +0200
-+++ breakpad/src/processor/stackwalk_common.cc 2016-06-25 01:42:58.463821357 
+0200
-@@ -767,9 +767,11 @@
+--- breakpad.org/src/processor/stackwalk_common.cc 2016-06-27 
02:06:43.304932691 +0200
 breakpad/src/processor/stackwalk_common.cc 2016-06-27 02:10:22.815642476 
+0200
+@@ -750,7 +750,7 @@
+ // one per line, in the following machine-readable pipe-delimited
+ // text format:
+ // Module|{Module Filename}|{Version}|{Debug Filename}|{Debug Identifier}|
+-// {Base Address}|{Max Address}|{Main}
++// {Base Address}|{Max Address}|{Main}|{Code Identifier}
+ static void PrintModulesMachineReadable(const CodeModules *modules) {
+   if (!modules)
+ return;
+@@ -767,7 +767,7 @@
 ++module_sequence) {
  const CodeModule *module = modules->GetModuleAtSequence(module_sequence);
  uint64_t base_address = module->base_address();
 -printf("Module%c%s%c%s%c%s%c%s%c0x%08" PRIx64 "%c0x%08" PRIx64 "%c%d\n",
-+printf("Module%c%s%c%s%c%s%c%s%c%s%c0x%08" PRIx64 "%c0x%08" PRIx64 
"%c%d\n",
++printf("Module%c%s%c%s%c%s%c%s%c0x%08" PRIx64 "%c0x%08" PRIx64 
"%c%d%c%s\n",
 kOutputSeparator,
 
StripSeparator(PathnameStripper::File(module->code_file())).c_str(),
-+   kOutputSeparator,
-+   
StripSeparator(PathnameStripper::File(module->code_identifier())).c_str(),
 kOutputSeparator, StripSeparator(module->version()).c_str(),
+@@ -778,7 +778,9 @@
+kOutputSeparator, base_address,
+kOutputSeparator, base_address + module->size() - 1,
 kOutputSeparator,
-
StripSeparator(PathnameStripper::File(module->debug_file())).c_str(),
+-   main_module != NULL && base_address == main_address ? 1 : 0);
++   main_module != NULL && base_address == main_address ? 1 : 0),
++   kOutputSeparator,
++   
StripSeparator(PathnameStripper::File(module->code_identifier())).c_str();
+   }
+ }
+ 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/breakpad

2016-06-24 Thread Markus Mohrhard
 external/breakpad/UnpackedTarball_breakpad.mk |1 +
 external/breakpad/breakpad-stackwalk.patch.1  |   16 
 2 files changed, 17 insertions(+)

New commits:
commit c717158a82bed756c4d20f6304a29600affa0f66
Author: Markus Mohrhard 
Date:   Sat Jun 25 02:03:47 2016 +0200

add code_id to the minidump_stackwalk

Change-Id: Ibcc32344780b7ad5814678cf7dd9a2167ede1661
Reviewed-on: https://gerrit.libreoffice.org/26649
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index 59073eb..445047b 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/breakpad-use-correct-http-header.patch.1 \
external/breakpad/breakpad-wshadow.patch.1 \
external/breakpad/breakpad-wshadow2.patch.1 \
+   external/breakpad/breakpad-stackwalk.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/breakpad/breakpad-stackwalk.patch.1 
b/external/breakpad/breakpad-stackwalk.patch.1
new file mode 100644
index 000..26803f1
--- /dev/null
+++ b/external/breakpad/breakpad-stackwalk.patch.1
@@ -0,0 +1,16 @@
+diff -ur breakpad.org/src/processor/stackwalk_common.cc 
breakpad/src/processor/stackwalk_common.cc
+--- breakpad.org/src/processor/stackwalk_common.cc 2016-06-25 
01:38:53.282302964 +0200
 breakpad/src/processor/stackwalk_common.cc 2016-06-25 01:42:58.463821357 
+0200
+@@ -767,9 +767,11 @@
+++module_sequence) {
+ const CodeModule *module = modules->GetModuleAtSequence(module_sequence);
+ uint64_t base_address = module->base_address();
+-printf("Module%c%s%c%s%c%s%c%s%c0x%08" PRIx64 "%c0x%08" PRIx64 "%c%d\n",
++printf("Module%c%s%c%s%c%s%c%s%c%s%c0x%08" PRIx64 "%c0x%08" PRIx64 
"%c%d\n",
+kOutputSeparator,
+
StripSeparator(PathnameStripper::File(module->code_file())).c_str(),
++   kOutputSeparator,
++   
StripSeparator(PathnameStripper::File(module->code_identifier())).c_str(),
+kOutputSeparator, StripSeparator(module->version()).c_str(),
+kOutputSeparator,
+
StripSeparator(PathnameStripper::File(module->debug_file())).c_str(),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/breakpad RepositoryExternal.mk

2016-06-14 Thread Markus Mohrhard
 RepositoryExternal.mk |4 
 external/breakpad/ExternalPackage_breakpad.mk |   20 
 external/breakpad/Module_breakpad.mk  |1 -
 3 files changed, 25 deletions(-)

New commits:
commit 4b2b496901ac765c4581a191a37a1731c0b87f99
Author: Markus Mohrhard 
Date:   Mon Jun 13 01:20:08 2016 +0200

we are using our own minidump_upload executable

Change-Id: Icee770ff8e2db019031d618528a9aab83041389d
Reviewed-on: https://gerrit.libreoffice.org/26244
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 563c0d4..62d3bfd 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3342,10 +3342,6 @@ $(call gb_LinkTarget_use_external_project,$(1),breakpad)
 
 endef
 
-$(eval $(call gb_Helper_register_packages_for_install,ooo,\
-   breakpad \
-))
-
 endif # ENABLE_BREAKPAD
 
 ifeq ($(ENABLE_GLTF),TRUE)
diff --git a/external/breakpad/ExternalPackage_breakpad.mk 
b/external/breakpad/ExternalPackage_breakpad.mk
deleted file mode 100644
index 6c0d0bf..000
--- a/external/breakpad/ExternalPackage_breakpad.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_ExternalPackage_ExternalPackage,breakpad,breakpad))
-
-$(eval $(call gb_ExternalPackage_use_external_project,breakpad,breakpad))
-
-ifeq ($(OS),LINUX)
-$(eval $(call 
gb_ExternalPackage_add_file,breakpad,$(LIBO_LIB_FOLDER)/minidump_upload,src/tools/linux/symupload/minidump_upload))
-else ifeq ($(OS)),WNT)
-$(eval $(call 
gb_ExternalPackage_add_file,breakpad,$(LIBO_LIB_FOLDER)/minidump_upload,src/tools/linux/symupload/minidump_upload))
-endif
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/breakpad/Module_breakpad.mk 
b/external/breakpad/Module_breakpad.mk
index 6cc740a..be91053 100644
--- a/external/breakpad/Module_breakpad.mk
+++ b/external/breakpad/Module_breakpad.mk
@@ -11,7 +11,6 @@ $(eval $(call gb_Module_Module,breakpad))
 
 $(eval $(call gb_Module_add_targets,breakpad,\
UnpackedTarball_breakpad \
-   ExternalPackage_breakpad \
 ))
 
 ifneq ($(OS)$(COM),WNTMSC)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/breakpad

2016-03-31 Thread Michael Stahl
 external/breakpad/Module_breakpad.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 37f5df5537341232fdb0d68868408dec8fd84116
Author: Michael Stahl 
Date:   Thu Mar 31 23:58:14 2016 +0200

breakpad: fix module makefile

ff9b7d118b34b53ec947af881fccd822e2aeb1fd removed the ExternalPackage
instead of the ExternalProject.

Change-Id: I9240526b29d0559e1485253383d39b5858e4039b

diff --git a/external/breakpad/Module_breakpad.mk 
b/external/breakpad/Module_breakpad.mk
index 3880760..6cc740a 100644
--- a/external/breakpad/Module_breakpad.mk
+++ b/external/breakpad/Module_breakpad.mk
@@ -10,8 +10,8 @@
 $(eval $(call gb_Module_Module,breakpad))
 
 $(eval $(call gb_Module_add_targets,breakpad,\
-   ExternalProject_breakpad \
UnpackedTarball_breakpad \
+   ExternalPackage_breakpad \
 ))
 
 ifneq ($(OS)$(COM),WNTMSC)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/breakpad RepositoryExternal.mk

2016-03-30 Thread Markus Mohrhard
 RepositoryExternal.mk |4 +-
 external/breakpad/ExternalProject_breakpad.mk |8 -
 external/breakpad/Module_breakpad.mk  |   11 +++
 external/breakpad/StaticLibrary_breakpad.mk   |   36 ++
 4 files changed, 48 insertions(+), 11 deletions(-)

New commits:
commit ff9b7d118b34b53ec947af881fccd822e2aeb1fd
Author: Markus Mohrhard 
Date:   Thu Mar 31 00:00:03 2016 +0200

support building breakpad on windows

Change-Id: I74b0e5a8e922935c9667491e5f33c514c3315d2a
Reviewed-on: https://gerrit.libreoffice.org/23667
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 3582790..6a36f9f 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3329,8 +3329,8 @@ $(call gb_LinkTarget_set_include,$(1),\
 )
 
 ifeq ($(COM),MSC)
-$(call gb_LinkTarget_add_libs,$(1),\
-   $(call 
gb_UnpackedTarball_get_dir,breakpad)/build/win32/$(wnt_arch_subdir_optional)$(if
 $(MSVC_USE_DEBUG_RUNTIME),Debug/breakpad.lib,Release/breakpad.lib) \
+$(call gb_LinkTarget_use_static_libraries,$(1),\
+breakpad \
 )
 else
 $(call gb_LinkTarget_add_libs,$(1),\
diff --git a/external/breakpad/ExternalProject_breakpad.mk 
b/external/breakpad/ExternalProject_breakpad.mk
index c0ea5df..70df68e 100644
--- a/external/breakpad/ExternalProject_breakpad.mk
+++ b/external/breakpad/ExternalProject_breakpad.mk
@@ -16,14 +16,6 @@ $(eval $(call gb_ExternalProject_register_targets,breakpad,\
 
 ifeq ($(COM),MSC)
 
-$(call gb_ExternalProject_get_state_target,breakpad,build) :
-   $(call gb_ExternalProject_run,build,\
-   msbuild.exe breakpad.vcxproj /p:Platform=$(if $(filter 
INTEL,$(CPUNAME)),Win32,x64) \
-   /p:Configuration=$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
-   $(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 
/p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \
-   $(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 
/p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \
-   ,build/win32)
-
 else # !ifeq($(COM),MSC)
 
 $(call gb_ExternalProject_get_state_target,breakpad,build) :
diff --git a/external/breakpad/Module_breakpad.mk 
b/external/breakpad/Module_breakpad.mk
index 3902c8e..3880760 100644
--- a/external/breakpad/Module_breakpad.mk
+++ b/external/breakpad/Module_breakpad.mk
@@ -12,7 +12,16 @@ $(eval $(call gb_Module_Module,breakpad))
 $(eval $(call gb_Module_add_targets,breakpad,\
ExternalProject_breakpad \
UnpackedTarball_breakpad \
-   ExternalPackage_breakpad \
 ))
 
+ifneq ($(OS)$(COM),WNTMSC)
+$(eval $(call gb_Module_add_targets,breakpad,\
+   ExternalProject_breakpad \
+))
+else
+$(eval $(call gb_Module_add_targets,breakpad,\
+   StaticLibrary_breakpad \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/breakpad/StaticLibrary_breakpad.mk 
b/external/breakpad/StaticLibrary_breakpad.mk
new file mode 100644
index 000..bc6abdd
--- /dev/null
+++ b/external/breakpad/StaticLibrary_breakpad.mk
@@ -0,0 +1,36 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,breakpad))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,breakpad))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,breakpad,breakpad))
+
+$(eval $(call gb_StaticLibrary_set_include,breakpad,\
+-I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
+-I$(call gb_UnpackedTarball_get_dir,breakpad)/src/client/windows \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_defs,breakpad,\
+   -DUNICODE \
+))
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,breakpad,cc))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,breakpad,\
+   UnpackedTarball/breakpad/src/client/windows/handler/exception_handler \
+   
UnpackedTarball/breakpad/src/client/windows/crash_generation/client_info \
+   
UnpackedTarball/breakpad/src/client/windows/crash_generation/crash_generation_client
 \
+   
UnpackedTarball/breakpad/src/client/windows/crash_generation/crash_generation_server
 \
+   
UnpackedTarball/breakpad/src/client/windows/crash_generation/minidump_generator 
\
+))
+
+# vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/breakpad

2016-02-27 Thread Markus Mohrhard
 external/breakpad/UnpackedTarball_breakpad.mk |2 
 external/breakpad/breakpad-wshadow.patch.1|  232 ++
 external/breakpad/breakpad-wshadow2.patch.1   |  144 
 3 files changed, 378 insertions(+)

New commits:
commit f6e993e73f8823b62cddf7b32f7762296ea47858
Author: Markus Mohrhard 
Date:   Sun Feb 7 19:32:28 2016 +0100

fix a number of Wshadow warnings in breakpad

Change-Id: I8133e03e4ed21ac1efd9982860276d4776850bba
Reviewed-on: https://gerrit.libreoffice.org/22567
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index 8424a02..59073eb 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -13,6 +13,8 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,breakpad,$(BREAKPAD_TARBALL)))
 
 $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/breakpad-use-correct-http-header.patch.1 \
+   external/breakpad/breakpad-wshadow.patch.1 \
+   external/breakpad/breakpad-wshadow2.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/breakpad/breakpad-wshadow.patch.1 
b/external/breakpad/breakpad-wshadow.patch.1
new file mode 100644
index 000..d696e5b
--- /dev/null
+++ b/external/breakpad/breakpad-wshadow.patch.1
@@ -0,0 +1,232 @@
+Only in breakpad: breakpad-client.pc
+Only in breakpad: breakpad.pc
+Only in breakpad: build.log
+Only in breakpad: config.log
+Only in breakpad: config.status
+Only in breakpad: Makefile
+Only in breakpad/src/client: .deps
+Only in breakpad/src/client: .dirstamp
+Only in breakpad/src/client/linux/crash_generation: crash_generation_client.o
+Only in breakpad/src/client/linux/crash_generation: crash_generation_server.o
+Only in breakpad/src/client/linux/crash_generation: .deps
+Only in breakpad/src/client/linux/crash_generation: .dirstamp
+Only in breakpad/src/client/linux: .dirstamp
+Only in breakpad/src/client/linux/dump_writer_common: .deps
+Only in breakpad/src/client/linux/dump_writer_common: .dirstamp
+Only in breakpad/src/client/linux/dump_writer_common: thread_info.o
+Only in breakpad/src/client/linux/dump_writer_common: ucontext_reader.o
+Only in breakpad/src/client/linux/handler: .deps
+Only in breakpad/src/client/linux/handler: .dirstamp
+Only in breakpad/src/client/linux/handler: exception_handler.o
+diff -ur breakpad.org/src/client/linux/handler/minidump_descriptor.h 
breakpad/src/client/linux/handler/minidump_descriptor.h
+--- breakpad.org/src/client/linux/handler/minidump_descriptor.h
2016-02-07 19:22:24.329411023 +0100
 breakpad/src/client/linux/handler/minidump_descriptor.h2016-02-07 
19:24:28.600438386 +0100
+@@ -55,18 +55,18 @@
+ fd_(-1),
+ size_limit_(-1) {}
+ 
+-  explicit MinidumpDescriptor(const string& directory)
++  explicit MinidumpDescriptor(const string& dir)
+   : mode_(kWriteMinidumpToFile),
+ fd_(-1),
+-directory_(directory),
++directory_(dir),
+ c_path_(NULL),
+ size_limit_(-1) {
+ assert(!directory.empty());
+   }
+ 
+-  explicit MinidumpDescriptor(int fd)
++  explicit MinidumpDescriptor(int file_descriptor)
+   : mode_(kWriteMinidumpToFd),
+-fd_(fd),
++fd_(file_descriptor),
+ c_path_(NULL),
+ size_limit_(-1) {
+ assert(fd != -1);
+Only in breakpad/src/client/linux/handler: .minidump_descriptor.h.un~
+Only in breakpad/src/client/linux/handler: minidump_descriptor.o
+Only in breakpad/src/client/linux: libbreakpad_client.a
+Only in breakpad/src/client/linux: linux_dumper_unittest_helper
+Only in breakpad/src/client/linux/log: .deps
+Only in breakpad/src/client/linux/log: .dirstamp
+Only in breakpad/src/client/linux/log: log.o
+Only in breakpad/src/client/linux/microdump_writer: .deps
+Only in breakpad/src/client/linux/microdump_writer: .dirstamp
+Only in breakpad/src/client/linux/microdump_writer: microdump_writer.o
+Only in breakpad/src/client/linux/minidump_writer: .deps
+Only in breakpad/src/client/linux/minidump_writer: .dirstamp
+Only in breakpad/src/client/linux/minidump_writer: linux_core_dumper.o
+diff -ur breakpad.org/src/client/linux/minidump_writer/linux_dumper.h 
breakpad/src/client/linux/minidump_writer/linux_dumper.h
+--- breakpad.org/src/client/linux/minidump_writer/linux_dumper.h   
2016-02-07 19:22:24.330410999 +0100
 breakpad/src/client/linux/minidump_writer/linux_dumper.h   2016-02-07 
19:26:10.870017835 +0100
+@@ -130,15 +130,15 @@
+uint8_t identifier[sizeof(MDGUID)]);
+ 
+   uintptr_t crash_address() const { return crash_address_; }
+-  void set_crash_address(uintptr_t crash_address) {
+-crash_address_ = crash_address;
++  void set_crash_address(uintptr_t crash_addr) {
++crash_address_ = crash_addr;
+   

[Libreoffice-commits] core.git: external/breakpad

2016-02-22 Thread Markus Mohrhard
 external/breakpad/UnpackedTarball_breakpad.mk  |4 +++
 external/breakpad/breakpad-use-correct-http-header.patch.1 |   14 +
 2 files changed, 18 insertions(+)

New commits:
commit 1a25f74bcc164c28b168e66a8e7fb1e71c6b4a7f
Author: Markus Mohrhard 
Date:   Mon Nov 23 17:43:14 2015 +0100

fix the minidump_upload script to send correct http header

Change-Id: Ie373992ca9d69fec508778947a983fad56924a60
Reviewed-on: https://gerrit.libreoffice.org/22550
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index ab09d66..8424a02 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -11,4 +11,8 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,breakpad))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,breakpad,$(BREAKPAD_TARBALL)))
 
+$(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
+   external/breakpad/breakpad-use-correct-http-header.patch.1 \
+))
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/breakpad/breakpad-use-correct-http-header.patch.1 
b/external/breakpad/breakpad-use-correct-http-header.patch.1
new file mode 100644
index 000..257d546
--- /dev/null
+++ b/external/breakpad/breakpad-use-correct-http-header.patch.1
@@ -0,0 +1,14 @@
+diff -ur breakpad.org/src/tools/linux/symupload/minidump_upload.cc 
breakpad/src/tools/linux/symupload/minidump_upload.cc
+--- breakpad.org/src/tools/linux/symupload/minidump_upload.cc  2015-11-23 
17:37:53.830558138 +0100
 breakpad/src/tools/linux/symupload/minidump_upload.cc  2015-11-23 
17:38:59.559051874 +0100
+@@ -59,8 +59,8 @@
+ static void Start(Options *options) {
+   std::map parameters;
+   // Add parameters
+-  parameters["prod"] = options->product;
+-  parameters["ver"] = options->version;
++  parameters["ProductName"] = options->product;
++  parameters["Version"] = options->version;
+ 
+   std::map files;
+   files["upload_file_minidump"] = options->minidumpPath;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/breakpad RepositoryExternal.mk

2016-02-22 Thread Markus Mohrhard
 RepositoryExternal.mk |5 +
 external/breakpad/ExternalPackage_breakpad.mk |   20 
 external/breakpad/Module_breakpad.mk  |1 +
 3 files changed, 26 insertions(+)

New commits:
commit 262eddce8aa4a439881e031beef86879cd4c0690
Author: Markus Mohrhard 
Date:   Tue Nov 17 07:09:20 2015 +0100

package minidump_upload tool

We are going to use this tool for uploading the minidumps for now.

Change-Id: I2c59d420e3884aee46411df913c2ec067e0c636b
Reviewed-on: https://gerrit.libreoffice.org/22549
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 8ce914d..e0f6c9b 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3368,6 +3368,11 @@ endif
 
 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
 
+$(eval $(call gb_Helper_register_packages_for_install,ooo,\
+   breakpad \
+))
+
+
 endef
 
 # else # SYSTEM_LIBBREAKPAD
diff --git a/external/breakpad/ExternalPackage_breakpad.mk 
b/external/breakpad/ExternalPackage_breakpad.mk
new file mode 100644
index 000..6c0d0bf
--- /dev/null
+++ b/external/breakpad/ExternalPackage_breakpad.mk
@@ -0,0 +1,20 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalPackage_ExternalPackage,breakpad,breakpad))
+
+$(eval $(call gb_ExternalPackage_use_external_project,breakpad,breakpad))
+
+ifeq ($(OS),LINUX)
+$(eval $(call 
gb_ExternalPackage_add_file,breakpad,$(LIBO_LIB_FOLDER)/minidump_upload,src/tools/linux/symupload/minidump_upload))
+else ifeq ($(OS)),WNT)
+$(eval $(call 
gb_ExternalPackage_add_file,breakpad,$(LIBO_LIB_FOLDER)/minidump_upload,src/tools/linux/symupload/minidump_upload))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/breakpad/Module_breakpad.mk 
b/external/breakpad/Module_breakpad.mk
index 9750c31..3902c8e 100644
--- a/external/breakpad/Module_breakpad.mk
+++ b/external/breakpad/Module_breakpad.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_Module_Module,breakpad))
 $(eval $(call gb_Module_add_targets,breakpad,\
ExternalProject_breakpad \
UnpackedTarball_breakpad \
+   ExternalPackage_breakpad \
 ))
 
 # vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits