Sitelet https://github.com/nodejs/node/issues/2634
Skip to content

buffer: SlowBuffer() asserts when invoked without arguments. #2634

Description

@ChALkeR

io.js 3.2.0.

$ iojs
> require('buffer').SlowBuffer();
iojs: ../src/node_buffer.cc:400: void node::Buffer::Create(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args[0]->IsNumber()' failed.
Aborted

Activity

  1. added
    bufferIssues and PRs related to the buffer subsystem.
    c++Issues and PRs that require attention from people who are familiar with C++.
    on Sep 1, 2015
  2. targos commented on Sep 1, 2015

    @targos
    Member
  3. ChALkeR commented on Sep 1, 2015

    @ChALkeR
    MemberAuthor

    The same with SlowBuffer('foo'), SlowBuffer('10'), SlowBuffer({}) — any non-number causes an assertion.

  4. targos commented on Sep 1, 2015

    @targos
    Member

    fix: #2635

  5. trevnorris commented on Sep 1, 2015

    @trevnorris
    Contributor

    My bad. Didn't add the proper coercion before length hit the native CHECK().

  6. targos commented on Sep 4, 2015

    @targos
    Member

    fixed by eefe14c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.c++Issues and PRs that require attention from people who are familiar with C++.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions