[Webkit-unassigned] [Bug 90098] New: [GTK] LLint build fails with -g -02
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 27 13:53:59 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=90098
Summary: [GTK] LLint build fails with -g -02
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: Normal
Priority: P3
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: prahal at yahoo.com
Created an attachment (id=149791)
--> (https://bugs.webkit.org/attachment.cgi?id=149791&action=review)
fix llint build wwith -02 -g
/usr/bin/ruby ./Source/JavaScriptCore/offlineasm/asm.rb ./Source/JavaScriptCore/llint/LowLevelInterpreter.asm Programs/LLIntOffsetsExtractor DerivedSources/JavaScriptCore/LLIntAssembly.h
offsetsAndConfigurationIndex in Source/JavaScriptCore/offlineasm/offsets.rb raise an unhandled exception during build if -02 -g flags are used (ie set CFLAGS to "-O0 -g" and not set webkit debug configure switch which ends up with "-00 -g - 02" => "-g -O2").
the exception is raised at:
raise if result.map{|v| v[1]}.uniq.size < result.map{|v| v[1]}.size
It turns out that the way extractorTable is defined inside the LLIntOffsetsExtractor::dummy which itself is defined as a class member inside the class declaration leads to it behing defined in the assembly twice. That is the class member with -O2 is inlined (which is common for class members at least with g++). The static local variable extractorTable is thus duplicated for each translation unit. And ends up in the usual symbols and the debug_info symbols. Ie twice. Then offsetsAndConfigurationIndex in Source/JavaScriptCore/offlineasm/offsets.rb finds extractorTable magic numbers twice in the binary object and the result.map{|v| v[1]}.uniq.size < result.map{|v| v[1]}.size becomes 1 < 2 and the exception is raised.
Even if done by mistake (I intended to build -O0 -g) -g -02 is quite common for distribution that provide -dbg packages. So this issue might be major instead of normal.
Running:
$ /usr/bin/ruby ./Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb ./Source/JavaScriptCore/llint/LowLevelInterpreter.asm DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h
$ g++ -DHAVE_CONFIG_H -I. -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -DENABLE_GLIB_SUPPORT=1 -DBUILDING_CAIRO__=1 -DBUILDING_GTK__=1 -DBUILDING_SOUP__=1 -DWTF_CHANGES -DBUILDING_WEBKIT2__=1 -DXP_UNIX -DMOZ_X11 -DWTF_USE_ICU_UNICODE=1 -DWTF_USE_GSTREAMER=1 -DWTF_USE_ACCELERATED_COMPOSITING=1 -DENABLE_3D_RENDERING=1 -DWTF_USE_TEXTURE_MAPPER=1 -DWTF_USE_TEXTURE_MAPPER_GL=1 -DWTF_USE_GLX=1 -DWTF_USE_OPENGL=1 -DNDEBUG -I./Source -I./Source/JavaScriptCore -I./Source/JavaScriptCore/API -I./Source/JavaScriptCore/assembler -I./Source/JavaScriptCore/bytecode -I./Source/JavaScriptCore/bytecompiler -I./Source/JavaScriptCore/dfg -I./Source/JavaScriptCore/heap -I./Source/JavaScriptCore/debugger -I./Source/JavaScriptCore/ForwardingHeaders -I./Source/JavaScriptCore/interpreter -I./Source/JavaScriptCore/jit -I
./Source/JavaScriptCore/jit -I./Source/JavaScriptCore/llint -I./Source/JavaScriptCore/parser -I./Source/JavaScriptCore/profiler -I./Source/JavaScriptCore/runtime -I./Source/JavaScriptCore/tools -I./Source/JavaScriptCore/yarr -I./DerivedSources/JavaScriptCore -I./Source/WTF -O0 -g -Wno-c++0x-compat -O2 -MT Source/JavaScriptCore/llint/Programs_LLIntOffsetsExtractor-LLIntOffsetsExtractor.o -MD -MP -MF Source/JavaScriptCore/llint/.deps/Programs_LLIntOffsetsExtractor-LLIntOffsetsExtractor.Tpo -c -o Source/JavaScriptCore/llint/Programs_LLIntOffsetsExtractor-LLIntOffsetsExtractor.o `test -f 'Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp' || echo './'`Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp
$ /usr/bin/ruby ./Source/JavaScriptCore/offlineasm/asm.rb ./Source/JavaScriptCore/llint/LowLevelInterpreter.asm Programs/LLIntOffsetsExtractor DerivedSources/JavaScriptCore/LLIntAssembly.h
from an existing build tree of webkit should give the above error.
The attached patch fixes this.
This is tested against git mirror master 4c742312f5b69a166256a28390aedc4c0bd45ac1, ie :
commit 4c742312f5b69a166256a28390aedc4c0bd45ac1
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jun 21 02:03:44 2012 +0000
Unreviewed, rolling out r120889.
http://trac.webkit.org/changeset/120889
https://bugs.webkit.org/show_bug.cgi?id=89630
[Chromium] webkit_unit_tests didDrawNotCalledOnHiddenLayer
start failing (Requested by ukai on #webkit).
Patch by Sheriff Bot <webkit.review.bot at gmail.com> on 2012-06-20
Source/WebCore:
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
Source/WebKit/chromium:
* tests/CCLayerTreeHostImplTest.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120899 268f45cc-cd09-0410-ab3c-d5
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list