Closed
Description
- Version: v14.15.1
- Platform: Linux 5.8.0-38-generic The binary and long term compatibility with node #43~20.04.1-Ubuntu SMP Tue Jan 12 16:39:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
- Subsystem: process
What steps will reproduce the bug?
Setup a node instance,
» node
and run the following javascript code.
process.debugPort = 772189652114705600000
//value -1 works too: process.debugPort = -1
process.on('str',function(){})
Then the node instance occurs an abort.
How often does it reproduce? Is there a required condition?
This abort can always be triggered following the steps above.
What is the expected behavior?
Maybe some check for the assignement of the process.debugPort is necessary. If any error occurs, an exception or other similar error-reporting stuff should be thrown. There is no reason to abort the whole node process.
What do you see instead?
» node
Welcome to Node.js v14.15.1.
Type ".help" for more information.
>
> process.debugPort = 772189652114705600000
772189652114705600000
> processnode[209909]: ../src/node_options.h:33:int node::HostPort::port() const: Assertion `(port_) >= (0)' failed.
1: 0xa03530 node::Abort() [node]
2: 0xa035ae [node]
3: 0xa7a6b2 [node]
4: 0xf427db v8::internal::Object::GetPropertyWithAccessor(v8::internal::LookupIterator*) [node]
5: 0xf42398 [node]
6: 0xee5c66 v8::internal::JSReceiver::GetOwnPropertyDescriptor(v8::internal::LookupIterator*, v8::internal::PropertyDescriptor*) [node]
7: 0xee60e3 v8::internal::JSReceiver::GetOwnPropertyDescriptor(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyDescriptor*) [node]
8: 0x107197b v8::internal::Runtime_GetOwnPropertyDescriptor(int, unsigned long*, v8::internal::Isolate*) [node]
9: 0x13ff179 [node]
[1] 209909 abort (core dumped) node