<?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>167282</bug_id>
          
          <creation_ts>2017-01-21 02:05:41 -0800</creation_ts>
          <short_desc>JavaScriptCore has a weak external symbol in it</short_desc>
          <delta_ts>2017-01-23 02:43:02 -0800</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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Shuan Zhao">hszhsh</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>commit-queue</cc>
    
    <cc>joepeck</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>saam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1268743</commentid>
    <comment_count>0</comment_count>
    <who name="Shuan Zhao">hszhsh</who>
    <bug_when>2017-01-21 02:05:41 -0800</bug_when>
    <thetext>ERROR: JavaScriptCore has a weak external symbol in it (/Users/hoolai/Library/Developer/Xcode/DerivedData/WebKit-ehpvmnqmihxdvndqudiokzoxdfuu/Build/Products/Debug/JavaScriptCore.framework/Versions/A/JavaScriptCore)
ERROR: A weak external symbol is generated when a symbol is defined in multiple compilation units and is also marked as being exported from the library.
ERROR: A common cause of weak external symbols is when an inline function is listed in the linker export file.
ERROR: symbol automatically hidden __ZTVN3JSC8Debugger15ProfilingClientE</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1268845</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-01-21 23:29:17 -0800</bug_when>
    <thetext>I don&apos;t think that we&apos;ve seen this particular error. What version of Xcode are you building with?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1268846</commentid>
    <comment_count>2</comment_count>
    <who name="Shuan Zhao">hszhsh</who>
    <bug_when>2017-01-21 23:32:26 -0800</bug_when>
    <thetext>I&apos;m using Xcode Version 8.2.1 (8C1002)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1268850</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-01-21 23:52:10 -0800</bug_when>
    <thetext>Our bots have version 8.2, which is unlikely to be different in this regard. What command do you build with?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1268868</commentid>
    <comment_count>4</comment_count>
    <who name="Shuan Zhao">hszhsh</who>
    <bug_when>2017-01-22 00:14:51 -0800</bug_when>
    <thetext>I just open the workspace file with Xcode, and select the JavaScriptCore target. I have changed the Mach-O Type to static library to run on iOS with my own app. Error was reported for debug build. I can make the release build successfully.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1268949</commentid>
    <comment_count>5</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-01-22 18:41:47 -0800</bug_when>
    <thetext>This seems like an issue that I used to see in the past that was solved by newer compilers. In any case, it sounds like we can just make the destructor:

    virtual ~ProfilingClient() { }

Not be inlined to solve this. I&apos;ll try to reproduce myself tonight, but I&apos;ll just throw up a patch anyways.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1268982</commentid>
    <comment_count>6</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-01-22 22:14:00 -0800</bug_when>
    <thetext>With:

  $ xcrun clang++ -v
  Apple LLVM version 8.1.0 (clang-802.0.21.2)

I only see these weak externals:

  $ nm -m $build/Release/JavaScriptCore.framework/JavaScriptCore | grep &apos;weak external&apos;
    (undefined) weak external __ZdaPv (from libc++)
    (undefined) weak external __ZdlPv (from libc++)
    (undefined) weak external __Znam (from libc++)
    (undefined) weak external __Znwm (from libc++)

So I guess I can go ahead speculatively here, seems harmless.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1268983</commentid>
    <comment_count>7</comment_count>
      <attachid>299500</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-01-22 22:16:29 -0800</bug_when>
    <thetext>Created attachment 299500
[PATCH] Proposed Fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1268984</commentid>
    <comment_count>8</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-01-22 22:17:03 -0800</bug_when>
    <thetext>Shuan, since I can&apos;t reproduce but you can, would you be willing to try the attached patch (very basic) and see if it solves the problem for you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1268986</commentid>
    <comment_count>9</comment_count>
    <who name="Shuan Zhao">hszhsh</who>
    <bug_when>2017-01-22 22:20:19 -0800</bug_when>
    <thetext>Ok, I&apos;ll try it and report my result later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1269011</commentid>
    <comment_count>10</comment_count>
    <who name="Shuan Zhao">hszhsh</who>
    <bug_when>2017-01-22 23:35:47 -0800</bug_when>
    <thetext>The patch solved my problem. Thanks for you work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1269021</commentid>
    <comment_count>11</comment_count>
      <attachid>299500</attachid>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-01-23 02:18:28 -0800</bug_when>
    <thetext>Comment on attachment 299500
[PATCH] Proposed Fix

ok, r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1269022</commentid>
    <comment_count>12</comment_count>
      <attachid>299500</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-01-23 02:42:58 -0800</bug_when>
    <thetext>Comment on attachment 299500
[PATCH] Proposed Fix

Clearing flags on attachment: 299500

Committed r211037: &lt;http://trac.webkit.org/changeset/211037&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1269023</commentid>
    <comment_count>13</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-01-23 02:43:02 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>299500</attachid>
            <date>2017-01-22 22:16:29 -0800</date>
            <delta_ts>2017-01-23 02:42:58 -0800</delta_ts>
            <desc>[PATCH] Proposed Fix</desc>
            <filename>weak-1.patch</filename>
            <type>text/plain</type>
            <size>1757</size>
            <attacher name="Joseph Pecoraro">joepeck</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cgYi9Tb3VyY2UvSmF2
YVNjcmlwdENvcmUvQ2hhbmdlTG9nCmluZGV4IGVlZmJiMWZlM2EzLi4yMjJhYTcxNmJlOCAxMDA2
NDQKLS0tIGEvU291cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZworKysgYi9Tb3VyY2UvSmF2
YVNjcmlwdENvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTUgQEAKKzIwMTctMDEtMjIgIEpvc2Vw
aCBQZWNvcmFybyAgPHBlY29yYXJvQGFwcGxlLmNvbT4KKworICAgICAgICBKYXZhU2NyaXB0Q29y
ZSBoYXMgYSB3ZWFrIGV4dGVybmFsIHN5bWJvbCBpbiBpdAorICAgICAgICBodHRwczovL2J1Z3Mu
d2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aW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