Status: New
Owner: ----
New issue 2333 by [email protected]: A "Floating-point invalid
operation" exception at "Update Survival Rate Trend"
http://code.google.com/p/v8/issues/detail?id=2333
unit: heap.cc
when the function "Heap::UpdateSurvivalRateTrend" is called with the
parameter "start_new_space_size" set to 0 (zero), the first line of the
function throws a "Floating-point invalid operation" exception due to a
division by zero.
double survival_rate =
(static_cast<double>(young_survivors_after_last_gc_) * 100) /
start_new_space_size;
Suggestion: make an validation checking. if "start_new_space_size" is 0
assign 100 to "survival_rate", else execute the division.
I am using Visual C++ 2008 Express. Compiled with DEBUG option, using as
static library.
I embedded "Persistent<Context>" on an custom long-lived object instance
(c++ class, not V8::Object)
I am calling "V8::IdleNotification()" every 10ms for tests. On the first
call to IdleNotification, it works fine. But on the second call, the
exception occurs.
---------------------------
CallStack:
* v8::internal::Heap::UpdateSurvivalRateTrend(int start_new_space_size=0)
Line 802
*
v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector
collector=MARK_COMPACTOR, v8::internal::GCTracer * tracer=0x0018fb48) Line
875
* v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace
space=OLD_POINTER_SPACE, v8::internal::GarbageCollector
collector=MARK_COMPACTOR, const char * gc_reason=0x5cdb680c, const char *
collector_reason=0x5cdb38bc) Line 606
* v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace
space=OLD_POINTER_SPACE, const char * gc_reason=0x5cdb680c) Line 441 C++
* v8::internal::Heap::CollectAllGarbage(int flags=0, const char *
gc_reason=0x5cdb680c) Line 517 C++
* v8::internal::Heap::AdvanceIdleIncrementalMarking(int
step_size=16384000) Line 5112 C++
* v8::internal::Heap::IdleNotification(int hint=1000) Line 5218 C++
* v8::internal::V8::IdleNotification(int hint=1000) Line 194 C++
* v8::V8::IdleNotification(int hint=1000) Line 4322 + 0x9 bytes C++
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev