René's URL Explorer Experiment


Title: RegExp modifier groups `(?i:…)` / `(?-i:…)` can get the wrong case sensitivity (fixed in V8 15.4, please cherry-pick 4cc98031) · Issue #66277 · nodejs/node · GitHub

Open Graph Title: RegExp modifier groups `(?i:…)` / `(?-i:…)` can get the wrong case sensitivity (fixed in V8 15.4, please cherry-pick 4cc98031) · Issue #66277 · nodejs/node

X Title: RegExp modifier groups `(?i:…)` / `(?-i:…)` can get the wrong case sensitivity (fixed in V8 15.4, please cherry-pick 4cc98031) · Issue #66277 · nodejs/node

Description: Version v24.20.0 and v26.10.0. Also reproduced on v24.7.0, v24.9.0, v24.14.1, and on v22.14.0 with --js-regexp-modifiers. Platform Darwin 24.6.0 arm64 Subsystem deps/v8 (irregexp) What steps will reproduce the bug? Save as modifier-case....

Open Graph Description: Version v24.20.0 and v26.10.0. Also reproduced on v24.7.0, v24.9.0, v24.14.1, and on v22.14.0 with --js-regexp-modifiers. Platform Darwin 24.6.0 arm64 Subsystem deps/v8 (irregexp) What steps will r...

X Description: Version v24.20.0 and v26.10.0. Also reproduced on v24.7.0, v24.9.0, v24.14.1, and on v22.14.0 with --js-regexp-modifiers. Platform Darwin 24.6.0 arm64 Subsystem deps/v8 (irregexp) What steps will r...

Opengraph URL: https://github.com/nodejs/node/issues/66277

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"RegExp modifier groups `(?i:…)` / `(?-i:…)` can get the wrong case sensitivity (fixed in V8 15.4, please cherry-pick 4cc98031)","articleBody":"### Version\n\nv24.20.0 and v26.10.0. Also reproduced on v24.7.0, v24.9.0, v24.14.1, and on v22.14.0 with `--js-regexp-modifiers`.\n\n### Platform\n\n```text\nDarwin 24.6.0 arm64\n```\n\n### Subsystem\n\ndeps/v8 (irregexp)\n\n### What steps will reproduce the bug?\n\nSave as `modifier-case.js` and run `node modifier-case.js`. No dependencies; it also runs under d8.\n\n```js\nconst log = typeof print === \"function\" ? print : console.log;\nconst first = (source, flags, input) => new RegExp(source, flags).exec(input)?.[0] ?? null;\nconst show = (label, got, want) => log(`${got === want ? \"ok  \" : \"FAIL\"} ${label}: got ${JSON.stringify(got)}, expected ${JSON.stringify(want)}`);\n\n// 1. Fresh process, short pattern. The failing atom count depends on the V8 version.\nfor (const n of [24, 49]) {\n  const x = \"x?\".repeat(n);\n  show(`${n} x? then (?i:a?) on \"A\"`, first(x + \"(?i:a?)\", \"\", \"A\"), \"A\");\n  show(`${n} x? then (?-i:a?) with /i on \"A\"`, first(x + \"(?-i:a?)\", \"i\", \"A\"), \"\");\n}\n\n// 2. Any pattern whose source is longer than 20,480 characters.\nshow(`x?(?i:a?) padded to 20,481 chars on \"A\"`, first(\"x?(?i:a?)\" + \"(?:)\".repeat(5118), \"\", \"A\"), \"A\");\n\n// 3. A long-running process: once enough regex code has been generated,\n//    a modifier pattern compiled for the first time is wrong from then on.\nshow(`/x?(?i:a?)/ before the workload`, first(\"x?(?i:a?)(?:q{0,0})\", \"\", \"A\"), \"A\");\nconst filler = Array.from({ length: 32 }, (_, i) => \"abcdefgh\"[i % 8] + \"{0,3}\").join(\"\");\nfor (let k = 0; k \u003c 2000; k++) {\n  const re = new RegExp(filler + \"z{0,\" + k + \"}\");\n  re.exec(\"ab\");\n  re.exec(\"ab\");\n}\nshow(`/x?(?i:a?)/ after 2,000 unrelated regexes`, first(\"x?(?i:a?)(?:q{0,1})\", \"\", \"A\"), \"A\");\n```\n\n### How often does it reproduce? Is there a required condition?\n\nEvery time. It needs a letter inside a `(?i:…)` or `(?-i:…)` group, plus one of three conditions:\n\n- a certain number of preceding optional atoms: 49–51, 102–104 … on V8 13.6, and 24–26, 52–54 … on V8 14.6;\n- a source longer than 20,480 characters;\n- a process that has already generated enough regex code.\n\nThe third makes it a practical problem. In a long-running server or test run, any modifier pattern first compiled after that point matches wrongly for the rest of the process, while the same pattern is correct in a fresh process.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nEvery line prints `ok`, as it does on d8 15.6.62. Per the [RegExp modifiers](https://github.com/tc39/proposal-regexp-modifiers) semantics (ES2025), `(?i:a?)` matches `\"A\"`, and `(?-i:a?)` inside `/…/i` does not.\n\n### What do you see instead?\n\nv24.20.0 (V8 13.6.233.17-node.53):\n\n```text\nok   24 x? then (?i:a?) on \"A\": got \"A\", expected \"A\"\nok   24 x? then (?-i:a?) with /i on \"A\": got \"\", expected \"\"\nFAIL 49 x? then (?i:a?) on \"A\": got \"\", expected \"A\"\nFAIL 49 x? then (?-i:a?) with /i on \"A\": got \"A\", expected \"\"\nFAIL x?(?i:a?) padded to 20,481 chars on \"A\": got \"\", expected \"A\"\nok   /x?(?i:a?)/ before the workload: got \"A\", expected \"A\"\nFAIL /x?(?i:a?)/ after 2,000 unrelated regexes: got \"\", expected \"A\"\n```\n\nv26.10.0 (V8 14.6.202.34-node.34):\n\n```text\nFAIL 24 x? then (?i:a?) on \"A\": got \"\", expected \"A\"\nFAIL 24 x? then (?-i:a?) with /i on \"A\": got \"A\", expected \"\"\nok   49 x? then (?i:a?) on \"A\": got \"A\", expected \"A\"\nok   49 x? then (?-i:a?) with /i on \"A\": got \"\", expected \"\"\nFAIL x?(?i:a?) padded to 20,481 chars on \"A\": got \"\", expected \"A\"\nok   /x?(?i:a?)/ before the workload: got \"A\", expected \"A\"\nFAIL /x?(?i:a?)/ after 2,000 unrelated regexes: got \"\", expected \"A\"\n```\n\nd8 15.6.62 (via jsvu): all seven lines `ok`.\n\n### Additional information\n\n\n**Upstream fix.** V8 [4cc98031](https://chromium.googlesource.com/v8/v8/+/4cc980311389bef473644f1ea7833171f128ac57) ([CL 8260876](https://chromium-review.googlesource.com/c/v8/v8/+/8260876), \"[regexp] Store flags on RegExpNode and remove ActionNode::MODIFY_FLAGS\", 2026-08-28) landed during V8 15.4 development. Its message describes this mechanism: the old design stored modifier flags as mutable state on the compiler, and \"out-of-order emission via worklists\" let that state leak across branches. The three conditions above all force that kind of emission.\n\nI haven't bisected to that exact commit. What I have verified is that V8 15.2 (Chromium 152) fails and d8 15.6.62 passes. The CL is a redesign across `src/regexp/` (10 files, including tests), so it may not apply cleanly to V8 13.6 or 14.6. It builds on the earlier, narrower [d315af3d](https://chromium.googlesource.com/v8/v8/+/d315af3d83cfe3bc1709f5b140db393db42790b3) ([CL 8257209](https://chromium-review.googlesource.com/c/v8/v8/+/8257209), \"[regexp] Reset compiler flags between word boundary branches\"), which a backport may also need.\n\n**Related.** Chromium issue [560182133](https://issues.chromium.org/issues/560182133) reports the long-running case with `/(?i:(a)|(b))\\2/d` on `\"BB\"` against Node v26.5.1. It was closed as obsolete on the assumption that V8 main was already fixed. That pattern also returns `null` on v24.20.0 and v26.10.0 after the 2,000-regex workload above, and for a source over 20,480 characters.\n\n**Workarounds.** Both of these are correct on the affected versions:\n- put `i` on the whole pattern rather than using a modifier group;\n- spell the letter as a character class, such as `[aA]` or `(?i:[a])`.\n\n**How it was found.** Differential fuzzing of [regex-partial-match](https://github.com/TomStrepsil/regex-partial-match), which uses the running V8 as its oracle. The results drifted part way through long runs.\n\n**Request.** Please cherry-pick 4cc98031 (with d315af3d if needed) into v24.x and v26.x. v22.x is affected too, but only with `--js-regexp-modifiers`.","author":{"url":"https://github.com/TomStrepsil","@type":"Person","name":"TomStrepsil"},"datePublished":"2026-09-25T10:11:33Z","url":"https://github.com/nodejs/node/issues/66277"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:667a7855-4ead-6671-9492-7256f00cbded
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9E7A:1D2BD1:5E0DD9:7FFBAC:6AED2173
html-safe-nonce59c3043d06cb57df3a86c4c919abf38ed7562e5e93dfa24ae5f54c3630cd9ad8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTdBOjFEMkJEMTo1RTBERDk6N0ZGQkFDOjZBRUQyMTczIiwidmlzaXRvcl9pZCI6IjY4NDY5MDAzMDEyNjI0NDIxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaced01ebe63556a7af742c69f50f72b656375224830c1e8ddcf7255310772bfca0
hovercard-subject-tagissue:5581382876
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/66277/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5f3bf8ae8329f5a5cefe4dcf001698ba2b8fb0f8c697cbcd07ebda13ef81b0d6/nodejs/node/issues/66277
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5f3bf8ae8329f5a5cefe4dcf001698ba2b8fb0f8c697cbcd07ebda13ef81b0d6/nodejs/node/issues/66277
og:image:altVersion v24.20.0 and v26.10.0. Also reproduced on v24.7.0, v24.9.0, v24.14.1, and on v22.14.0 with --js-regexp-modifiers. Platform Darwin 24.6.0 arm64 Subsystem deps/v8 (irregexp) What steps will r...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameTomStrepsil
hostnamegithub.com
expected-hostnamegithub.com
Nonee3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release707a24b346ac8a82878b9c084efaa38a997660cb
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/66277#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F66277
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F66277
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/66277
Reloadhttps://github.com/nodejs/node/issues/66277
Reloadhttps://github.com/nodejs/node/issues/66277
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)https://github.com/nodejs/node/issues
Pull requests666 (666)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66277
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66277
RegExp modifier groups (?i:…) / (?-i:…) can get the wrong case sensitivity (fixed in V8 15.4, please cherry-pick 4cc98031)https://github.com/nodejs/node/issues/66277#top
https://github.com/TomStrepsil
TomStrepsilhttps://github.com/TomStrepsil
on Sep 25, 2026https://github.com/nodejs/node/issues/66277#issue-5581382876
RegExp modifiershttps://github.com/tc39/proposal-regexp-modifiers
4cc98031https://chromium.googlesource.com/v8/v8/+/4cc980311389bef473644f1ea7833171f128ac57
CL 8260876https://chromium-review.googlesource.com/c/v8/v8/+/8260876
d315af3dhttps://chromium.googlesource.com/v8/v8/+/d315af3d83cfe3bc1709f5b140db393db42790b3
CL 8257209https://chromium-review.googlesource.com/c/v8/v8/+/8257209
560182133https://issues.chromium.org/issues/560182133
regex-partial-matchhttps://github.com/TomStrepsil/regex-partial-match
https://github.com/rikbrown
rikbrownhttps://github.com/rikbrown
on Oct 16, 2026https://github.com/nodejs/node/issues/66277#issuecomment-6219252071
https://github.com/TomStrepsil
TomStrepsilhttps://github.com/TomStrepsil
on Oct 18, 2026https://github.com/nodejs/node/issues/66277#issuecomment-6249653477
regex-partial-match#137https://github.com/TomStrepsil/regex-partial-match/issues/137
https://github.com/nick-inkeep
nick-inkeephttps://github.com/nick-inkeep
on Oct 18, 2026https://github.com/nodejs/node/issues/66277#issuecomment-6253746386
e540e1161b02https://chromium.googlesource.com/v8/v8/+/e540e1161b02
b69a1a1d8613https://chromium.googlesource.com/v8/v8/+/b69a1a1d8613
19e7a57bce3ehttps://chromium.googlesource.com/v8/v8/+/19e7a57bce3e
d315af3d83cfhttps://chromium.googlesource.com/v8/v8/+/d315af3d83cf
352175be0986https://chromium.googlesource.com/v8/v8/+/352175be0986
TooMuchRegExpCodehttps://github.com/nodejs/node/blob/26e72d85a611e222e3f06025de8a3c496923bacd/deps/v8/src/regexp/regexp.cc#L1136-L1149
1e7ee91de775https://chromium.googlesource.com/v8/v8/+/1e7ee91de775
a9622c4f12e6https://chromium.googlesource.com/v8/v8/+/a9622c4f12e6
samsonraduhttps://github.com/samsonradu
on Nov 2, 2026https://github.com/nodejs/node/issues/66277#event-34880070824
deps: v8: cherrypick e540e1161b02 b69a1a1d8613 19e7a57bce3e d315af3d83cfhttps://github.com/samsonradu/node/commit/458079435fc63345c5b9c38e92d361ca75807c1d
https://docs.github.com/articles/closing-issues-via-commit-messages
4580794https://github.com/samsonradu/node/commit/458079435fc63345c5b9c38e92d361ca75807c1d
deps: v8: cherrypick e540e1161b02 b69a1a1d8613 19e7a57bce3e d315af3d83cfhttps://github.com/samsonradu/node/commit/239a74fd29a3a00827f27b1e53e96b38dc2fbf4d
https://docs.github.com/articles/closing-issues-via-commit-messages
239a74fhttps://github.com/samsonradu/node/commit/239a74fd29a3a00827f27b1e53e96b38dc2fbf4d
deps: v8: cherrypick e540e1161b02 b69a1a1d8613 19e7a57bce3e d315af3d83cfhttps://github.com/samsonradu/node/commit/1ed98eb5ef84ff8eba02f2070d681457ef1d39e0
https://docs.github.com/articles/closing-issues-via-commit-messages
1ed98ebhttps://github.com/samsonradu/node/commit/1ed98eb5ef84ff8eba02f2070d681457ef1d39e0
deps: V8: cherry-pick 1e7ee91de775https://github.com/samsonradu/node/commit/03f0ad52ccae112bd6e831e0b9bef748431ba2c0
https://docs.github.com/articles/closing-issues-via-commit-messages
03f0ad5https://github.com/samsonradu/node/commit/03f0ad52ccae112bd6e831e0b9bef748431ba2c0
https://github.com/samsonradu
samsonraduhttps://github.com/samsonradu
on Nov 4, 2026https://github.com/nodejs/node/issues/66277#issuecomment-6632111853
@nick-inkeephttps://github.com/nick-inkeep
#67207https://github.com/nodejs/node/pull/67207
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/66277
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66277
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.