<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>12457</bug_id>
          
          <creation_ts>2007-01-29 02:39:02 -0800</creation_ts>
          <short_desc>crash if set innerHTML in onchange event</short_desc>
          <delta_ts>2007-01-30 01:19:52 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>419.x</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>nrlz</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mrowe</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>31177</commentid>
    <comment_count>0</comment_count>
    <who name="">nrlz</who>
    <bug_when>2007-01-29 02:39:02 -0800</bug_when>
    <thetext>I can crash Safari 419.3 with the following HTML:

&lt;div id=&quot;a&quot;&gt;&lt;input type=checkbox onchange=&quot;prefill();&quot;&gt;&lt;/div&gt;

&lt;script&gt;
function prefill() {
  var elm = document.getElementById(&quot;a&quot;);
  elm.innerHTML = &quot;&lt;input type=checkbox&gt;&quot;;
  elm.firstChild.onchange = prefill;
}
&lt;/script&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31139</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-01-29 04:00:13 -0800</bug_when>
    <thetext>Backtrace in WebKit 418.9.1 is:

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x4130003c

Reading symbols for shared libraries ............. done
/Users/mrowe/8271: No such file or directory.
Attaching to program: `/Applications/Safari.app/Contents/MacOS/Safari&apos;, process 8271.
Reading symbols for shared libraries ........................................................................................................ done
0x952ec447 in QWidget::getView ()

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x4130003c
0x952ec447 in QWidget::getView ()
(gdb) bt
#0  0x952ec447 in QWidget::getView ()
#1  0x953a7601 in QButton::clicked ()
#2  0x9335cd88 in -[NSApplication sendAction:to:from:] ()
#3  0x0002b34b in ?? ()
#4  0x9335cce1 in -[NSControl sendAction:to:] ()
#5  0x9335ee91 in -[NSCell _sendActionFrom:] ()
#6  0x93371671 in -[NSCell trackMouse:inRect:ofView:untilMouseUp:] ()
#7  0x9338f25d in -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] ()
#8  0x9338eb0d in -[NSControl mouseDown:] ()
#9  0x953f4526 in -[KWQButton mouseDown:] ()
#10 0x953a4d16 in KWQKHTMLPart::passWidgetMouseDownEventToWidget ()
#11 0x95380cd3 in KWQKHTMLPart::passWidgetMouseDownEventToWidget ()
#12 0x95380b16 in KWQKHTMLPart::khtmlMousePressEvent ()
#13 0x9550d5f8 in KParts::Part::event ()
#14 0x9538043d in KHTMLView::viewportMousePressEvent ()
#15 0x953800a1 in KWQKHTMLPart::mouseDown ()
#16 0x95169b30 in -[WebHTMLView mouseDown:] ()
#17 0x9334c3af in -[NSWindow sendEvent:] ()
#18 0x0002338e in ?? ()
#19 0x9333e350 in -[NSApplication sendEvent:] ()
#20 0x00022f1e in ?? ()
#21 0x93268dfe in -[NSApplication run] ()
#22 0x9325cd2f in NSApplicationMain ()
#23 0x0005f7de in ?? ()
#24 0x0005f6f9 in ?? ()
(gdb) 
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31130</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-01-29 04:04:22 -0800</bug_when>
    <thetext>This does not crash with ToT WebKit.  As expected, the checkbox remains unchecked when clicked.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30549</commentid>
    <comment_count>3</comment_count>
    <who name="">nrlz</who>
    <bug_when>2007-01-30 01:19:52 -0800</bug_when>
    <thetext>Out of curiosity, should I continue to file new bugs which crash Safari 419.3, but which don&apos;t crash nightlies? This has been the case for both this bug and bug 12191. If I am wasting your time, then please let me know.

By the way, I found another crasher for 419.3 (safe on nightlies again) with this HTML:

&lt;a href=&quot;javascript:doit();&quot;&gt;click me&lt;/a&gt;
&lt;div id=&quot;menu&quot; style=&quot;overflow:auto&quot;&gt;&lt;/div&gt;
&lt;script&gt;
function doit() {
  var m = document.getElementById(&quot;menu&quot;);
  document.body.appendChild(m);
  m.style.display = &quot;none&quot;;
  m.scrollTop = 0;
}
&lt;/script&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>