1. Mar 30, 2018
    • Anna Henningsen's avatar
    • Anna Henningsen's avatar
      net: track bytesWritten in C++ land · 923fb5cc
      Anna Henningsen authored
      Move tracking of `socket.bytesWritten` to C++ land.
      
      This makes it easier to provide this functionality for all
      `StreamBase` instances, and in particular should keep working
      when they have been 'consumed' in C++ in some way (e.g. for
      the network sockets that are underlying to TLS or HTTP2 streams).
      
      Also, this parallels `socket.bytesRead` a lot more now.
      
      PR-URL: https://github.com/nodejs/node/pull/19551
      
      
      Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
      923fb5cc
    • Anna Henningsen's avatar
      async_wrap: fix use-after-free for inspector session · abc87862
      Anna Henningsen authored
      This fixes the following condition:
      
          $ python -u tools/run-valgrind.py ./node_g test/sequential/test-inspector-async-call-stack.js
          [...]
          ==10848== Invalid read of size 4
          ==10848==    at 0x12F509E: node::AsyncWrap::provider_type() const (async_wrap-inl.h:34)
          ==10848==    by 0x12E7642: node::AsyncWrap::EmitTraceEventAfter() (async_wrap.cc:208)
          ==10848==    by 0x12F301B: node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) (async_wrap.cc:724)
          ==10848==    by 0x14516C6: node::inspector::(anonymous namespace)::JSBindingsConnection::OnMessage(v8::Local<v8::Value>) (inspector_js_api.cc:88)
          ==10848==    by 0x14514F1: node::inspector::(anonymous namespace)::JSBindingsConnection::JSBindingsSessionDelegate::SendMessageToFrontend(v8_inspector::StringView const&) (inspector_js_api.cc:57)
          ==10848==    by 0x14436AD: node::inspector::(anonymous namespace)::ChannelImpl::sendMessageToFrontend(v8_inspector::StringView const&) (inspector_agent.cc:232)
          ==10848==    by 0x1443627: node::inspector::(anonymous namespace)::ChannelImpl::sendResponse(int, std::unique_ptr<v8_inspector::StringBuffer, std::default_delete<v8_inspector::StringBuffer> >) (inspector_agent.cc:221)
          ==10848==    by 0x15C54EA: v8_inspector::V8InspectorSessionImpl::sendProtocolResponse(int, std::unique_ptr<v8_inspector::protocol::Serializable, std::default_delete<v8_inspector::protocol::Serializable> >) (v8-inspector-session-impl.cc:165)
          ==10848==    by 0x14C1E81: v8_inspector::protocol::DispatcherBase::sendResponse(int, v8_inspector::protocol::DispatchResponse const&, std::unique_ptr<v8_inspector::protocol::DictionaryValue, std::default_delete<v8_inspector::protocol::DictionaryValue> >) (Protocol.cpp:660)
          ==10848==    by 0x14C1F0A: v8_inspector::protocol::DispatcherBase::sendResponse(int, v8_inspector::protocol::DispatchResponse const&) (Protocol.cpp:665)
          ==10848==    by 0x14E68E3: v8_inspector::protocol::Debugger::DispatcherImpl::setAsyncCallStackDepth(int, std::unique_ptr<v8_inspector::protocol::DictionaryValue, std::default_delete<v8_inspector::protocol::DictionaryValue> >, v8_inspector::protocol::ErrorSupport*) (Debugger.cpp:1353)
          ==10848==    by 0x14E2D49: v8_inspector::protocol::Debugger::DispatcherImpl::dispatch(int, v8_inspector::String16 const&, std::unique_ptr<v8_inspector::protocol::DictionaryValue, std::default_delete<v8_inspector::protocol::DictionaryValue> >) (Debugger.cpp:920)
          ==10848==  Address 0x64e6f88 is 24 bytes inside a block of size 80 free'd
          ==10848==    at 0x4C3123B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
          ==10848==    by 0x14534F8: node::inspector::(anonymous namespace)::JSBindingsConnection::~JSBindingsConnection() (inspector_js_api.cc:34)
          ==10848==    by 0x145187E: node::inspector::(anonymous namespace)::JSBindingsConnection::Disconnect() (inspector_js_api.cc:111)
          ==10848==    by 0x14518C9: node::inspector::(anonymous namespace)::JSBindingsConnection::Disconnect(v8::FunctionCallbackInfo<v8::Value> const&) (inspector_js_api.cc:117)
          ==10848==    by 0x166FF87: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) (api-arguments.cc:26)
          ==10848==    by 0x172F829: 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) (builtins-api.cc:112)
          ==10848==    by 0x172D85C: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) (builtins-api.cc:142)
          ==10848==    by 0x172D5F6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) (builtins-api.cc:130)
          ==10848==    by 0x7895E1842C3: ???
          ==10848==    by 0x7895E19B737: ???
          ==10848==    by 0x7895E19B737: ???
          ==10848==    by 0x7895E18F9C2: ???
          ==10848==  Block was alloc'd at
          ==10848==    at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
          ==10848==    by 0x14517E8: node::inspector::(anonymous namespace)::JSBindingsConnection::New(v8::FunctionCallbackInfo<v8::Value> const&) (inspector_js_api.cc:103)
          ==10848==    by 0x166FF87: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) (api-arguments.cc:26)
          ==10848==    by 0x172F113: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(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) (builtins-api.cc:112)
          ==10848==    by 0x172D748: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) (builtins-api.cc:138)
          ==10848==    by 0x172D5F6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) (builtins-api.cc:130)
          ==10848==    by 0x7895E1842C3: ???
          ==10848==    by 0x7895E1930DC: ???
          ==10848==    by 0x7895E293EAA: ???
          ==10848==    by 0x7895E19B737: ???
          ==10848==    by 0x7895E19B737: ???
          ==10848==    by 0x7895E19B737: ???
          [...]
      
      PR-URL: https://github.com/nodejs/node/pull/19381
      
      
      Reviewed-By: default avatarEugene Ostroukhov <eostroukhov@google.com>
      Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
      Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
      Reviewed-By: default avatarTiancheng "Timothy" Gu <timothygu99@gmail.com>
      abc87862
    • Matteo Collina's avatar
    • Rich Trott's avatar
      doc: shorten character encoding introduction · 6c5144f4
      Rich Trott authored
      Keep the introduction for Buffers and character encodings short and to
      the point. The current introduction doesn't provide much in the way of
      useful additional information, but it is a bit confusing in its wording.
      ("such as" seems like it ought to refer to "encoded characters" but it
      actually refers to character encodings, which are not mentioned in the
      sentence. It may be arguable as to whether "hex-encoded" is in fact a
      character encoding, whether it should be stylized as "Hex-encoded" or
      not, and whether it should be spelled out as "Hexadecimal-encoded". None
      of that information is particularly useful to the end user at this point
      in the text. Omitting it simplifies and improves the documentation.)
      
      Additionally, the section is now wrapped to 80 characters.
      
      PR-URL: https://github.com/nodejs/node/pull/19648
      
      
      Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
      Reviewed-By: default avatarGireesh Punathil <gpunathi@in.ibm.com>
      Reviewed-By: default avatarTiancheng "Timothy" Gu <timothygu99@gmail.com>
      6c5144f4
    • Myles Borins's avatar
      2018-03-29, Version 9.10.1 (Current) · 1e0e9884
      Myles Borins authored
      Notable changes:
      
      No additional commits.
      
      Due to incorrect staging of the upgrade to the GCC 4.9.X compiler, the
      latest releases for PPC little endian were built using GCC 4.9.X
      instead of GCC 4.8.X. This caused an ABI breakage on PPCLE based
      environments. This has been fixed in our infrastructure and we are
      doing this release to ensure that the hosted binaries are adhering to
      our platform support contract.
      
      Note that Node.js versions 10.X and later will be built with version
      4.9.X or later of the GCC compiler, and it is possible that Node.js
      version 9.X may be built on the 4.9.X compiler at a later time as the
      stated minimum compiler requirement for Node.js version 9.X is 4.9.4.
      
      Refs: https://github.com/nodejs/node/blob/v9.x/BUILDING.md
      PR-URL: https://github.com/nodejs/node/pull/19678
      1e0e9884
    • Myles Borins's avatar
      2018-03-29, Version 8.11.1 'Carbon' (LTS) · ea4c6967
      Myles Borins authored
      Notable changes:
      
      No additional commits.
      
      Due to incorrect staging of the upgrade to the GCC 4.9.X compiler, the
      latest releases for PPC little endian were built using GCC 4.9.X
      instead of GCC 4.8.X. This caused an ABI breakage on PPCLE based
      environments. This has been fixed in our infrastructure and we are
      doing this release to ensure that the hosted binaries are adhering to
      our platform support contract.
      
      Note that Node.js versions 10.X and later will be built with version
      4.9.X or later of the GCC compiler, and it is possible that Node.js
      version 8.X may be built on the 4.9.X compiler at a later time as the
      stated minimum compiler requirement for Node.js version 8.X is 4.9.4.
      
      Refs: https://github.com/nodejs/node/blob/v8.x/BUILDING.md
      PR-URL: https://github.com/nodejs/node/pull/19679
      ea4c6967
    • Myles Borins's avatar
      2018-03-29, Version 6.14.1 'Boron' (LTS) · b5e9fcfa
      Myles Borins authored
      Notable changes:
      
      No additional commits.
      
      Due to incorrect staging of the upgrade to the GCC 4.9.X compiler, the
      latest releases for PPC little endian were built using GCC 4.9.X
      instead of GCC 4.8.X. This caused an ABI breakage on PPCLE based
      environments. This has been fixed in our infrastructure and we are
      doing this release to ensure that the hosted binaries are adhering to
      our platform support contract.
      
      PR-URL: https://github.com/nodejs/node/pull/19680
      b5e9fcfa
    • Myles Borins's avatar
      2018-03-29, Version 4.9.1 'Argon' (Maintenance) · b3cb8ce1
      Myles Borins authored
      Notable changes:
      
      No additional commits.
      
      Due to incorrect staging of the upgrade to the GCC 4.9.X compiler, the
      latest releases for PPC little endian were built using GCC 4.9.X
      instead of GCC 4.8.X. This caused an ABI breakage on PPCLE based
      environments. This has been fixed in our infrastructure and we are
      doing this release to ensure that the hosted binaries are adhering to
      our platform support contract.
      
      PR-URL: https://github.com/nodejs/node/pull/19681
      b3cb8ce1
  2. Mar 29, 2018
  3. Mar 28, 2018