Bug 82002 - ExecutableAllocator::memoryPressureMultiplier() might can return NaN
Summary: ExecutableAllocator::memoryPressureMultiplier() might can return NaN
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
Depends on:
Reported: 2012-03-22 18:41 PDT by Michael Saboff
Modified: 2012-03-22 21:55 PDT (History)
0 users

See Also:

Patch (3.01 KB, patch)
2012-03-22 18:46 PDT, Michael Saboff
buildbot: commit-queue-
Details | Formatted Diff | Diff
Fixed mac build failure (3.02 KB, patch)
2012-03-22 19:41 PDT, Michael Saboff
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2012-03-22 18:41:13 PDT
The caller of ExecutableAllocator::memoryPressureMultiplier() expects that it's value is >= 1.0.  In some cases, memoryPressureMultiplier() can return NaN (due to a div by zero) or values less than 1.0.
Comment 1 Michael Saboff 2012-03-22 18:46:02 PDT
Created attachment 133407 [details]
Comment 2 Build Bot 2012-03-22 19:21:35 PDT
Comment on attachment 133407 [details]

Attachment 133407 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/12114411
Comment 3 Michael Saboff 2012-03-22 19:41:08 PDT
Created attachment 133418 [details]
Fixed mac build failure
Comment 4 Filip Pizlo 2012-03-22 19:54:37 PDT
Comment on attachment 133418 [details]
Fixed mac build failure

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

R=me, but fix the style goof (if it's a real one and not some bugzilla fail).

> Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp:133
> +        result = static_cast<double>(statistics.bytesReserved) /
> +        divisor;

Is this meant to be on two lines?
Comment 5 Michael Saboff 2012-03-22 21:55:42 PDT
Committed r111826: <http://trac.webkit.org/changeset/111826>