All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/google-breakpad: fix build with glibc >= 2.33
@ 2021-09-26  8:35 Fabrice Fontaine
  2021-09-26 19:49 ` Arnout Vandecappelle
  2021-10-05 15:24 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2021-09-26  8:35 UTC (permalink / raw)
  To: buildroot; +Cc: Pascal Huerst, Anisse Astier, Fabrice Fontaine

Fix the following build failure with glibc >= 2.33:

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

Fixes:
 - http://autobuild.buildroot.org/results/61a89fa954db16a7b5b9fcee55c545e489f8d489

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0004-Fix-for-non-constant-SIGSTKSZ.patch  | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/google-breakpad/0004-Fix-for-non-constant-SIGSTKSZ.patch

diff --git a/package/google-breakpad/0004-Fix-for-non-constant-SIGSTKSZ.patch b/package/google-breakpad/0004-Fix-for-non-constant-SIGSTKSZ.patch
new file mode 100644
index 0000000000..4291216c61
--- /dev/null
+++ b/package/google-breakpad/0004-Fix-for-non-constant-SIGSTKSZ.patch
@@ -0,0 +1,34 @@
+From 4a332d01186b09a9d46390b845024d914d9149cb Mon Sep 17 00:00:00 2001
+From: Michel Alexandre Salim <michel@michel-slm.name>
+Date: Sun, 21 Mar 2021 13:17:00 -0700
+Subject: [PATCH] Fix for non-constant SIGSTKSZ
+
+On glibc > 2.33, `SIGSTKSZ` might not be constant (in which case
+it expands to a call to `sysconf` which returns a `long int`); see
+http://sourceware-org.1504.n7.nabble.com/PATCH-sysconf-Add-SC-MINSIGSTKSZ-SC-SIGSTKSZ-BZ-20305-td650948.html
+
+Cast the two arguments to `max` to `unsigned`, which is the type of the variable
+we're storing the result in anyway, so that it works both with the old-style constant
+`SIGSTKSZ` and the new configurable one.
+
+Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
+Change-Id: I3d87048561a87c6b9fcdbb14b3d53dd45b0a00f0
+
+[Retrieved from:
+https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2776379]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+
+diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
+index ca353c4..3788829 100644
+--- a/src/client/linux/handler/exception_handler.cc
++++ b/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((unsigned) 16384, (unsigned) SIGSTKSZ);
+ 
+   // Only set an alternative stack if there isn't already one, or if the current
+   // one is too small.
-- 
2.33.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/google-breakpad: fix build with glibc >= 2.33
  2021-09-26  8:35 [Buildroot] [PATCH 1/1] package/google-breakpad: fix build with glibc >= 2.33 Fabrice Fontaine
@ 2021-09-26 19:49 ` Arnout Vandecappelle
  2021-10-05 15:24 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2021-09-26 19:49 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot; +Cc: Pascal Huerst, Anisse Astier



On 26/09/2021 10:35, Fabrice Fontaine wrote:
> Fix the following build failure with glibc >= 2.33:
> 
> src/client/linux/handler/exception_handler.cc: In function 'void google_breakpad::{anonymous}::InstallAlternateStackLocked()':
> src/client/linux/handler/exception_handler.cc:147:49: error: no matching function for call to 'max(int, long int)'
>    147 |   static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
>        |                                         ~~~~~~~~^~~~~~~~~~~~~~~~~
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/61a89fa954db16a7b5b9fcee55c545e489f8d489
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   .../0004-Fix-for-non-constant-SIGSTKSZ.patch  | 34 +++++++++++++++++++
>   1 file changed, 34 insertions(+)
>   create mode 100644 package/google-breakpad/0004-Fix-for-non-constant-SIGSTKSZ.patch
> 
> diff --git a/package/google-breakpad/0004-Fix-for-non-constant-SIGSTKSZ.patch b/package/google-breakpad/0004-Fix-for-non-constant-SIGSTKSZ.patch
> new file mode 100644
> index 0000000000..4291216c61
> --- /dev/null
> +++ b/package/google-breakpad/0004-Fix-for-non-constant-SIGSTKSZ.patch
> @@ -0,0 +1,34 @@
> +From 4a332d01186b09a9d46390b845024d914d9149cb Mon Sep 17 00:00:00 2001
> +From: Michel Alexandre Salim <michel@michel-slm.name>
> +Date: Sun, 21 Mar 2021 13:17:00 -0700
> +Subject: [PATCH] Fix for non-constant SIGSTKSZ
> +
> +On glibc > 2.33, `SIGSTKSZ` might not be constant (in which case
> +it expands to a call to `sysconf` which returns a `long int`); see
> +http://sourceware-org.1504.n7.nabble.com/PATCH-sysconf-Add-SC-MINSIGSTKSZ-SC-SIGSTKSZ-BZ-20305-td650948.html
> +
> +Cast the two arguments to `max` to `unsigned`, which is the type of the variable
> +we're storing the result in anyway, so that it works both with the old-style constant
> +`SIGSTKSZ` and the new configurable one.
> +
> +Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
> +Change-Id: I3d87048561a87c6b9fcdbb14b3d53dd45b0a00f0
> +
> +[Retrieved from:
> +https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2776379]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> +
> +diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
> +index ca353c4..3788829 100644
> +--- a/src/client/linux/handler/exception_handler.cc
> ++++ b/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((unsigned) 16384, (unsigned) SIGSTKSZ);
> +
> +   // Only set an alternative stack if there isn't already one, or if the current
> +   // one is too small.
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/google-breakpad: fix build with glibc >= 2.33
  2021-09-26  8:35 [Buildroot] [PATCH 1/1] package/google-breakpad: fix build with glibc >= 2.33 Fabrice Fontaine
  2021-09-26 19:49 ` Arnout Vandecappelle
@ 2021-10-05 15:24 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2021-10-05 15:24 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Pascal Huerst, Anisse Astier, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure with glibc >= 2.33:
 > src/client/linux/handler/exception_handler.cc: In function 'void google_breakpad::{anonymous}::InstallAlternateStackLocked()':
 > src/client/linux/handler/exception_handler.cc:147:49: error: no matching function for call to 'max(int, long int)'
 >   147 |   static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
 >       |                                         ~~~~~~~~^~~~~~~~~~~~~~~~~

 > Fixes:
 >  - http://autobuild.buildroot.org/results/61a89fa954db16a7b5b9fcee55c545e489f8d489

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2021.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-05 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-26  8:35 [Buildroot] [PATCH 1/1] package/google-breakpad: fix build with glibc >= 2.33 Fabrice Fontaine
2021-09-26 19:49 ` Arnout Vandecappelle
2021-10-05 15:24 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.