Bug 49877 - [GTK] DumpRenderTree has two copies of JavaScriptCore
Summary: [GTK] DumpRenderTree has two copies of JavaScriptCore
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords: Gtk
: 36088 (view as bug list)
Depends on:
Blocks: 48429
  Show dependency treegraph
 
Reported: 2010-11-20 21:28 PST by Martin Robinson
Modified: 2011-08-07 02:38 PDT (History)
5 users (show)

See Also:


Attachments
Make JSC symbols visible. Remove second JSC from DRT. (4.96 KB, patch)
2010-11-20 21:39 PST, Martin Robinson
xan.lopez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2010-11-20 21:28:15 PST
One copy of JavaScriptCore is included in libwebkit.so. The other copy is compiled directly into DumpRenderTree. The original reason for this appears to be that when compiling libwebkit.so we hide JavaScriptCore symbols that DumpRenderTree needs.
Comment 1 Martin Robinson 2010-11-20 21:39:27 PST
Created attachment 74495 [details]
Make JSC symbols visible. Remove second JSC from DRT.
Comment 2 WebKit Review Bot 2010-11-20 21:44:15 PST
Attachment 74495 [details] did not build on gtk:
Build output: http://queues.webkit.org/results/6236087
Comment 3 Xan Lopez 2010-11-20 21:50:51 PST
Comment on attachment 74495 [details]
Make JSC symbols visible. Remove second JSC from DRT.

Great catch. Don't commit it yet until we can make a clean build in gustavo's bot I guess...
Comment 4 Antonio Gomes 2010-11-20 22:25:34 PST
Oh ... I am wondering why I could just crash on release builds, while it works fine on debug.
Comment 5 Martin Robinson 2010-11-20 22:40:29 PST
(In reply to comment #4)
> Oh ... I am wondering why I could just crash on release builds, while it works fine on debug.

Debug builds use the system allocator, so CString was just using malloc/free instead of fastMalloc/fastFree. 

After some fiddling, I was able to get Debug building using TCMalloc, but I ran into a bunch of other crashes. I wouldn't be surprised if they were related to this as well.
Comment 6 Antonio Gomes 2010-11-21 09:12:02 PST
this is what I got when I built patch in bug 	48429  and the one here:

WebKitTools/DumpRenderTree/Programs_DumpRenderTree-LayoutTestController.o: In function `WTF::FastAllocBase::operator new(unsigned int)':
LayoutTestController.cpp:(.text._ZN3WTF13FastAllocBasenwEj[WTF::FastAllocBase::operator new(unsigned int)]+0xd): undefined reference to `WTF::fastMalloc(unsigned int)'
WebKitTools/DumpRenderTree/cairo/Programs_DumpRenderTree-PixelDumpSupportCairo.o: In function `computeMD5HashStringForBitmapContext(BitmapContext*, char*)':
/home/agomes/Devel/webkit/webkit/WebKitBuild/Gtk/Debug/../../../WebKitTools/DumpRenderTree/cairo/PixelDumpSupportCairo.cpp:78: undefined reference to `WTF::MD5::addBytes(unsigned char const*, unsigned int)'
/home/agomes/Devel/webkit/webkit/WebKitBuild/Gtk/Debug/../../../WebKitTools/DumpRenderTree/cairo/PixelDumpSupportCairo.cpp:82: undefined reference to `WTF::MD5::checksum(WTF::Vector<unsigned char, 16u>&)'
WebKitTools/DumpRenderTree/cairo/Programs_DumpRenderTree-PixelDumpSupportCairo.o: In function `WTF::VectorBufferBase<unsigned char>::allocateBuffer(unsigned int)':
/home/agomes/Devel/webkit/webkit/WebKitBuild/Gtk/Debug/../../../JavaScriptCore/wtf/Vector.h:287: undefined reference to `WTF::fastMalloc(unsigned int)'
WebKitTools/DumpRenderTree/gtk/Programs_DumpRenderTree-AccessibilityUIElementGtk.o: In function `WTF::VectorBufferBase<AccessibilityUIElement>::allocateBuffer(unsigned int)':
AccessibilityUIElementGtk.cpp:(.text._ZN3WTF16VectorBufferBaseI22AccessibilityUIElementE14allocateBufferEj[WTF::VectorBufferBase<AccessibilityUIElement>::allocateBuffer(unsigned int)]+0x3d): undefined reference to `WTF::fastMalloc(unsigned int)'
collect2: ld returned 1 exit status
make[1]: *** [Programs/DumpRenderTree] Error 1
make[1]: Leaving directory `/home/agomes/Devel/webkit/webkit/WebKitBuild/Gtk/Debug'
make: *** [all] Error 2
rm DerivedSources/WebCore/JSSVGExternalResourcesRequired.cpp DerivedSources/WebCore/JSSVGFilterPrimitiveStandardAttributes.cpp DerivedSources/WebCore/JSSVGTests.cpp DerivedSources/WebCore/JSSVGViewSpec.cpp DerivedSources/WebCore/JSSVGTransformable.cpp DerivedSources/WebCore/JSSVGZoomAndPan.cpp DerivedSources/WebCore/JSSVGFitToViewBox.cpp DerivedSources/WebCore/JSSVGURIReference.cpp DerivedSources/WebCore/JSSVGLocatable.cpp DerivedSources/WebCore/JSSVGStylable.cpp DerivedSources/WebCore/JSElementTimeControl.cpp DerivedSources/WebCore/JSSVGLangSpace.cpp
Comment 7 Martin Robinson 2010-11-21 09:14:03 PST
(In reply to comment #6)
> this is what I got when I built patch in bug     48429  and the one here:
> 
> WebKitTools/DumpRenderTree/Programs_DumpRenderTree-LayoutTestController.o: In function `WTF::FastAllocBase::operator new(unsigned int)':
> LayoutTestController.cpp:

This patch will require a full rebuild:

rm -rf WebKitBuild/Release
build-webkit --gtk

If you did a full rebuild and it still breaks, something is definitely wrong. :/
Comment 8 Antonio Gomes 2010-11-21 10:02:34 PST
(In reply to comment #7)
> (In reply to comment #6)
> > this is what I got when I built patch in bug     48429  and the one here:
> > 
> > WebKitTools/DumpRenderTree/Programs_DumpRenderTree-LayoutTestController.o: In function `WTF::FastAllocBase::operator new(unsigned int)':
> > LayoutTestController.cpp:
> 
> This patch will require a full rebuild:
> 
> rm -rf WebKitBuild/Release
> build-webkit --gtk
> 
> If you did a full rebuild and it still breaks, something is definitely wrong. :/

It was a full build, martin.
Comment 9 Martin Robinson 2010-11-21 11:54:16 PST
(In reply to comment #8)

> It was a full build, martin.

I just tried both full debug and release builds here and they seemed to work. :/ Do you mind pasting the output of this command on your system?

$ nm -o WebKitBuild/Debug/.libs/libwebkitgtk-1.0.so.0.3.1 | grep fastMalloc
Comment 10 Antonio Gomes 2010-11-21 20:43:58 PST
<lisppaste> tonikitoo pasted "build error for mrobinson" at http://paste.lisp.org/display/116904
<tonikitoo> after a clean release build with the patch
<tonikitoo> r72495

after pasting I realized you were not there :)
Comment 11 Antonio Gomes 2010-11-21 20:44:37 PST
:/ Do you mind pasting the output of this command on your system?
> 
> $ nm -o WebKitBuild/Debug/.libs/libwebkitgtk-1.0.so.0.3.1 | grep fastMalloc

$  nm -o WebKitBuild/Gtk/Debug/.libs/libwebkitgtk-1.0.so.0.3.1 | grep fastMalloc
WebKitBuild/Gtk/Debug/.libs/libwebkitgtk-1.0.so.0.3.1:011c4636 t _ZN3WTF10fastMallocEj
WebKitBuild/Gtk/Debug/.libs/libwebkitgtk-1.0.so.0.3.1:011c4978 T _ZN3WTF14fastMallocSizeEPKv
WebKitBuild/Gtk/Debug/.libs/libwebkitgtk-1.0.so.0.3.1:011c445a t _ZN3WTF15fastMallocAllowEv
WebKitBuild/Gtk/Debug/.libs/libwebkitgtk-1.0.so.0.3.1:011c4443 t _ZN3WTF16fastMallocForbidEv
WebKitBuild/Gtk/Debug/.libs/libwebkitgtk-1.0.so.0.3.1:011c4957 T _ZN3WTF20fastMallocStatisticsEv
WebKitBuild/Gtk/Debug/.libs/libwebkitgtk-1.0.so.0.3.1:003447be t _ZN3WTF27fastMallocMatchValidateFreeEPvNS_8Internal9AllocTypeE
WebKitBuild/Gtk/Debug/.libs/libwebkitgtk-1.0.so.0.3.1:003447b9 t _ZN3WTF29fastMallocMatchValidateMallocEPvNS_8Internal9AllocTypeE
WebKitBuild/Gtk/Debug/.libs/libwebkitgtk-1.0.so.0.3.1:0216b4fd r _ZZN3WTF10fastMallocEjE19__PRETTY_FUNCTION__
Comment 12 Martin Robinson 2010-11-21 20:51:29 PST
(In reply to comment #11)
> :/ Do you mind pasting the output of this command on your system?
> > 
> > $ nm -o WebKitBuild/Debug/.libs/libwebkitgtk-1.0.so.0.3.1 | grep fastMalloc
> 
> $  nm -o WebKitBuild/Gtk/Debug/.libs/libwebkitgtk-1.0.so.0.3.1 | grep fastMalloc
> WebKitBuild/Gtk/Debug/.libs/libwebkitgtk-1.0.so.0.3.1:011c4636 t _ZN3WTF10fastMallocEj

I wonder if the issue is that the mangling is different for me:

martin@chazmcpoodle:~/WebKit-old$  nm -o WebKitBuild/Debug/.libs/libwebkitgtk-1.0.so.0.3.1 | grep fastMalloc
WebKitBuild/Debug/.libs/libwebkitgtk-1.0.so.0.3.1:00000000018fe90e T _ZN3WTF10fastMallocEm
...

Might be worth a shot to try adding the mangled names for the missing symbols to webkit/symbols.filter on your side. Can't imagine what else is wrong.
Comment 13 Antonio Gomes 2010-11-22 14:29:00 PST
(In reply to comment #10)
> <lisppaste> tonikitoo pasted "build error for mrobinson" at http://paste.lisp.org/display/116904
> <tonikitoo> after a clean release build with the patch
> <tonikitoo> r72495
> 
> after pasting I realized you were not there :)

Ignore this build error. I am getting them on trunk, clean build, with any patch on top... =/
Comment 14 Antonio Gomes 2010-11-26 13:33:02 PST
Guys, progresses here?
Comment 15 Martin Robinson 2010-11-27 11:16:01 PST
(In reply to comment #14)
> Guys, progresses here?

We're still waiting to hear from Gustavo about arranging a clean build on the release bots.
Comment 16 Martin Robinson 2010-12-02 10:14:56 PST
Committed r73150: <http://trac.webkit.org/changeset/73150>
Comment 17 Martin Robinson 2011-08-07 02:38:40 PDT
*** Bug 36088 has been marked as a duplicate of this bug. ***