uhop / node-re2

node.js bindings for RE2: fast, safe alternative to backtracking regular expression engines.
Other
479 stars 53 forks source link

Regression in 1.21.2 #212

Closed rarkins closed 1 month ago

rarkins commented 1 month ago

Our test suite at Renovate Bot is getting failures for 1.21.2. We previously saw memory problems for 1.21.0 and reverted it, but tests were passing, as they were for 1.21.1. However for 1.21.2 we're seeing failed tests across a number of modules within Renovate.

Here is a minimal code snippet which behaves differently between the two versions:

const re2 = require('re2');

const regex = re2(/^.*?/);

const match = regex.exec('');

console.warn(match);

Result in v1.21.1:

[ '', index: 0, input: '', groups: undefined ]

Result in v1.21.2:

[ undefined, index: 0, input: '', groups: undefined ]
uhop commented 1 month ago

Published as 1.21.3.