Bug 55504

Summary: Use of uninitialized value in numeric lt (<) at Tools/Scripts/old-run-webkit-tests line 1778 seen on Qt bots after a crash
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, ap, aroben, eric, joepeck, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Don't try to capture crash logs on platforms that haven't implemented that feature joepeck: review+, joepeck: commit-queue-

Joseph Pecoraro
Reported 2011-03-01 14:02:48 PST
Perl old-run-webkit-tests issue seen on the build bots after a crash: Use of uninitialized value in numeric lt (<) at Tools/Scripts/old-run-webkit-tests line 1778.
Attachments
Don't try to capture crash logs on platforms that haven't implemented that feature (1.84 KB, patch)
2011-03-02 09:03 PST, Adam Roben (:aroben)
joepeck: review+
joepeck: commit-queue-
Alexey Proskuryakov
Comment 1 2011-03-01 23:02:22 PST
Line 1778: # The crash log must have been created after this script started running. $crashLog = $newestCrashLog if -M $newestCrashLog < 0;
Adam Roben (:aroben)
Comment 2 2011-03-02 06:18:57 PST
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 < 0; } So $newestCrashLog itself is defined. I guess -M is returning undefined. The docs say this will happen if the file doesn'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?
Joseph Pecoraro
Comment 3 2011-03-02 08:53:27 PST
findNewestFileMatchingGlob can early return, which I think returns the undefined value. I saw this on the Qt bot.
Adam Roben (:aroben)
Comment 4 2011-03-02 08:56:47 PST
Ah, that makes sense. Should be easy to fix then.
Adam Roben (:aroben)
Comment 5 2011-03-02 08:57:31 PST
We should probably make captureSavedCrashLog bail if we don't have a $glob (which should be the case on Qt).
Adam Roben (:aroben)
Comment 6 2011-03-02 08:58:25 PST
(In reply to comment #3) > 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't even get to line 1778, since $newestCrashLog will be undefined.
Adam Roben (:aroben)
Comment 7 2011-03-02 08:59:35 PST
Ah, the "return unless @paths" check in findNewestFileMatchingGlob is buggy.
Adam Roben (:aroben)
Comment 8 2011-03-02 09:03:12 PST
Created attachment 84423 [details] Don't try to capture crash logs on platforms that haven't implemented that feature
Joseph Pecoraro
Comment 9 2011-03-02 11:40:15 PST
Comment on attachment 84423 [details] Don't try to capture crash logs on platforms that haven't implemented that feature View in context: https://bugs.webkit.org/attachment.cgi?id=84423&action=review r=me with that fix! Thanks! > Tools/Scripts/old-run-webkit-tests:1793 > + return unless $#paths; "$#paths" 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 "scalar(@paths)". That seems better.
Adam Roben (:aroben)
Comment 10 2011-03-02 11:47:31 PST
WebKit Review Bot
Comment 11 2011-03-02 13:24:25 PST
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
Note You need to log in before you can comment on or make changes to this bug.