Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

IE8 native JSON parser stack overflow bug

microsoft.public.internetexplorer.general






Speedup My PC
Reply
  #1 (permalink)  
Old 08-19-2009
Joel
 

Posts: n/a
IE8 native JSON parser stack overflow bug
The following test page, when run in IE8 in IE8 Standards mode, will
cause an "out of stack space" error. The conditions that cause this
error are: Both Array.prototype and Function.prototype have non-built-
in functions added to them, and JSON.parse() is passed both a string
containing a JSON array, and any kind of reviver function at all.

This means that any page using a popular javascript framework that
modifies Array.prototype and Function.prototype (such as Prototype or
Ext) will not be able to use a reviver function to handle dates
correctly. The native JSON parsers in Firefox and Chrome do not have
the same issue. Neither does the javascript-based parser json2.js at
json.org.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">

Function.prototype.test1 = function() { };
Array.prototype.test2 = function() { };

window.onload = function()
{
alert(JSON.parse('{ "foo": [1,2,3] }', function(k,v) { return
v; }));
}

</script>
</head>
<body>

</body>
</html>

Incidentally, I tried to post this bug at Microsoft Connect (https://
connect.microsoft.com/IE/Feedback) but it doesn't seem to allow me to
post new items. Is there a better place for IE bug reports than here?

- Joel Mueller
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-20-2009
PA Bear [MS MVP]
 

Posts: n/a
Re: IE8 native JSON parser stack overflow bug
See...

IE Developer Center
http://msdn.microsoft.com/en-us/ie/default.aspx

Learn IE8
http://msdn.microsoft.com/en-us/ie/aa740473.aspx

HTML and DHTML Overviews and Tutorials
http://msdn.microsoft.com/en-us/library/ms537623.aspx and

Cascading Style Sheets (CSS)
http://msdn2.microsoft.com/en-us/ie/aa740476.aspx

Or you could post here instead:

MSDN IE Development Forums
http://social.msdn.microsoft.com/for...iedevelopment/


Joel wrote:
> The following test page, when run in IE8 in IE8 Standards mode, will
> cause an "out of stack space" error. The conditions that cause this
> error are: Both Array.prototype and Function.prototype have non-built-
> in functions added to them, and JSON.parse() is passed both a string
> containing a JSON array, and any kind of reviver function at all.
>
> This means that any page using a popular javascript framework that
> modifies Array.prototype and Function.prototype (such as Prototype or
> Ext) will not be able to use a reviver function to handle dates
> correctly. The native JSON parsers in Firefox and Chrome do not have
> the same issue. Neither does the javascript-based parser json2.js at
> json.org.
>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <title></title>
> <script type="text/javascript">
>
> Function.prototype.test1 = function() { };
> Array.prototype.test2 = function() { };
>
> window.onload = function()
> {
> alert(JSON.parse('{ "foo": [1,2,3] }', function(k,v) { return
> v; }));
> }
>
> </script>
> </head>
> <body>
>
> </body>
> </html>
>
> Incidentally, I tried to post this bug at Microsoft Connect (https://
> connect.microsoft.com/IE/Feedback) but it doesn't seem to allow me to
> post new items. Is there a better place for IE bug reports than here?
>
> - Joel Mueller

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stack overflow eyelikesports microsoft.public.internetexplorer.general 6 12-11-2008 04:59
RE: IE7 - Stack Overflow on line: 83 C Swan microsoft.public.internetexplorer.general 0 07-21-2008 02:46
Stack overflow at line:0 jacktar Introduce Yourself 0 07-13-2008 21:17
Re: IE 7.0 Stack Overflow on Line 83 Tad microsoft.public.internetexplorer.general 0 07-06-2008 13:12
Re: IE 7.0 Stack Overflow on Line 83 Tad microsoft.public.internetexplorer.general 0 07-06-2008 13:05




All times are GMT +1. The time now is 03:14.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120