Bug 13513 - 3 easy ways to crash Safari using console.log
Summary: 3 easy ways to crash Safari using console.log
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 419.x
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-26 15:55 PDT by Phil Crosby
Modified: 2007-04-26 17:19 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Crosby 2007-04-26 15:55:10 PDT
<html><head>

<script>
// Other logging apis support multiple arguments to log. Safari doesn't
// accept multiple arguments, but segfaults if you try more than one.
console.log(1,2);
</script>

</head><body/></html>



<html><head>

<script>
// why does this alias cause a crash?
log=console.log;
log("hey");
</script>

</head><body/></html>



<html><head>

<script>
// This happens often, e.g. if I mistakenly tried to log
// "document.head" (also undefined). Sometimes it just
// makes the logging window into a zombie, where it's non-responsive.
// Other times it crashes Safari
console.log(undefined);
</script>

</head><body/></html>
Comment 1 Brady Eidson 2007-04-26 17:19:17 PDT
Thanks for the report.  2 comments

1 - console.log(undefined) doesn't crash Shipping Safari 2.04 for me
2 - All of these have been fixed in recent WebKit nightlies

For future reference, please try out test cases for bugs in a WebKit nightly before filing as vast improvements have been made since Safari 2.0's WebKit shipped