[OE-core] [daisy][PATCH 1/1] systemd: do not use alloca() function in case of uclibc

Richard Purdie richard.purdie at linuxfoundation.org
Tue Jun 3 09:06:51 UTC 2014


On Tue, 2014-06-03 at 15:42 +0800, Chen Qi wrote:
> The alloca() function allocates space in the stack frame of the caller,
> so using alloca(new_size - old_size) would possibly crash the stack,
> causing a segment fault error.
> 
> This patch fixes the above problem by avoiding using this function in
> journal-file.c.
> 
> [YOCTO #6201]
> 
> Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
> ---
>  .../0001-journal-file.c-do-not-use-alloca.patch    |   54 ++++++++++++++++++++
>  meta/recipes-core/systemd/systemd_211.bb           |    1 +
>  2 files changed, 55 insertions(+)
>  create mode 100644 meta/recipes-core/systemd/systemd/0001-journal-file.c-do-not-use-alloca.patch
> 
> diff --git a/meta/recipes-core/systemd/systemd/0001-journal-file.c-do-not-use-alloca.patch b/meta/recipes-core/systemd/systemd/0001-journal-file.c-do-not-use-alloca.patch
> new file mode 100644
> index 0000000..a638d58
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0001-journal-file.c-do-not-use-alloca.patch
> @@ -0,0 +1,54 @@
> +Upstream-Status: Inappropriate [oe specific]

>From the description, this sounds like an allocation error which can
happen *anywhere* and is a problem that should be addressed upstream.

This Upstream-Status field is therefore completely bogus. Its not
inappropriate or oe specific. If you still believe it is, I'd like to
hear more explanation.

The abuses of this field are starting to really annoy me since this
keeps happening.

Cheers,

Richard






More information about the Openembedded-core mailing list