[OE-core] [PATCH] elfutils: fix stack usage warning

Burton, Ross ross.burton at intel.com
Fri Jul 10 22:22:11 UTC 2015


Can you rebase this for the current master please, which has 0.163.

Ross

On 6 July 2015 at 05:58, <rongqing.li at windriver.com> wrote:

> From: Roy Li <rongqing.li at windriver.com>
>
> Signed-off-by: Roy Li <rongqing.li at windriver.com>
> ---
>  .../0001-fix-a-stack-usage-warning.patch           | 28
> ++++++++++++++++++++++
>  meta/recipes-devtools/elfutils/elfutils_0.162.bb   |  1 +
>  2 files changed, 29 insertions(+)
>  create mode 100644
> meta/recipes-devtools/elfutils/elfutils-0.162/0001-fix-a-stack-usage-warning.patch
>
> diff --git
> a/meta/recipes-devtools/elfutils/elfutils-0.162/0001-fix-a-stack-usage-warning.patch
> b/meta/recipes-devtools/elfutils/elfutils-0.162/0001-fix-a-stack-usage-warning.patch
> new file mode 100644
> index 0000000..6923bf7
> --- /dev/null
> +++
> b/meta/recipes-devtools/elfutils/elfutils-0.162/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 at 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.162.bb
> b/meta/recipes-devtools/elfutils/elfutils_0.162.bb
> index f6ace7e..7ebfc4f 100644
> --- a/meta/recipes-devtools/elfutils/elfutils_0.162.bb
> +++ b/meta/recipes-devtools/elfutils/elfutils_0.162.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
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150710/1054eebc/attachment-0002.html>


More information about the Openembedded-core mailing list