All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: Andrei Gherzan <andrei@gherzan.com>
Cc: openembedded <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] webkitgtk: Reduce stack and heap sizes for jsc on musl
Date: Wed, 17 Mar 2021 13:31:53 -0700	[thread overview]
Message-ID: <CAMKF1sqBu7zx0kJdimy4Do=N_N5BBK5RPWWN1cQkBPV-5Xphkg@mail.gmail.com> (raw)
In-Reply-To: <7f78d5f7-86ec-420a-9f07-753437c41010@www.fastmail.com>

On Wed, Mar 17, 2021 at 9:06 AM Andrei Gherzan <andrei@gherzan.com> wrote:
>
> Hi,
>
> On Wed, 17 Mar 2021, at 00:31, Khem Raj wrote:
> > Fixes
> >
> > [YOCTO #14281]
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > Cc: Andrei Gherzan <andrei@gherzan.com>
> > ---
> >  .../webkitgtk/musl-lower-stack-usage.patch    | 51 +++++++++++++++++++
> >  meta/recipes-sato/webkit/webkitgtk_2.30.5.bb  |  1 +
> >  2 files changed, 52 insertions(+)
> >  create mode 100644
> > meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch
> >
> > diff --git
> > a/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch
> > b/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch
> > new file mode 100644
> > index 0000000000..3d66766d9a
> > --- /dev/null
> > +++ b/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch
> > @@ -0,0 +1,51 @@
> > +reduce thread stack and heap usage for javascriptcore on musl
> > +
> > +default sizes for musl are smaller compared to glibc, this matches
> > +to musl defaults, avoid stack overflow crashes in jscore
>
> Tested and it works as expected. I was fixing it a bit hacky doing something similar to https://github.com/yaegashi/muslstack but this is cleaner.
>
Thanks for testing, I have sent a v2 which should be better. I would
rather not use muslstack utility as it papers over real issues. I
think real fix would
be in webkit to use pthread_attr_setstacksize() instead of hardcoding
the values, but I will let some experts in webkit to take it on.

> I've backported your patch for dunfell too (rebased the patch).
>
> Andrei

      reply	other threads:[~2021-03-17 20:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17  0:31 [PATCH] webkitgtk: Reduce stack and heap sizes for jsc on musl Khem Raj
2021-03-17 11:10 ` [OE-core] " Alexander Kanavin
2021-03-17 20:27   ` Khem Raj
2021-03-17 16:05 ` Andrei Gherzan
2021-03-17 20:31   ` Khem Raj [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMKF1sqBu7zx0kJdimy4Do=N_N5BBK5RPWWN1cQkBPV-5Xphkg@mail.gmail.com' \
    --to=raj.khem@gmail.com \
    --cc=andrei@gherzan.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.