Skip to content

bug: fatal error for old nodes #139

Description

@wooffie

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

Plugin version

3.0.6 (latest from git)

Node.js version

20.18.3

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

Ubuntu 22.04.5 / Linux 6.8.0-65

Description

I found that removeDots can take a loooot time, and cause fatal error.
I think we should rewrite this function and use more performance alg.

Stacktrace:

> fasturi.equal(str,str)


#
# Fatal error in , line 0
# Fatal JavaScript invalid size error 169220804 (see crbug.com/1201626)
#
#
#
#FailureMessage Object: 0x7ffc8e18f600
----- Native stack trace -----

 1: 0xd41421  [node]
 2: 0x218caa1 V8_Fatal(char const*, ...) [node]
 3: 0x10d0cb8  [node]
 4: 0x12afe6f  [node]
 5: 0x12b000a  [node]
 6: 0x152a576 v8::internal::Runtime_GrowArrayElements(int, unsigned long*, v8::internal::Isolate*) [node]
 7: 0x70bf4fed9ef6
[1]    188498 trace trap (core dumped)  node

Link to code that reproduces the bug

https://gist.github.com/wooffie/8a2b461395e219dedb19ab6c7fbb945d

Expected Behavior

No crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions