Subject: [alpine-devel] webkitfltk segfaults in do_relocs

From: Isaac Dunham <[email-masked]>
Date: Wed, 19 Nov 2014 08:44:15 -0800

Hello,
I've been trying to get WebkitFLTK[1] working on Alpine, and I have it
building.
But as usual, that's the easy part. The test program, 
Source/WebKit/fltk/testapp/testapp, segfaults in do_relocs.
I'm attaching the output of bt full.

Build dependencies include:
g++ >= 4.7.3
python2 perl ruby 
icu-dev cairo-dev harfbuzz-dev libxslt-dev sqlite-dev fltk-dev

harfbuzz must be built with ICU, as alpine does; fltk must be 1.3.3
or later; Alpine provides python2 as python.

Build directions are in README.asciidoc, and amount to:
make -C Source/WTF/wtf && \
make -C Source/JavaScriptCore gen && \
make -C Source/JavaScriptCore && \
make -C Source/WebCore && \
make -C Source/WebKit/fltk

Additionally, at least a gig of RAM per thread will be needed,
and a very fast processor or lots of time.
On my laptop with an Atom N270 and a gigabyte of ram, I get 
occasional swap thrashing, and the compilation takes a little over
11 hours.

So if someone who has a faster system can look at this, I'd be
grateful.

Thank you,
Isaac Dunham

[1] https://github.com/clbr/webkitfltk

---

From: Rich Felker <[email-masked]>
Date: Wed, 19 Nov 2014 11:50:50 -0500

> I'm attaching the output of bt full.

Could you also provide a disassembly and register dump at the point of
crash?

Rich

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Isaac Dunham <[email-masked]>
Date: Wed, 19 Nov 2014 11:04:47 -0800

> Could you also provide a disassembly and register dump at the point of
Attaching output of gdb disassemble and info all-registers.

It's segfaulting "at line 365 of src/ldso/dynlink.c", for what that's worth.

I'm providing the link command as well in case the problem is there.

Thanks,
Isaac Dunham

---

From: Isaac Dunham <[email-masked]>
Date: Fri, 21 Nov 2014 21:24:31 -0800

Hello,
Thanks for all the advice. Now it gets a lot further:
I built webkitfltk with -fno-pie, and the test program loaded, showed 
a window, and crashed somewhere in JavaScriptCore.

I tried running Source/JavaScriptCore/jsc, and it shows a problem that
was previously reported:

$ Source/JavaScriptCore/jsc
Error compiling builtin: 
ASSERTION FAILED: result
parser/Parser.h(970) : WTF::PassRefPtr<T> JSC::parse(JSC::VM*, const JSC::SourceCode&, JSC::FunctionParameters*, const JSC::Identifier&, JSC::JSParserStrictness, JSC::JSParserMode, JSC::ParserError&, JSC::JSTextPosition*) [with ParsedNode = JSC::ProgramNode]
Segmentation fault (core dumped)

Upstream has set thread stack size to 1 megabyte regardless of libc, 
figuring that 8 megabytes is too much.
I'm building with -DUSE_SYSTEM_MALLOC=1.
Looking through the old thread on Webkit javascript crashing, I found an 
excerpt of a diff, but could not figure out where it's supposed to apply
(grep -r didn't find anything pertinent that I could see).

Thanks,
Isaac Dunham

---