<?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>38193</bug_id>
          
          <creation_ts>2010-04-27 04:31:29 -0700</creation_ts>
          <short_desc>[Qt] Segfault when unloading a plugin which creates a QScriptEngine</short_desc>
          <delta_ts>2014-02-03 03:16:25 -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>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kent Hansen">kent.hansen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cmarcelo</cc>
    
    <cc>hausmann</cc>
    
    <cc>rion4ik</cc>
    
    <cc>steveire</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>217655</commentid>
    <comment_count>0</comment_count>
    <who name="Kent Hansen">kent.hansen</who>
    <bug_when>2010-04-27 04:31:29 -0700</bug_when>
    <thetext>Originated from http://bugreports.qt.nokia.com/browse/QTBUG-9622

There are two issues (that I know of) that&apos;s causing JavaScriptCore not to gracefully unload:
- g_identifierTableSpecific in runtime/Identifier.cpp is never deleted. This is a problem on the Qt port, since we use QThreadStorage to implement ThreadSpecific. The QApplication destructor will attempt to destroy the data, but by this time the QtScript library has been unloaded, causing a crash.
- The scavenger thread in wtf/FastMalloc.cpp is not shut down gracefully.

The same happens when loading entire QtWebKit from a plugin, of course.

1) Is loading from a plugin a use case we want to support? If so;
2) What&apos;s needed to make it happen? We need a robust solution, not just work-arounds for the above two issues. In particular, loading -&gt; unloading -&gt; loading must be supported. It will also have implications for WebKit in general (e.g. people can&apos;t just go and add a global variable; they have to make sure it doesn&apos;t break loading/unloading).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>217656</commentid>
    <comment_count>1</comment_count>
      <attachid>54410</attachid>
    <who name="Kent Hansen">kent.hansen</who>
    <bug_when>2010-04-27 04:35:32 -0700</bug_when>
    <thetext>Created attachment 54410
Testcase (Linux)

Uncompress under JavaScriptCore/qt/tests, build qtscriptplugin/theplugin, and then qtscriptplugin. Segfaults due to the g_identifierTableSpecific issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>217864</commentid>
    <comment_count>2</comment_count>
    <who name="">steveire</who>
    <bug_when>2010-04-27 12:54:24 -0700</bug_when>
    <thetext>The motivation for the original bug comes from Grantlee and the intention was to be able to have only a plugin depend on QtScript, and the core library depend only on QtCore. 

Diagram at the bottom of http://grantlee.org/apidox/using_and_deploying.html.

I&apos;d prefer that to remain (or become, it seems) possible and supported. I guess it would also be possible to link grantlee_core to libQtScript, but only if really necessary. I don&apos;t know if depending on libQtScript brings in a libQtWebkit or libQtGui dependency?

Grantlee uses libQtScript to allow users to implement custom parsing and rendering of textual markup content. Disabling the use of the QtScript plugin is an easy way to prevent users from begin able to do those things in cases where it could cause security holes.

All the best,

Steve.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>975122</commentid>
    <comment_count>3</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2014-02-03 03:16:25 -0800</bug_when>
    <thetext>=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>54410</attachid>
            <date>2010-04-27 04:35:32 -0700</date>
            <delta_ts>2010-04-27 04:35:32 -0700</delta_ts>
            <desc>Testcase (Linux)</desc>
            <filename>qtscriptplugin.tar.gz</filename>
            <type>application/gzip</type>
            <size>1509</size>
            <attacher name="Kent Hansen">kent.hansen</attacher>
            
              <data encoding="base64">H4sIAPLF1ksAA+1ZbXPaRhD2Z/2KreMP4NhCYF5mcMlUxrJNS3gx8rT55DmkA64WkjidTJhO/nv3
dBIYx67TseO0iXaYEbrd29fbu0fSQkQOZ6EIvXjK/NLO1yADqVGryWu5UTPuXjPaKZeP6rVatdKo
VnaMchUFdqD2Vby5R3EkCAfYuZkRP6L+o3JP8f+ntNiuv5jRl18J/6r+RgPrX8/r/0r0aP3X//SQ
B8+zIQtcr1YfrX8N10ZW/1q1vmNUDHkB42VC/Gf6wetvW+8HXdO2IKEWeGysDd+bv1nXlwPTvjjt
XOKgrpfu/lAG9va2pdJJ3c7Jk1OUjNbu984658ouvG2BWm0ackfy9tAbilGyNLULyzy1LkeQ+bhZ
mjNt1L+6bFsP8Zww1Gzz8tyyYc3d21uILhtzwlc24VMqCmv5onZqjWzpfCaMbo/RIS1azceM+E34
S5MMpVO3Bv222e32fz/tdk9N22yV73Lb5sA86XQ79ocWCsGh3T7RPmnfutgP0Bf0/+y5Np7o/6MK
7vmq/48aDSPp/3Kjmvf/a1Bp/wVJS37QDsIVZ9OZgEK7CFhMA3rBDSPI4GHAiWCBD8R3SwEHJiKI
4nHEXIZNWThkNCrqUonpeZAoiYDTiPJb6upKuS+II5oPqCwsxCHzJ8EvvmTpTjAvph7ZMxbBhHkU
8BoSLiCYyK0CBI0E2meCZiNDAXYQeDdM6OnkvaF9fWKdd3q4c7Wt3shqds8H3T3J6gXowHxOucOI
B1cRmdJtc470lv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