Skip to content

message: "Assertion `val->IsArrayBufferView()' failed." #41949

Description

@sigdevel

Version

node-v16.13.2

Platform

Linux astra 4.15.3-141-generic #astra26+ci17 x86_64 GNU/Linux (debian-based)

Subsystem

No response

What steps will reproduce the bug?

\\1
var StringDecoder = require('string_decoder').StringDecoder;
var d = new StringDecoder('utf8');
var b = Buffer('abc');
console.log(b);
console.log(d.__proto__.write(b));
\\2
var StringDecoder = require('string_decoder').StringDecoder;
var d = new StringDecoder('utf8').__proto__;
var b = Buffer('abc');
console.log(b);
console.log(d.write(b));

How often does it reproduce? Is there a required condition?

Standart buildCompiled with: gcc (version 8.3.0) ;
Configure params: --prefix="/target/dir";
Builded binary info:
node: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped.

What is the expected behavior?

No response

What do you see instead?

Stderr with run crafted sample: Abort;

<Buffer 61 62 63>
./node[7121]: ../src/node_buffer.cc:246:char *node::Buffer::Data(Local<v8::Value>): Assertion `val->IsArrayBufferView()' failed.
 1: 0x10b84c7 node::DumpBacktrace(_IO_FILE*) [./node]
 2: 0x17584a1 node::Abort() [./node]
 3: 0x1756c1e  [./node]
 4: 0x15509af node::Buffer::Data(v8::Local<v8::Value>) [./node]
 5: 0x213f228  [./node]
 6: 0x2a7f008 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [./node]
 7: 0x2a7e532  [./node]
 8: 0x2a7d1ca v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [./node]
 9: 0x3cb9299  [./node]
Аварийный останов

Additional information

Call might be what is causing in type proto (the last dot).

Activity

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

    string_decoderIssues and PRs related to the string_decoder subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions