Status: New
Owner: ----
New issue 2262 by [email protected]: Bug: cctest
test-strings/RobustSubStringStub fails
http://code.google.com/p/v8/issues/detail?id=2262
Hi,
I just figured that the test-strings/RobustSubStringStub unreasonably
assumes that an exception should be thrown, here:
CheckException("%_SubString(short, 1, Infinity);");
CheckException("%_SubString(short, NaN, 5);");
In the native code, the SubStringStub rapidly bails out to the runtime. The
runtime routine FastD2I converts the Infinity and NaN to integers using
plain static_cast<int>. Then, Runtime_SubString checks the correctness of
the indices. However, as the result of static_cast<int>(x) in case of x=nan
or x=inf is unspecified, the indices may happen to be okay, so in this case
no exception is thrown.
--Evgeny
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev