All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/3] mongodb: Do not use MINSIGSTKSZ
@ 2021-05-12  0:07 Khem Raj
  2021-05-12  0:07 ` [meta-oe][PATCH 2/3] tbb: Fix build with GCC 11 Khem Raj
  2021-05-12  0:07 ` [meta-oe][PATCH 3/3] breakpad: Fix type mismatch for SIGSTKSZ Khem Raj
  0 siblings, 2 replies; 3+ messages in thread
From: Khem Raj @ 2021-05-12  0:07 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

glibc 2.34 has made MINSIGSTKSZ non-constant

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../mongodb/0001-Do-not-use-MINSIGSTKSZ.patch | 34 +++++++++++++++++++
 .../recipes-dbs/mongodb/mongodb_git.bb        |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Do-not-use-MINSIGSTKSZ.patch

diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Do-not-use-MINSIGSTKSZ.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Do-not-use-MINSIGSTKSZ.patch
new file mode 100644
index 0000000000..0ee64e9c6c
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Do-not-use-MINSIGSTKSZ.patch
@@ -0,0 +1,34 @@
+From 027044a692b588ef586d495f65eb58b07cc711a3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 11 May 2021 10:15:51 -0700
+Subject: [PATCH] Do not use MINSIGSTKSZ
+
+Since glibc 2.34+ MINSIGSTKSZ is no more a constant.  So,
+let's hardwire this for now until better fix is found.
+64Kb should be good anyway
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/mongo/stdx/thread.h | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/src/mongo/stdx/thread.h b/src/mongo/stdx/thread.h
+index f8058279e3..f31f309959 100644
+--- a/src/mongo/stdx/thread.h
++++ b/src/mongo/stdx/thread.h
+@@ -104,10 +104,7 @@ private:
+     //   .                     N   Y :      4,344 |  13,048 |     7,352
+     //   .                     Y   Y :      4,424 |  13,672 |     8,392
+     //   ( https://jira.mongodb.org/secure/attachment/233569/233569_stacktrace-writeup.txt )
+-    static constexpr std::size_t kMongoMinSignalStackSize = std::size_t{64} << 10;
+-
+-    static constexpr std::size_t kStackSize =
+-        std::max(kMongoMinSignalStackSize, std::size_t{MINSIGSTKSZ});
++    static constexpr std::size_t kStackSize = std::size_t{64} << 10;
+     std::unique_ptr<std::byte[]> _stackStorage = std::make_unique<std::byte[]>(kStackSize);
+ 
+ #else   // !MONGO_HAS_SIGALTSTACK
+-- 
+2.31.1
+
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
index 54178bf75a..cfa2bc18c2 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
@@ -29,6 +29,7 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4 \
            file://0001-include-needed-c-header.patch \
            file://disable_runtime_check.patch \
            file://ppc64_ARCH_BITS.patch \
+           file://0001-Do-not-use-MINSIGSTKSZ.patch \
            "
 SRC_URI_append_libc-musl ="\
            file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \
-- 
2.31.1


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

* [meta-oe][PATCH 2/3] tbb: Fix build with GCC 11
  2021-05-12  0:07 [meta-oe][PATCH 1/3] mongodb: Do not use MINSIGSTKSZ Khem Raj
@ 2021-05-12  0:07 ` Khem Raj
  2021-05-12  0:07 ` [meta-oe][PATCH 3/3] breakpad: Fix type mismatch for SIGSTKSZ Khem Raj
  1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2021-05-12  0:07 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...f_input-Use-an-arbitrary-but-valid-p.patch | 37 +++++++++++++++++++
 meta-oe/recipes-support/tbb/tbb_2021.2.0.bb   |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta-oe/recipes-support/tbb/tbb/0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch

