Openembedded Core Discussions
 help / color / mirror / Atom feed
* [rocko][PATCH] gcc6: Patch to fix broken gcc-sanitizers build
@ 2018-03-13 17:09 Juro Bystricky
  2018-03-13 17:12 ` Khem Raj
  2018-03-13 17:34 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Juro Bystricky @ 2018-03-13 17:09 UTC (permalink / raw)
  To: openembedded-core; +Cc: jurobystricky

Backport a patch to fix errors such as:
error: aggregate 'sigaltstack handler_stack' has incomplete type and cannot be defined

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
---
 meta/recipes-devtools/gcc/gcc-6.4.inc              |  1 +
 .../gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch | 90 ++++++++++++++++++++++
 2 files changed, 91 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch

diff --git a/meta/recipes-devtools/gcc/gcc-6.4.inc b/meta/recipes-devtools/gcc/gcc-6.4.inc
index a2430a9..42eabef 100644
--- a/meta/recipes-devtools/gcc/gcc-6.4.inc
+++ b/meta/recipes-devtools/gcc/gcc-6.4.inc
@@ -93,6 +93,7 @@ BACKPORTS = "\
            file://0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch \
            file://0011-i386-Update-mfunction-return-for-return-with-pop.patch \
            file://0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch \
+           file://0013-gcc-sanitizers.patch \
 "
 
 SRC_URI[md5sum] = "11ba51a0cfb8471927f387c8895fe232"
diff --git a/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch b/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
new file mode 100644
index 0000000..47bcd8e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
@@ -0,0 +1,90 @@
+From 0fa7102d76376b27ae4bbc10848600aac6ed71d2 Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 17 Jul 2017 19:41:08 +0000
+Subject: [PATCH] 	Backported from mainline 	2017-07-14  Jakub
+ Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/81066
+	* sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
+	* sanitizer_common/sanitizer_linux.cc: Likewise.
+	* sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
+	* tsan/tsan_platform_linux.cc: Likewise.
+
+[Romain cherry-pick on gcc-6-branch from gcc-7-branch]
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@250287 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+---
+ libsanitizer/sanitizer_common/sanitizer_linux.cc                      | 3 +--
+ libsanitizer/sanitizer_common/sanitizer_linux.h                       | 4 +---
+ libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +-
+ libsanitizer/tsan/tsan_platform_linux.cc                              | 2 +-
+ 4 files changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
+index 2cefa20..223d9c6 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
+@@ -546,8 +546,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
+ }
+ #endif
+ 
+-uptr internal_sigaltstack(const struct sigaltstack *ss,
+-                         struct sigaltstack *oss) {
++uptr internal_sigaltstack(const void *ss, void *oss) {
+   return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
+ }
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
+index 4497702..1594058 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
++++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
+@@ -19,7 +19,6 @@
+ #include "sanitizer_platform_limits_posix.h"
+ 
+ struct link_map;  // Opaque type returned by dlopen().
+-struct sigaltstack;
+ 
+ namespace __sanitizer {
+ // Dirent structure for getdents(). Note that this structure is different from
+@@ -28,8 +27,7 @@ struct linux_dirent;
+ 
+ // Syscall wrappers.
+ uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
+-uptr internal_sigaltstack(const struct sigaltstack* ss,
+-                          struct sigaltstack* oss);
++uptr internal_sigaltstack(const void* ss, void* oss);
+ uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
+     __sanitizer_sigset_t *oldset);
+ void internal_sigfillset(__sanitizer_sigset_t *set);
+diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+index c919e4f..014162af 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+@@ -267,7 +267,7 @@ static int TracerThread(void* argument) {
+ 
+   // Alternate stack for signal handling.
+   InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
+-  struct sigaltstack handler_stack;
++  stack_t handler_stack;
+   internal_memset(&handler_stack, 0, sizeof(handler_stack));
+   handler_stack.ss_sp = handler_stack_memory.data();
+   handler_stack.ss_size = kHandlerStackSize;
+diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
+index 09cec5f..908f4fe 100644
+--- a/libsanitizer/tsan/tsan_platform_linux.cc
++++ b/libsanitizer/tsan/tsan_platform_linux.cc
+@@ -291,7 +291,7 @@ bool IsGlobalVar(uptr addr) {
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+ #if SANITIZER_LINUX
+   int cnt = 0;
+-  __res_state *statp = (__res_state*)state;
++  struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
+       fds[cnt++] = statp->_u._ext.nssocks[i];
+-- 
+2.9.4
-- 
2.7.4



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

* Re: [rocko][PATCH] gcc6: Patch to fix broken gcc-sanitizers build
  2018-03-13 17:09 [rocko][PATCH] gcc6: Patch to fix broken gcc-sanitizers build Juro Bystricky
@ 2018-03-13 17:12 ` Khem Raj
  2018-03-13 17:34 ` ✗ patchtest: failure for " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2018-03-13 17:12 UTC (permalink / raw)
  To: Juro Bystricky
  Cc: Juro Bystricky, Patches and discussions about the oe-core layer

On Tue, Mar 13, 2018 at 10:09 AM, Juro Bystricky
<juro.bystricky@intel.com> wrote:
> Backport a patch to fix errors such as:
> error: aggregate 'sigaltstack handler_stack' has incomplete type and cannot be defined
>

this is ok

> Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
> ---
>  meta/recipes-devtools/gcc/gcc-6.4.inc              |  1 +
>  .../gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch | 90 ++++++++++++++++++++++
>  2 files changed, 91 insertions(+)
>  create mode 100644 meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
>
> diff --git a/meta/recipes-devtools/gcc/gcc-6.4.inc b/meta/recipes-devtools/gcc/gcc-6.4.inc
> index a2430a9..42eabef 100644
> --- a/meta/recipes-devtools/gcc/gcc-6.4.inc
> +++ b/meta/recipes-devtools/gcc/gcc-6.4.inc
> @@ -93,6 +93,7 @@ BACKPORTS = "\
>             file://0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch \
>             file://0011-i386-Update-mfunction-return-for-return-with-pop.patch \
>             file://0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch \
> +           file://0013-gcc-sanitizers.patch \
>  "
>
>  SRC_URI[md5sum] = "11ba51a0cfb8471927f387c8895fe232"
> diff --git a/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch b/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
> new file mode 100644
> index 0000000..47bcd8e
> --- /dev/null
> +++ b/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
> @@ -0,0 +1,90 @@
> +From 0fa7102d76376b27ae4bbc10848600aac6ed71d2 Mon Sep 17 00:00:00 2001
> +From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
> +Date: Mon, 17 Jul 2017 19:41:08 +0000
> +Subject: [PATCH]       Backported from mainline        2017-07-14  Jakub
> + Jelinek  <jakub@redhat.com>
> +
> +       PR sanitizer/81066
> +       * sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
> +       * sanitizer_common/sanitizer_linux.cc: Likewise.
> +       * sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
> +       * tsan/tsan_platform_linux.cc: Likewise.
> +
> +[Romain cherry-pick on gcc-6-branch from gcc-7-branch]
> +Signed-off-by: Romain Naour <romain.naour@gmail.com>
> +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@250287 138bc75d-0d04-0410-961f-82ee72b054a4
> +
> +Upstream-Status: Backport
> +
> +Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
> +---
> + libsanitizer/sanitizer_common/sanitizer_linux.cc                      | 3 +--
> + libsanitizer/sanitizer_common/sanitizer_linux.h                       | 4 +---
> + libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +-
> + libsanitizer/tsan/tsan_platform_linux.cc                              | 2 +-
> + 4 files changed, 4 insertions(+), 7 deletions(-)
> +
> +diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
> +index 2cefa20..223d9c6 100644
> +--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
> ++++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
> +@@ -546,8 +546,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
> + }
> + #endif
> +
> +-uptr internal_sigaltstack(const struct sigaltstack *ss,
> +-                         struct sigaltstack *oss) {
> ++uptr internal_sigaltstack(const void *ss, void *oss) {
> +   return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
> + }
> +
> +diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
> +index 4497702..1594058 100644
> +--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
> ++++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
> +@@ -19,7 +19,6 @@
> + #include "sanitizer_platform_limits_posix.h"
> +
> + struct link_map;  // Opaque type returned by dlopen().
> +-struct sigaltstack;
> +
> + namespace __sanitizer {
> + // Dirent structure for getdents(). Note that this structure is different from
> +@@ -28,8 +27,7 @@ struct linux_dirent;
> +
> + // Syscall wrappers.
> + uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
> +-uptr internal_sigaltstack(const struct sigaltstack* ss,
> +-                          struct sigaltstack* oss);
> ++uptr internal_sigaltstack(const void* ss, void* oss);
> + uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
> +     __sanitizer_sigset_t *oldset);
> + void internal_sigfillset(__sanitizer_sigset_t *set);
> +diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
> +index c919e4f..014162af 100644
> +--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
> ++++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
> +@@ -267,7 +267,7 @@ static int TracerThread(void* argument) {
> +
> +   // Alternate stack for signal handling.
> +   InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
> +-  struct sigaltstack handler_stack;
> ++  stack_t handler_stack;
> +   internal_memset(&handler_stack, 0, sizeof(handler_stack));
> +   handler_stack.ss_sp = handler_stack_memory.data();
> +   handler_stack.ss_size = kHandlerStackSize;
> +diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
> +index 09cec5f..908f4fe 100644
> +--- a/libsanitizer/tsan/tsan_platform_linux.cc
> ++++ b/libsanitizer/tsan/tsan_platform_linux.cc
> +@@ -291,7 +291,7 @@ bool IsGlobalVar(uptr addr) {
> + int ExtractResolvFDs(void *state, int *fds, int nfd) {
> + #if SANITIZER_LINUX
> +   int cnt = 0;
> +-  __res_state *statp = (__res_state*)state;
> ++  struct __res_state *statp = (struct __res_state*)state;
> +   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
> +     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
> +       fds[cnt++] = statp->_u._ext.nssocks[i];
> +--
> +2.9.4
> --
> 2.7.4
>


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

* ✗ patchtest: failure for gcc6: Patch to fix broken gcc-sanitizers build
  2018-03-13 17:09 [rocko][PATCH] gcc6: Patch to fix broken gcc-sanitizers build Juro Bystricky
  2018-03-13 17:12 ` Khem Raj
@ 2018-03-13 17:34 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2018-03-13 17:34 UTC (permalink / raw)
  To: Juro Bystricky; +Cc: openembedded-core

== Series Details ==

Series: gcc6: Patch to fix broken gcc-sanitizers build
Revision: 1
URL   : https://patchwork.openembedded.org/series/11374/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  rocko (currently at cb7cf1d123)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

end of thread, other threads:[~2018-03-13 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-13 17:09 [rocko][PATCH] gcc6: Patch to fix broken gcc-sanitizers build Juro Bystricky
2018-03-13 17:12 ` Khem Raj
2018-03-13 17:34 ` ✗ patchtest: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox