Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

req.sendHeader() should raise exception if it's already been called. #13

Closed
ry opened this issue Jun 28, 2009 · 0 comments
Closed

req.sendHeader() should raise exception if it's already been called. #13

ry opened this issue Jun 28, 2009 · 0 comments

Comments

@ry
Copy link

ry commented Jun 28, 2009

http://groups.google.com/group/nodejs/msg/a1365b2aaa93cc7b

HenryRawas pushed a commit to HenryRawas/node that referenced this issue Jun 22, 2011
HenryRawas pushed a commit to HenryRawas/node that referenced this issue Jun 22, 2011
bnoordhuis added a commit that referenced this issue Apr 10, 2013
Call SetPointerInInternalField(0, NULL) rather than
SetInternalField(0, Undefined()).

Fixes the following spurious NULL pointer dereference in debug builds:

  #0  0x03ad2821 in v8::internal::FixedArrayBase::length ()
  #1  0x03ad1dfc in v8::internal::FixedArray::get ()
  #2  0x03ae05dd in v8::internal::Context::global_object ()
  #3  0x03b6b87d in v8::internal::Context::builtins ()
  #4  0x03ae1871 in v8::internal::Isolate::js_builtins_object ()
  #5  0x03ab4fab in v8::CallV8HeapFunction ()
  #6  0x03ab4d4a in v8::Value::Equals ()
  #7  0x03b4f38b in CheckEqualsHelper ()
  #8  0x03ac0f4b in v8::Object::SetInternalField ()
  #9  0x06a99ddd in node::ObjectWrap::~ObjectWrap ()
  #10 0x06a8b051 in node::Buffer::~Buffer ()
  #11 0x06a8afbb in node::Buffer::~Buffer ()
  #12 0x06a8af5e in node::Buffer::~Buffer ()
  #13 0x06a9e569 in node::ObjectWrap::WeakCallback ()
shigeki pushed a commit to shigeki/node-v0.x-archive that referenced this issue Dec 24, 2014
Fixes the following assertion on slow systems, like our ARM buildbot:

    $ out/Debug/node test/simple/test-timers-unref.js
    node: ../src/async-wrap-inl.h:101: v8::Handle<v8::Value>
    node::AsyncWrap::MakeCallback(uint32_t, int,
    v8::Handle<v8::Value>*): Assertion `cb_v->IsFunction()' failed.
    Aborted

The reason it only manifests on slow systems is that the test starts
a 1 ms interval timer, then defers timer.unref.bind({}) to the next
tick.  On fast systems, the test completes in under a millisecond,
before the callback is called.

This commit makes timer.unref() check that the receiver actually has
a timeout callback property.

Fixes nodejs#13.

PR-URL: nodejs/node#165
Reviewed-By: Rod Vagg <rod@vagg.org>
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant