Version
24.7.0
Platform
$ uname -a
Linux badlands 6.12.70 #1-NixOS SMP PREEMPT_DYNAMIC Wed Feb 11 12:40:29 UTC 2026 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
// repro.js
const re = new RegExp("HELLO\nWORLD", "sy");
const str = "HELLO\nWORLD";
for (let i = 0; i < 100_000; i++) {
re.lastIndex = 0;
re.exec(str);
}
Note: A hot loop (100_000 iterations) is required to trigger JIT compilation of the RegExp, else the symbol is not present in the perf map.
node --perf-basic-prof repro.js
Then look for HELLO in the outputted /tmp/perf-<pid>.map
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Node 22 output (correct):
7f7035fc5ec0 358 RegExp:HELLO\nWORLD
What do you see instead?
Node 24 output (broken, on multiple line):
7f2306002980 358 RegExp.> src: 'HELLO
WORLD' flags: 'sy'
Additional information
I did not find any spec for these file except for https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/Documentation/jit-interface.txt
This seems to corroborate the fact that each symbol should be a single line, and newline should be escaped
Version
24.7.0
Platform
Subsystem
No response
What steps will reproduce the bug?
Note: A hot loop (100_000 iterations) is required to trigger JIT compilation of the RegExp, else the symbol is not present in the perf map.
node --perf-basic-prof repro.jsThen look for HELLO in the outputted
/tmp/perf-<pid>.mapHow often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Node 22 output (correct):
What do you see instead?
Node 24 output (broken, on multiple line):
Additional information
I did not find any spec for these file except for https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/Documentation/jit-interface.txt
This seems to corroborate the fact that each symbol should be a single line, and newline should be escaped