{"comment":{"created_at":"2011-10-24T19:00:42Z","body":"This falls kind-of in the middle between being an issue and intended behavior.\r\n\r\nLong story short, `node_http_parser.c` has a static global `current_buffer`, which is is assigned by `Parser::Execute` during parsing, and again by `Parser::Finish` during parser shutdown.\r\n\r\nIf a piece of code executed as a callback during parsing manually pokes into the `ClientRequest`'s socket, and calls `onend()`on it, `Parser::Finish` will be called and a non-null assert will fire for `current_buffer` (which is still in use).\r\n\r\nSo while `current_buffer` shouldn't ideally be a static global, this whole thing won't really happen so long sockets are killed off by other means than reaching into `onend` -- which is just naughty.","updated_at":"2011-10-24T19:00:42Z","url":"https://api.github.com/repos/joyent/node/issues/comments/2507757","id":2507757,"user":{"avatar_url":"https://secure.gravatar.com/avatar/23b827c76b7eebbb1936f905a7ba2e24?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"23b827c76b7eebbb1936f905a7ba2e24","url":"https://api.github.com/users/einaros","id":394360,"login":"einaros"}},"action":"created","issue":{"number":1931,"created_at":"2011-10-24T17:40:49Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"reported by @3rd-Eden\r\n\r\nhttp://cl.ly/2d2I3S0r2t031H212B1U\r\n\r\n```\r\n13:38 < `3rdEden> i was able to instantly crash node with a assertion error in the HTTP parser \r\nusing node 0.5.9\r\n13:38 < `3rdEden> but on my mac i'm unable to reproduce it with 0.5.10\r\n13:38 < `3rdEden> but einaros said that he was able reproduce the same crash in 0.5.10\r\n13:40 < `3rdEden> ryah but i was doing really silly things with the HTTP module, like\r\ncalling the socket's onend method to forcefully close a connection\r\n```\r\n\r\ncc @bnoordhuis, @einaros","comments":1,"title":"hitting assert in http parser binding","updated_at":"2011-10-24T19:00:42Z","url":"https://api.github.com/repos/joyent/node/issues/1931","id":2036291,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/b984299ceb40752b58146714eb192554?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b984299ceb40752b58146714eb192554","url":"https://api.github.com/users/ry","id":80,"login":"ry"},"html_url":"https://github.com/joyent/node/issues/1931","labels":[],"state":"open"},"legacy":{"issue_id":2036291,"comment_id":2507757}}