RESOLVED FIXED 46990
TypedArray - NaNs converted to 0 in Float32 array
https://bugs.webkit.org/show_bug.cgi?id=46990
Summary TypedArray - NaNs converted to 0 in Float32 array
Joshua Bell
Reported 2010-10-01 09:44:52 PDT
var n = 1 / "abc"; >> NaN new Float32Array([n])[0]; >> 0, expecting NaN Other edge cases (positive/negative infinities, negative zero) behave correctly: new Float32Array([1/0])[0]; >> Infinity new Float32Array([-1/0])[0]; >> -Infinity var negzero = -0; function isnegzero(x) { return 1/x == -Infinity; } isnegzero(new Float32Array([negzero])[0]); >> true
Attachments
Patch (6.63 KB, patch)
2010-12-28 16:09 PST, Adrienne Walker
no flags
Patch (9.64 KB, patch)
2011-01-04 16:49 PST, Adrienne Walker
kbr: review+
Adrienne Walker
Comment 1 2010-12-28 16:09:51 PST
Adrienne Walker
Comment 2 2010-12-28 16:10:32 PST
(In reply to comment #1) > Created an attachment (id=77587) [details] > Patch I will update the Khronos conformance test once this lands.
WebKit Commit Bot
Comment 3 2010-12-29 18:14:50 PST
Comment on attachment 77587 [details] Patch Rejecting attachment 77587 [details] from commit-queue. Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-4', 'build-and-test', '--no-clean', '--no-update', '--test', '--non-interactive']" exit_code: 2 Last 500 characters of output: ................................................ fast/box-shadow ...... fast/box-sizing .... fast/canvas ..................................................................................................................................... fast/canvas/webgl ....... fast/canvas/webgl/array-unit-tests.html -> failed Exiting early after 1 failures. 6210 tests run. 126.95s total testing time 6209 test cases (99%) succeeded 1 test case (<1%) had incorrect layout 4 test cases (<1%) had stderr output Full output: http://queues.webkit.org/results/7198304
WebKit Commit Bot
Comment 4 2010-12-29 18:38:08 PST
Comment on attachment 77587 [details] Patch Rejecting attachment 77587 [details] from commit-queue. Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-3', 'build-and-test', '--no-clean', '--no-update', '--test', '--non-interactive']" exit_code: 2 Last 500 characters of output: ................................................ fast/box-shadow ...... fast/box-sizing .... fast/canvas ..................................................................................................................................... fast/canvas/webgl ....... fast/canvas/webgl/array-unit-tests.html -> failed Exiting early after 1 failures. 6210 tests run. 127.07s total testing time 6209 test cases (99%) succeeded 1 test case (<1%) had incorrect layout 4 test cases (<1%) had stderr output Full output: http://queues.webkit.org/results/7324244
Adrienne Walker
Comment 5 2011-01-04 16:49:02 PST
Adrienne Walker
Comment 6 2011-01-04 16:51:17 PST
Fixed test error on OSX because Int32Array([NaN]) was converting the value improperly. Also, refactored the test so that optimized code paths would get tested too.
Kenneth Russell
Comment 7 2011-01-05 17:10:38 PST
Comment on attachment 77946 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=77946&action=review Looks good overall; one question. If there's an error in the test, just feel free to fix it upon landing the patch. > LayoutTests/fast/canvas/webgl/array-unit-tests.html:618 > + for (var i = 1; i < array.length; ++i) Did you mean to start this iteration at 1? > LayoutTests/fast/canvas/webgl/array-unit-tests.html:622 > + for (var i = 1; i < array.length; ++i) Same question here.
Adrienne Walker
Comment 8 2011-01-05 17:19:01 PST
Comment on attachment 77946 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=77946&action=review >> LayoutTests/fast/canvas/webgl/array-unit-tests.html:618 >> + for (var i = 1; i < array.length; ++i) > > Did you mean to start this iteration at 1? Thanks for catching that. I must have missed those two loops when refactoring some code.
Adrienne Walker
Comment 9 2011-01-06 10:48:01 PST
WebKit Review Bot
Comment 10 2011-01-06 11:43:48 PST
http://trac.webkit.org/changeset/75167 might have broken Qt Linux Release
Note You need to log in before you can comment on or make changes to this bug.