<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>60951</bug_id>
          
          <creation_ts>2011-05-17 04:30:31 -0700</creation_ts>
          <short_desc>[Qt] bad codegen, pointer diff in JSC::JSCallbackConstructor::JSCallbackConstructor</short_desc>
          <delta_ts>2011-11-01 03:17:24 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.6</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Benjamin Reed">webkit</reporter>
          <assigned_to name="Zeno Albisser">zeno</assigned_to>
          <cc>webkit.review.bot</cc>
    
    <cc>zeno</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>405004</commentid>
    <comment_count>0</comment_count>
      <attachid>93754</attachid>
    <who name="Benjamin Reed">webkit</who>
    <bug_when>2011-05-17 04:30:31 -0700</bug_when>
    <thetext>Created attachment 93754
patch against the qtwebkit 2.0 branch

(I left the version at &quot;Nightly build&quot; since I wasn&apos;t sure what versions correspond to the 2.0/2.1/2.2 branches...)

On Mac OS X, when building QtWebkit as a standalone project, compilation fails with an error like os:

---(snip!)---
g++-4.2 -O -c -pipe -I/32sw/lib/system-openssl/include -Wall -Wextra -Wreturn-type -fno-strict-aliasing -Wcast-align -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self -O2 -D__USE_WS_X11__ -DBUILDING_QT__=1 -DWTF_USE_ACCELERATED_COMPOSITING -DNDEBUG -DBUILDING_QT__ -DBUILDING_JavaScriptCore -DBUILDING_WTF -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/32sw/lib/qt4-x11/mkspecs/darwin-g++ -I../../../JavaScriptCore -I/32sw/lib/qt4-x11/include/QtCore -I/32sw/lib/qt4-x11/include -I../../../JavaScriptCore -I../../../../qtwebkit-build -I../../../JavaScriptCore/assembler -I../../../JavaScriptCore/bytecode -I../../../JavaScriptCore/bytecompiler -I../../../JavaScriptCore/debugger -I../../../JavaScriptCore/interpreter -I../../../JavaScriptCore/jit -I../../../JavaScriptCore/parser -I../../../JavaScriptCore/pcre -I../../../JavaScriptCore/profiler -I../../../JavaScriptCore/runtime -I../../../JavaScriptCore/wtf -I/private/tmp/qtwebkit-build/JavaScriptCore/wtf/symbian -I../../../JavaScriptCore/wtf/unicode -I../../../JavaScriptCore/yarr -I../../../JavaScriptCore/API -I../../../JavaScriptCore/ForwardingHeaders -Igenerated -I../include/QtWebKit -I. -I../../../JavaScriptCore -I. -o obj/release/jsc.o ../../../JavaScriptCore/jsc.cpp
g++-4.2 -headerpad_max_install_names -L/32sw/lib/system-openssl/lib -prebind -o ./jsc obj/release/jsc.o    -L./release -L/32sw/lib/qt4-x11/lib -ljscore -lQtCore -L/32sw/lib/system-openssl/lib -L/32sw/lib/freetype219/lib -L/32sw/lib/fontconfig2/lib -L/32sw/lib -L/usr/X11R6/lib -L/32sw/lib/qt4-x11/lib -liconv -Wl,-framework,Carbon -Wl,-framework,AppKit -Wl,-framework,ApplicationServices -Wl,-framework,SystemConfiguration -lcrypto -lpng -lresolv -lssl -lz 
ld: bad codegen, pointer diff in JSC::JSCallbackConstructor::JSCallbackConstructor(JSC::JSGlobalObject*, WTF::NonNullPassRefPtr&lt;JSC::Structure&gt;, OpaqueJSClass*, OpaqueJSValue* (*)(OpaqueJSContext const*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**))to global weak symbol vtable for JSC::JSCellfor architecture i386
collect2: ld returned 1 exit status
---(snip!)---

This is the error you get in the webkit project in the 2.1 or 2.2 branches, in 2.0 it fails linking the QtWebKit framework itself.  The problem is a mixing-and-matching the use of &quot;hide_symbols.&quot;

The fix is the attached changes to qtwebkit 2.0 and 2.1, which add a check for &quot;reduce_exports&quot; in QT_CONFIG to the relevant .pro files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>405005</commentid>
    <comment_count>1</comment_count>
      <attachid>93755</attachid>
    <who name="Benjamin Reed">webkit</who>
    <bug_when>2011-05-17 04:31:02 -0700</bug_when>
    <thetext>Created attachment 93755
patch against the 2.1 and 2.2/HEAD branches</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493799</commentid>
    <comment_count>2</comment_count>
      <attachid>113143</attachid>
    <who name="Zeno Albisser">zeno</who>
    <bug_when>2011-11-01 02:00:14 -0700</bug_when>
    <thetext>Created attachment 113143
patch for review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493800</commentid>
    <comment_count>3</comment_count>
      <attachid>113143</attachid>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2011-11-01 02:08:46 -0700</bug_when>
    <thetext>Comment on attachment 113143
patch for review.

r=me

Looks like it got lost in the build system refactorings. This should also be done in WebKit2.pro, but I understand that this single patch is easier to backport first :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493826</commentid>
    <comment_count>4</comment_count>
    <who name="Zeno Albisser">zeno</who>
    <bug_when>2011-11-01 03:10:05 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 113143 [details])
&gt; r=me
&gt; 
&gt; Looks like it got lost in the build system refactorings. This should also be done in WebKit2.pro, but I understand that this single patch is easier to backport first :)

i created a separate bugreport for that, and will fix it asap: https://bugs.webkit.org/show_bug.cgi?id=71276</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493829</commentid>
    <comment_count>5</comment_count>
      <attachid>113143</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-11-01 03:17:20 -0700</bug_when>
    <thetext>Comment on attachment 113143
patch for review.

Clearing flags on attachment: 113143

Committed r98947: &lt;http://trac.webkit.org/changeset/98947&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493830</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-11-01 03:17:24 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>93754</attachid>
            <date>2011-05-17 04:30:31 -0700</date>
            <delta_ts>2011-11-01 02:00:14 -0700</delta_ts>
            <desc>patch against the qtwebkit 2.0 branch</desc>
            <filename>qtwebkit-2.0.patch</filename>
            <type>application/octet-stream</type>
            <size>411</size>
            <attacher name="Benjamin Reed">webkit</attacher>
            
              <data encoding="base64">ZGlmZiAtTnVyZCB3ZWJraXQvV2ViQ29yZS9XZWJDb3JlLnBybyB3ZWJraXQvV2ViQ29yZS9XZWJD
b3JlLnBybwotLS0gd2Via2l0L1dlYkNvcmUvV2ViQ29yZS5wcm8JMjAxMS0wNS0wOCAyMzoyNTow
NC4wMDAwMDAwMDAgLTA0MDAKKysrIHdlYmtpdC9XZWJDb3JlL1dlYkNvcmUucHJvCTIwMTEtMDUt
MTcgMDA6MTE6MDcuMDAwMDAwMDAwIC0wNDAwCkBAIC0yLDYgKzIsOCBAQAogQ09ORklHICs9IGJ1
aWxkaW5nLWxpYnMKIENPTkZJRyArPSBkZXBlbmRfaW5jbHVkZXBhdGgKIAorY29udGFpbnMoUVRf
Q09ORklHLCByZWR1Y2VfZXhwb3J0cyk6Q09ORklHICs9IGhpZGVfc3ltYm9scworCiBzeW1iaWFu
OiB7CiAgICAgVEFSR0VULkVQT0NBTExPV0RMTERBVEE9MQogICAgIFRBUkdFVC5DQVBBQklMSVRZ
ID0gQWxsIC1UY2IK
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>93755</attachid>
            <date>2011-05-17 04:31:02 -0700</date>
            <delta_ts>2011-11-01 02:08:29 -0700</delta_ts>
            <desc>patch against the 2.1 and 2.2/HEAD branches</desc>
            <filename>qtwebkit-2.1.patch</filename>
            <type>text/plain</type>
            <size>403</size>
            <attacher name="Benjamin Reed">webkit</attacher>
            
              <data encoding="base64">ZGlmZiAtTnVyZCBxdHdlYmtpdC9KYXZhU2NyaXB0Q29yZS9qc2MucHJvIHF0d2Via2l0LW5ldy9K
YXZhU2NyaXB0Q29yZS9qc2MucHJvCi0tLSBxdHdlYmtpdC9KYXZhU2NyaXB0Q29yZS9qc2MucHJv
CTIwMTEtMDUtMTYgMTA6NTI6MjIuMDAwMDAwMDAwIC0wNDAwCisrKyBxdHdlYmtpdC1uZXcvSmF2
YVNjcmlwdENvcmUvanNjLnBybwkyMDExLTA1LTE2IDIzOjEyOjQwLjAwMDAwMDAwMCAtMDQwMApA
QCAtMTIsNiArMTIsNyBAQAogaW5jbHVkZSgkJFBXRC8uLi9XZWJLaXQucHJpKQogCiBDT05GSUcg
Kz0gbGlua19wa2djb25maWcKK2NvbnRhaW5zKFFUX0NPTkZJRywgcmVkdWNlX2V4cG9ydHMpOkNP
TkZJRyArPSBoaWRlX3N5bWJvbHMKIAogUU1BS0VfUlBBVEhESVIgKz0gJCRPVVRQVVRfRElSL2xp
YgogCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>113143</attachid>
            <date>2011-11-01 02:00:14 -0700</date>
            <delta_ts>2011-11-01 03:17:20 -0700</delta_ts>
            <desc>patch for review.</desc>
            <filename>60951_20111101-095750.patch</filename>
            <type>text/plain</type>
            <size>1051</size>
            <attacher name="Zeno Albisser">zeno</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCBhY2M5NWQ0Li4yZjA5NTc5IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTQg
QEAKKzIwMTEtMTEtMDEgIFplbm8gQWxiaXNzZXIgIDx6ZW5vLmFsYmlzc2VyQG5va2lhLmNvbT4K
KworICAgICAgICBbUXRdIGJhZCBjb2RlZ2VuLCBwb2ludGVyIGRpZmYgaW4gSlNDOjpKU0NhbGxi
YWNrQ29uc3RydWN0b3I6OkpTQ2FsbGJhY2tDb25zdHJ1Y3RvcgorICAgICAgICBodHRwczovL2J1
Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NjA5NTEKKworICAgICAgICBBZGp1c3Qgc3lt
Ym9scyB2aXNpYmlsaXR5IGZvciBXZWJDb3JlLgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9E
WSAoT09QUyEpLgorCisgICAgICAgICogV2ViQ29yZS5wcm86CisKIDIwMTEtMTAtMzEgIFl1cnkg
U2VtaWtoYXRza3kgIDx5dXJ5c0BjaHJvbWl1bS5vcmc+CiAKICAgICAgICAgVW5yZXZpZXdlZC4g
QWRkIFJlc291cmNlUHJldmlld1ZpZXcuanMgdG8gdGhlIGxpc3Qgb2YgaW5zcGVjdG9yIGZyb250
LWVuZApkaWZmIC0tZ2l0IGEvU291cmNlL1dlYkNvcmUvV2ViQ29yZS5wcm8gYi9Tb3VyY2UvV2Vi
Q29yZS9XZWJDb3JlLnBybwppbmRleCBlM2I4ZWM3Li5lNmNmZWIyIDEwMDY0NAotLS0gYS9Tb3Vy
Y2UvV2ViQ29yZS9XZWJDb3JlLnBybworKysgYi9Tb3VyY2UvV2ViQ29yZS9XZWJDb3JlLnBybwpA
QCAtNyw2ICs3LDggQEAgaW5jbHVkZSgkJFBXRC8uLi9XZWJLaXQucHJpKQogaW5jbHVkZSgkJFBX
RC9XZWJDb3JlLnByaSkKIGluY2x1ZGUoJCRQV0QvLi4vSmF2YVNjcmlwdENvcmUvSmF2YVNjcmlw
dENvcmUucHJpKQogCitjb250YWlucyhRVF9DT05GSUcsIHJlZHVjZV9leHBvcnRzKTpDT05GSUcg
Kz0gaGlkZV9zeW1ib2xzCisKIFRFTVBMQVRFID0gbGliCiBUQVJHRVQgPSAkJFdFQkNPUkVfVEFS
R0VUCiBDT05GSUcgKz0gc3RhdGljbGliCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>