<?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>39060</bug_id>
          
          <creation_ts>2010-05-13 06:42:14 -0700</creation_ts>
          <short_desc>JIT asserts inside valgrind</short_desc>
          <delta_ts>2011-01-01 22:55:10 -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>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>0</everconfirmed>
          <reporter name="Balazs Kelemen">kbalazs</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashl1future</cc>
    
    <cc>chanika</cc>
    
    <cc>zherczeg</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>225256</commentid>
    <comment_count>0</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2010-05-13 06:42:14 -0700</bug_when>
    <thetext>For a long time, with JIT enabled builds I am facing with asserts when running either jsc or QtLauncher inside valgrind.
Test cases are simple:
$ valgrind WebKitBuild/Debug/bin/QtLauncher #and browsing a little
$ valgrind WebkitBuild/Debug/JavaScriptCore/jsc SunSpider/tests/sunspider-0.9.1/3d-cube.js
Both of them asserts here:
ASSERTION FAILED: !callLinkInfo-&gt;isLinked()
(../../../JavaScriptCore/jit/JIT.cpp:610 static void JSC::JIT::linkCall(JSC::JSFunction*, JSC::CodeBlock*, JSC::CodeBlock*, JSC::JITCode&amp;, JSC::CallLinkInfo*, int, JSC::JSGlobalData*))

As I remember, in the early days of the JIT there were no such problems.
Of course, we can not be sure that the bug is not in valgrind.
Personally I think that it would be useful to clarify the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>241852</commentid>
    <comment_count>1</comment_count>
    <who name="Chani">chanika</who>
    <bug_when>2010-06-23 07:51:57 -0700</bug_when>
    <thetext>same here. I&apos;ve created a very minimal test case: http://chani.ca/webkit/valgrind/

all I have to do is make two should* calls and I get the assert failure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>242216</commentid>
    <comment_count>2</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2010-06-23 18:16:27 -0700</bug_when>
    <thetext>I have found a solution: use &quot;--smc-check=all&quot;.
This is needed because the JIT::linkCall function (and some other JIT staff) modifying the jitted code, so valgrind must check self modification.
Alternatively we could use valgrind&apos;s client request mechanism. That would be cheaper, but I am dubious about how the apple folks would feel about to introduce valgrind into the codebase (we should have at least a build option, and a define for valgrind).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>242219</commentid>
    <comment_count>3</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2010-06-23 18:19:34 -0700</bug_when>
    <thetext>I think we can leave with the --smc-check=all option, so I set this as wontfix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>328364</commentid>
    <comment_count>4</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-01-01 22:55:10 -0800</bug_when>
    <thetext>*** Bug 34484 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>