Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH][resend] elfutils: fix stack usage warning
@ 2015-07-13  1:52 rongqing.li
  2015-07-27  0:54 ` Rongqing Li
  0 siblings, 1 reply; 2+ messages in thread
From: rongqing.li @ 2015-07-13  1:52 UTC (permalink / raw)
  To: openembedded-core

From: Roy Li <rongqing.li@windriver.com>

Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
 .../0001-fix-a-stack-usage-warning.patch           | 28 ++++++++++++++++++++++
 meta/recipes-devtools/elfutils/elfutils_0.163.bb   |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch

diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch b/meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch
new file mode 100644
index 0000000..6923bf7
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch
@@ -0,0 +1,28 @@
+[PATCH] fix a stack-usage warning
+
+Upstream-Status: Pending
+
+not use a variable to as a array size, otherwise the warning to error that
+stack usage might be unbounded [-Werror=stack-usage=] will happen
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ backends/ppc_initreg.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c
+index 64f5379..52dde3e 100644
+--- a/backends/ppc_initreg.c
++++ b/backends/ppc_initreg.c
+@@ -93,7 +93,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
+ 	return false;
+     }
+   const size_t gprs = sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr);
+-  Dwarf_Word dwarf_regs[gprs];
++  Dwarf_Word dwarf_regs[sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr)];
+   for (unsigned gpr = 0; gpr < gprs; gpr++)
+     dwarf_regs[gpr] = user_regs.r.gpr[gpr];
+   if (! setfunc (0, gprs, dwarf_regs, arg))
+-- 
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.163.bb b/meta/recipes-devtools/elfutils/elfutils_0.163.bb
index c4fdabd..e391813 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.163.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.163.bb
@@ -17,6 +17,7 @@ SRC_URI += "\
         file://fixheadercheck.patch \
         file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \
         file://0001-remove-the-unneed-checking.patch \
+        file://0001-fix-a-stack-usage-warning.patch \
 "
 
 # pick the patch from debian
-- 
1.9.1



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

* Re: [PATCH][resend] elfutils: fix stack usage warning
  2015-07-13  1:52 [PATCH][resend] elfutils: fix stack usage warning rongqing.li
@ 2015-07-27  0:54 ` Rongqing Li
  0 siblings, 0 replies; 2+ messages in thread
From: Rongqing Li @ 2015-07-27  0:54 UTC (permalink / raw)
  To: openembedded-core

ping

-R

On 2015年07月13日 09:52, rongqing.li@windriver.com wrote:
> From: Roy Li <rongqing.li@windriver.com>
>
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
>   .../0001-fix-a-stack-usage-warning.patch           | 28 ++++++++++++++++++++++
>   meta/recipes-devtools/elfutils/elfutils_0.163.bb   |  1 +
>   2 files changed, 29 insertions(+)
>   create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch
>
> diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch b/meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch
> new file mode 100644
> index 0000000..6923bf7
> --- /dev/null
> +++ b/meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch
> @@ -0,0 +1,28 @@
> +[PATCH] fix a stack-usage warning
> +
> +Upstream-Status: Pending
> +
> +not use a variable to as a array size, otherwise the warning to error that
> +stack usage might be unbounded [-Werror=stack-usage=] will happen
> +
> +Signed-off-by: Roy Li <rongqing.li@windriver.com>
> +---
> + backends/ppc_initreg.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c
> +index 64f5379..52dde3e 100644
> +--- a/backends/ppc_initreg.c
> ++++ b/backends/ppc_initreg.c
> +@@ -93,7 +93,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
> + 	return false;
> +     }
> +   const size_t gprs = sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr);
> +-  Dwarf_Word dwarf_regs[gprs];
> ++  Dwarf_Word dwarf_regs[sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr)];
> +   for (unsigned gpr = 0; gpr < gprs; gpr++)
> +     dwarf_regs[gpr] = user_regs.r.gpr[gpr];
> +   if (! setfunc (0, gprs, dwarf_regs, arg))
> +--
> +1.9.1
> +
> diff --git a/meta/recipes-devtools/elfutils/elfutils_0.163.bb b/meta/recipes-devtools/elfutils/elfutils_0.163.bb
> index c4fdabd..e391813 100644
> --- a/meta/recipes-devtools/elfutils/elfutils_0.163.bb
> +++ b/meta/recipes-devtools/elfutils/elfutils_0.163.bb
> @@ -17,6 +17,7 @@ SRC_URI += "\
>           file://fixheadercheck.patch \
>           file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \
>           file://0001-remove-the-unneed-checking.patch \
> +        file://0001-fix-a-stack-usage-warning.patch \
>   "
>
>   # pick the patch from debian
>

-- 
Best Reagrds,
Roy | RongQing Li


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

end of thread, other threads:[~2015-07-27  0:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-13  1:52 [PATCH][resend] elfutils: fix stack usage warning rongqing.li
2015-07-27  0:54 ` Rongqing Li

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