<?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>55504</bug_id>
          
          <creation_ts>2011-03-01 14:02:48 -0800</creation_ts>
          <short_desc>Use of uninitialized value in numeric lt (&lt;) at Tools/Scripts/old-run-webkit-tests line 1778 seen on Qt bots after a crash</short_desc>
          <delta_ts>2011-03-02 13:24: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>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</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="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ap</cc>
    
    <cc>aroben</cc>
    
    <cc>eric</cc>
    
    <cc>joepeck</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>360207</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2011-03-01 14:02:48 -0800</bug_when>
    <thetext>Perl old-run-webkit-tests issue seen on the build bots after a crash:

    Use of uninitialized value in numeric lt (&lt;) at Tools/Scripts/old-run-webkit-tests line 1778.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360602</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-03-01 23:02:22 -0800</bug_when>
    <thetext>Line 1778:

        # The crash log must have been created after this script started running.
        $crashLog = $newestCrashLog if -M $newestCrashLog &lt; 0;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360760</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-02 06:18:57 -0800</bug_when>
    <thetext>A little more context:

# We assume that the newest crash log in matching the glob is the one that corresponds to the crash that just occurred.
if (my $newestCrashLog = findNewestFileMatchingGlob($glob)) {
    # The crash log must have been created after this script started running.
    $crashLog = $newestCrashLog if -M $newestCrashLog &lt; 0;
}

So $newestCrashLog itself is defined. I guess -M is returning undefined. The docs say this will happen if the file doesn&apos;t exist. Maybe the file was deleted between when it was found by findNewestFileMatchingGlob and when we tested it with -M?

Joe, which bot did this happen on? Do you have a link to the test output that shows the error?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360817</commentid>
    <comment_count>3</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2011-03-02 08:53:27 -0800</bug_when>
    <thetext>findNewestFileMatchingGlob can early return, which I think returns the undefined value. I saw this on the Qt bot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360820</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-02 08:56:47 -0800</bug_when>
    <thetext>Ah, that makes sense. Should be easy to fix then.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360822</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-02 08:57:31 -0800</bug_when>
    <thetext>We should probably make captureSavedCrashLog bail if we don&apos;t have a $glob (which should be the case on Qt).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360824</commentid>
    <comment_count>6</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-02 08:58:25 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; findNewestFileMatchingGlob can early return, which I think returns the undefined value. I saw this on the Qt bot.

Hm, but if findNewestFileMatchingGlob returns undefined, we shouldn&apos;t even get to line 1778, since $newestCrashLog will be undefined.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360825</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-02 08:59:35 -0800</bug_when>
    <thetext>Ah, the &quot;return unless @paths&quot; check in findNewestFileMatchingGlob is buggy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360826</commentid>
    <comment_count>8</comment_count>
      <attachid>84423</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-02 09:03:12 -0800</bug_when>
    <thetext>Created attachment 84423
Don&apos;t try to capture crash logs on platforms that haven&apos;t implemented that feature</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360945</commentid>
    <comment_count>9</comment_count>
      <attachid>84423</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2011-03-02 11:40:15 -0800</bug_when>
    <thetext>Comment on attachment 84423
Don&apos;t try to capture crash logs on platforms that haven&apos;t implemented that feature

View in context: https://bugs.webkit.org/attachment.cgi?id=84423&amp;action=review

r=me with that fix! Thanks!

&gt; Tools/Scripts/old-run-webkit-tests:1793
&gt; +    return unless $#paths;

&quot;$#paths&quot; returns the last index in the array. So if there is 1 item, the last index will
be 0, and this might still bail. As you mentioned on IRC, an alternative to getting the
size of the array is &quot;scalar(@paths)&quot;. That seems better.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360951</commentid>
    <comment_count>10</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-02 11:47:31 -0800</bug_when>
    <thetext>Committed r80152: &lt;http://trac.webkit.org/changeset/80152&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361031</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-03-02 13:24:25 -0800</bug_when>
    <thetext>http://trac.webkit.org/changeset/80152 might have broken GTK Linux 64-bit Debug
The following tests are not passing:
fast/css-generated-content/005.html
fast/css-generated-content/beforeAfter-interdocument.html
fast/css-generated-content/no-openclose-quote.html
fast/invalid/residual-style.html</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>84423</attachid>
            <date>2011-03-02 09:03:12 -0800</date>
            <delta_ts>2011-03-02 11:40:15 -0800</delta_ts>
            <desc>Don&apos;t try to capture crash logs on platforms that haven&apos;t implemented that feature</desc>
            <filename>bug-55504-20110302120312.patch</filename>
            <type>text/plain</type>
            <size>1881</size>
            <attacher name="Adam Roben (:aroben)">aroben</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogODAxMzAKZGlmZiAtLWdpdCBhL1Rvb2xzL0NoYW5nZUxvZyBi
L1Rvb2xzL0NoYW5nZUxvZwppbmRleCA1MGUzNjI3YTUzODVkMWJkZjczZDE1OWJkMmRkZjM1MzFh
NDY5NGE5Li5iZmY1YTNiOTQxOTUzMjM1NWI5ZDJhNzFkMTQyYWRmMTdlNGNjY2Q4IDEwMDY0NAot
LS0gYS9Ub29scy9DaGFuZ2VMb2cKKysrIGIvVG9vbHMvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTcg
QEAKKzIwMTEtMDMtMDIgIEFkYW0gUm9iZW4gIDxhcm9iZW5AYXBwbGUuY29tPgorCisgICAgICAg
IERvbid0IHRyeSB0byBjYXB0dXJlIGNyYXNoIGxvZ3Mgb24gcGxhdGZvcm1zIHRoYXQgaGF2ZW4n
dCBpbXBsZW1lbnRlZCB0aGF0IGZlYXR1cmUKKworICAgICAgICBGaXhlcyA8aHR0cDovL3dlYmtp
dC5vcmcvYi81NTUwND4gVXNlIG9mIHVuaW5pdGlhbGl6ZWQgdmFsdWUgaW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AIHN1YiBjYXB0dXJl
U2F2ZWRDcmFzaExvZygkJCkKICAgICAgICAgfQogICAgIH0KIAorICAgIHJldHVybiB1bmxlc3Mg
JGdsb2I7CisKICAgICAjIFdlIGFzc3VtZSB0aGF0IHRoZSBuZXdlc3QgY3Jhc2ggbG9nIGluIG1h
dGNoaW5nIHRoZSBnbG9iIGlzIHRoZSBvbmUgdGhhdCBjb3JyZXNwb25kcyB0byB0aGUgY3Jhc2gg
dGhhdCBqdXN0IG9jY3VycmVkLgogICAgIGlmIChteSAkbmV3ZXN0Q3Jhc2hMb2cgPSBmaW5kTmV3
ZXN0RmlsZU1hdGNoaW5nR2xvYigkZ2xvYikpIHsKICAgICAgICAgIyBUaGUgY3Jhc2ggbG9nIG11
c3QgaGF2ZSBiZWVuIGNyZWF0ZWQgYWZ0ZXIgdGhpcyBzY3JpcHQgc3RhcnRlZCBydW5uaW5nLgpA
QCAtMTc4OCw3ICsxNzkwLDcgQEAgc3ViIGZpbmROZXdlc3RGaWxlTWF0Y2hpbmdHbG9iKCQpCiAg
ICAgbXkgKCRnbG9iKSA9IEBfOwogCiAgICAgbXkgQHBhdGhzID0gZ2xvYiAkZ2xvYjsKLSAgICBy
ZXR1cm4gdW5sZXNzIEBwYXRoczsKKyAgICByZXR1cm4gdW5sZXNzICQjcGF0aHM7CiAKICAgICBt
eSBAcGF0aHNBbmRUaW1lcyA9IG1hcCB7IFskXywgLU0gJF9dIH0gQHBhdGhzOwogICAgIEBwYXRo
c0FuZFRpbWVzID0gc29ydCB7ICRiLT5bMV0gPD0+ICRhLT5bMV0gfSBAcGF0aHNBbmRUaW1lczsK
</data>
<flag name="review"
          id="76399"
          type_id="1"
          status="+"
          setter="joepeck"
    />
    <flag name="commit-queue"
          id="76421"
          type_id="3"
          status="-"
          setter="joepeck"
    />
          </attachment>
      

    </bug>

</bugzilla>