diff --git a/meta-oe/recipes-support/tbb/tbb/0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch b/meta-oe/recipes-support/tbb/tbb/0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch
new file mode 100644
index 0000000000..caa68e64c5
--- /dev/null
+++ b/meta-oe/recipes-support/tbb/tbb/0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch
@@ -0,0 +1,37 @@
+From a996fd451bbd7be93cff5f466bff7282ae972fe1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 11 May 2021 10:52:51 -0700
+Subject: [PATCH] set_my_tls_end_of_input: Use an arbitrary but valid pointer
+ as value
+
+Pass a valid pointer to pthread_setspecific to avoid GCC 11 warning.
+Fixes
+
+src/tbb/tls.h:44:46: error: 'int pthread_setspecific(pthread_key_t, const void*)' expecting 1 byte in a region of size 0 [-Werror=stringop-overread]
+|    44 |     void set( T value ) { pthread_setspecific(my_key, (void*)value); }
+|       |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
+| compilation terminated due to -Wfatal-errors.
+
+Upstream-Status: Submitted [https://github.com/oneapi-src/oneTBB/pull/394]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/tbb/parallel_pipeline.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/tbb/parallel_pipeline.cpp b/src/tbb/parallel_pipeline.cpp
+index b7655c6b..ca518b5b 100644
+--- a/src/tbb/parallel_pipeline.cpp
++++ b/src/tbb/parallel_pipeline.cpp
+@@ -243,7 +243,8 @@ public:
+         return end_of_input_tls.get() != 0;
+     }
+     void set_my_tls_end_of_input() {
+-        end_of_input_tls.set(1);
++	// Use an arbitrary but valid pointer as value.
++        end_of_input_tls.set(array_size);
+     }
+ };
+ 
+-- 
+2.31.1
+
diff --git a/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb b/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb
index 771ddd49b8..f4c52daf41 100644
--- a/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb
+++ b/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb
@@ -18,6 +18,7 @@ SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH
             file://GLIBC-PREREQ-is-not-defined-on-musl.patch \
             file://0001-CMakeLists.txt-exclude-riscv64-riscv32.patch \
             file://0001-Disable-use-of-_tpause-instruction.patch \
+            file://0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch \
 "
 
 S = "${WORKDIR}/git"
-- 
2.31.1


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

* [meta-oe][PATCH 3/3] breakpad: Fix type mismatch for SIGSTKSZ
  2021-05-12  0:07 [meta-oe][PATCH 1/3] mongodb: Do not use MINSIGSTKSZ Khem Raj
  2021-05-12  0:07 ` [meta-oe][PATCH 2/3] tbb: Fix build with GCC 11 Khem Raj
@ 2021-05-12  0:07 ` Khem Raj
  1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2021-05-12  0:07 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...dler.cc-Match-the-types-for-SIGSTKSZ.patch | 34 +++++++++++++++++++
 .../recipes-devtools/breakpad/breakpad_git.bb |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad/0001-exception_handler.cc-Match-the-types-for-SIGSTKSZ.patch

diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-exception_handler.cc-Match-the-types-for-SIGSTKSZ.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-exception_handler.cc-Match-the-types-for-SIGSTKSZ.patch
new file mode 100644
index 0000000000..afe8a61b29
--- /dev/null
+++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-exception_handler.cc-Match-the-types-for-SIGSTKSZ.patch
@@ -0,0 +1,34 @@
+From 66a2b6e4ba8e2b49115043127ce4aa0fcd71ad1e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 11 May 2021 11:12:35 -0700
+Subject: [PATCH] exception_handler.cc: Match the types for SIGSTKSZ
+
+In glibc 2.34, SIGSTKSZ is a syscall which returns a long int, therefore
+current check fails
+
+| ../git/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);
+|       |                                         ~~~~~~~~^~~~~~~~~~~~~~~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/client/linux/handler/exception_handler.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
+index ca353c40..dc0fc4a9 100644
+--- a/src/client/linux/handler/exception_handler.cc
++++ b/src/client/linux/handler/exception_handler.cc
+@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() {
+   // 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(16384u, (unsigned)SIGSTKSZ);
+ 
+   // Only set an alternative stack if there isn't already one, or if the current
+   // one is too small.
+-- 
+2.31.1
+
diff --git a/meta-oe/recipes-devtools/breakpad/breakpad_git.bb b/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
index 81955f450d..4756ef772d 100644
--- a/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
+++ b/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
@@ -40,6 +40,7 @@ SRC_URI = "git://github.com/google/breakpad;name=breakpad;branch=main \
            file://0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch \
            file://mcontext.patch \
            file://0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.patch \
+           file://0001-exception_handler.cc-Match-the-types-for-SIGSTKSZ.patch \
            file://0001-lss-Match-syscalls-to-match-musl.patch;patchdir=src/third_party/lss \
            file://mips_asm_sgidefs.patch;patchdir=src/third_party/lss \
            file://0001-Do-not-add-stack-pointer-to-clobber-list.patch;patchdir=src/third_party/lss \
-- 
2.31.1


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

end of thread, other threads:[~2021-05-12  0:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12  0:07 [meta-oe][PATCH 1/3] mongodb: Do not use MINSIGSTKSZ Khem Raj
2021-05-12  0:07 ` [meta-oe][PATCH 2/3] tbb: Fix build with GCC 11 Khem Raj
2021-05-12  0:07 ` [meta-oe][PATCH 3/3] breakpad: Fix type mismatch for SIGSTKSZ Khem Raj

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.