Repository navigation
Closed
Closed
Copy link
Labels
bufferIssues and PRs related to the buffer subsystem.confirmed-bugIssues and PRs for confirmed bugs.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.
Description
-
Version: v10.13.0
-
Platform:
-
Subsystem: filesystem
Hi, I have a really simple module fildes that basically wraps the filesystem api in promises and provides a few useful defaults options. I just updated the CI's to run also against node 10. The module has a few tests and also tests weird input to increase coverage.
Since node v10 there are some v8 internal errors(?)
possible duplicate #23668
I just found #23668 with a very similar error, please let me know if it is worth pursuing this i.e. try to make a small code example that reproduces the error.
#on appveyor
src\node_file.cc:1713: Assertion `(off) <= (buffer_length)' failed.
# or travis
node[114]: ../src/node_file.cc:1713:void node::fs::WriteBuffer(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `(off) <= (buffer_length)' failed.
#locally
write file in a new directory
✓ correct content
node[17121]: ../src/node_file.cc:1713:void node::fs::WriteBuffer(const FunctionCallbackInfo<v8::Value> &): Assertion `(off) <= (buffer_length)' failed.
write twice with manually opened fd
✓ correct content
1: 0x10003777e node::Abort() [<path>/bin/node]
write with invalid offset
2: 0x1000368be node::AddEnvironmentCleanupHook(v8::Isolate*, void (*)(void*), void*) [<path>/bin/node]
3: 0x1000680df node::fs::WriteBuffer(v8::FunctionCallbackInfo<v8::Value> const&) [<path>/bin/node]
4: 0x100227301 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [<path>/bin/node]
5: 0x1002267ef v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [<path>/bin/node]
6: 0x100225ec8 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [<path>/bin/node]
7: 0x1759cc95be3d
8: 0x1759cc9118d5
9: 0x1759cc9118d5
10: 0x1759cc9faf86
Metadata
Metadata
Assignees
Labels
bufferIssues and PRs related to the buffer subsystem.confirmed-bugIssues and PRs for confirmed bugs.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.
Activity
Trott commentedon Nov 25, 2018
/ping @cjihrig
refack commentedon Nov 25, 2018
Hello @thisconnect,
IMO your error is different then the one in #23668, also that issue was specifically patched for 10.13.0 in #23795.
So if you could find a minimal code snippet that reproduces this issue tat would be very helpful (for that issue it was
Buffer.alloc(1).copy(Buffer.alloc(1), 'err'))thisconnect commentedon Nov 25, 2018
@refack sure. This is on v10.13.0 on macOS
thisconnect commentedon Nov 25, 2018
please note that the only purpose of this was to produce an error and improve coverage a bit.
removes testing for specific errors
refack commentedon Nov 25, 2018
@thisconnect does this reproduce with node 10.9.0?NM, I can test it myself 🤦♂️P.S. yes it does reproduce with 10.9.0, so it's independent of #22129
jasnell commentedon Apr 26, 2021
This is still an issue on 16.0 ...
thisconnect commentedon Apr 29, 2021
Thank you 🙏
src: fix validation of negative offset to avoid abort
src: fix validation of negative offset to avoid abort
src: fix validation of negative offset to avoid abort
src: fix validation of negative offset to avoid abort
src: fix validation of negative offset to avoid abort
src: fix validation of negative offset to avoid abort