Skip to content

Repo sync - #12

Open
SonicField wants to merge 1379 commits into
SonicField:mainfrom
facebookincubator:main
Open

Repo sync#12
SonicField wants to merge 1379 commits into
SonicField:mainfrom
facebookincubator:main

Conversation

@SonicField

Copy link
Copy Markdown
Owner

No description provided.

dependabot Bot and others added 30 commits July 28, 2026 09:25
Summary:
Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.8.4 to 1.10.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md">shell-quote's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/ljharb/shell-quote/compare/v1.9.0...v1.10.0">v1.10.0</a> - 2026-07-10</h2>
<h3>Merged</h3>
<ul>
<li>[New] <code>parse</code>: add opt-in <code>splitUnquoted</code> option for shell field-splitting of unquoted expansions <a href="https://redirect.github.com/ljharb/shell-quote/pull/1"><code>[https://github.com/facebookincubator/cinderx/issues/1](https://github.com/ljharb/shell-quote/issues/1)</code></a></li>
</ul>
<h3>Commits</h3>
<ul>
<li>[Fix] <code>parse</code>: match nested <code>${...}</code> braces so nested parameter expansion is consumed as one substitution <a href="https://github.com/ljharb/shell-quote/commit/c0842c8a7a034066da2496a75e91cbe500ff736c"><code>c0842c8</code></a></li>
<li>[Tests] <code>parse</code>: pin single-quote literalness and unmatched-quote handling <a href="https://github.com/ljharb/shell-quote/commit/a0d03e35c8ede24016502c4433b8f5d6b3100a62"><code>a0d03e3</code></a></li>
<li>[readme] remove the space in js code fences so evalmd evaluates them <a href="https://github.com/ljharb/shell-quote/commit/2116fa36aeea77fe8d561b0db46b1f9b26b8cf1b"><code>2116fa3</code></a></li>
<li>[Tests] <code>quote</code>: pin conservative escaping of <code>=</code>, <code>@</code>, <code>^</code>, <code>,</code>, <code>:</code>, <code>!</code> (<a href="https://redirect.github.com/ljharb/shell-quote/issues/11">https://github.com/facebookincubator/cinderx/issues/11</a>) <a href="https://github.com/ljharb/shell-quote/commit/1c36f3ff77d26d200620c1027e5c271050120b8e"><code>1c36f3f</code></a></li>
<li>[readme] document that <code>quote</code> outputs POSIX quoting, not <code>cmd.exe</code>/PowerShell <a href="https://github.com/ljharb/shell-quote/commit/100e96e0ffadcca97d63dda15651c70b9f83507c"><code>100e96e</code></a></li>
<li>[readme] document <code>parse</code>'s supported parameter-expansion subset <a href="https://github.com/ljharb/shell-quote/commit/e1c75cd6e4a3c60003792c7f2802587d328622cb"><code>e1c75cd</code></a></li>
<li>[Fix] <code>parse</code>: a backslash inside single quotes must not escape the closing quote <a href="https://github.com/ljharb/shell-quote/commit/5d460a332b54b83153297fe7d1964330b28fa491"><code>5d460a3</code></a></li>
<li>[readme] fix stale example outputs <a href="https://github.com/ljharb/shell-quote/commit/2de86f5d44f44d3ac9df36413d8a05f3534cdec6"><code>2de86f5</code></a></li>
<li>[Tests] <code>quote</code>: pin that a backslash with whitespace is not doubled in single quotes (<a href="https://redirect.github.com/ljharb/shell-quote/issues/14">https://github.com/facebookincubator/cinderx/issues/14</a>) <a href="https://github.com/ljharb/shell-quote/commit/190e236bcf1d81caa8e40e8ea3bb11998575be71"><code>190e236</code></a></li>
<li>[readme] <code>quote</code>: use output verbatim; do not re-quote it (<a href="https://redirect.github.com/ljharb/shell-quote/issues/11">https://github.com/facebookincubator/cinderx/issues/11</a>) <a href="https://github.com/ljharb/shell-quote/commit/1b364683b1e9e8d078fd3017cde82cf10c9c04a5"><code>1b36468</code></a></li>
<li>[Refactor] <code>parse</code>: fix swapped <code>SINGLE_QUOTE</code>/<code>DOUBLE_QUOTE</code> variable names <a href="https://github.com/ljharb/shell-quote/commit/801af5c935b27d6dcda63b3975d5e92a7b6f887f"><code>801af5c</code></a></li>
<li>[types] fix an error TS v6 ignores but v7 fails on <a href="https://github.com/ljharb/shell-quote/commit/59bbf8b81bf3236842deb72805744d489f650eba"><code>59bbf8b</code></a></li>
<li>[Dev Deps] update <code>arethetypeswrong/cli</code>, <code>evalmd</code> <a href="https://github.com/ljharb/shell-quote/commit/a04d47516e1cd5b1b4d3f720ddf97561ed0082fc"><code>a04d475</code></a></li>
<li>[Dev Deps] update <code>arethetypeswrong/ci</code>, <code>eslint</code> <a href="https://github.com/ljharb/shell-quote/commit/d390f9a92b97a04b1f799298634e90dc581021e6"><code>d390f9a</code></a></li>
<li>[Tests] <code>quote</code>: the tilde test escapes every <code>~</code>, not just a leading one (<a href="https://redirect.github.com/ljharb/shell-quote/issues/9">https://github.com/facebookincubator/cinderx/issues/9</a>) <a href="https://github.com/ljharb/shell-quote/commit/617d119795c7b44d6e49a4d41f80195c4aa5735c"><code>617d119</code></a></li>
</ul>
<h2><a href="https://github.com/ljharb/shell-quote/compare/v1.8.4...v1.9.0">v1.9.0</a> - 2026-06-24</h2>
<h3>Commits</h3>
<ul>
<li>[New] add types <a href="https://github.com/ljharb/shell-quote/commit/dca6e21a02df4cc1a83ed1b5baa4d82df134170a"><code>dca6e21</code></a></li>
<li>[Dev Deps] update <code>eslint</code> <a href="https://github.com/ljharb/shell-quote/commit/9aa9e8f60991f8c4053a29e476795d891ff851ad"><code>9aa9e8f</code></a></li>
<li>[Fix] <code>parse</code>: finalize tokens in linear time (GHSA-395f-4hp3-45gv) <a href="https://github.com/ljharb/shell-quote/commit/7ff5488599d01c323514f02f5efb74088dd134ec"><code>7ff5488</code></a></li>
<li>[actions] update workflows <a href="https://github.com/ljharb/shell-quote/commit/75e849741ffaf2d3aa53ae0e18ef6bf9929ef478"><code>75e8497</code></a></li>
<li>[actions] Windows + node 4/6/7: pin eslint to 9 before install, since npm 2/3 cannot stage eslint 10<code>types/esrecurse</code> <a href="https://github.com/ljharb/shell-quote/commit/3fb739de44b81c69431947d54fbfc18998dd6d72"><code>3fb739d</code></a></li>
<li>[actions] retry <code>npm install</code> on Windows to survive npm 2/3 staging-rename flake <a href="https://github.com/ljharb/shell-quote/commit/abe0163293c82963fa8a16cfaa87181846d5aced"><code>abe0163</code></a></li>
<li>[actions] Windows + node 5/7: install deps with a modern node <a href="https://github.com/ljharb/shell-quote/commit/b4bafa2e7e58d53d9839b1c24976f61e54b43326"><code>b4bafa2</code></a></li>
<li>[Fix] <code>quote</code>: escape leading <code>~</code> to prevent shell tilde-expansion <a href="https://github.com/ljharb/shell-quote/commit/7a76c1a12d8461c2234a1c655b943cee84cbff91"><code>7a76c1a</code></a></li>
<li>[Dev Deps] update <code>auto-changelog</code>, <code>tape</code> <a href="https://github.com/ljharb/shell-quote/commit/7184b4458b65c17b931e126d8cb5f586c6717dc8"><code>7184b44</code></a></li>
<li>[Dev Deps] apparently <code>jackspeak</code> is no longer in the graph <a href="https://github.com/ljharb/shell-quote/commit/9ba368a4057b9f498b0fef23b5b15543ef81b98c"><code>9ba368a</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/ljharb/shell-quote/commit/64988d9a0e73a2ae710488952e3614958ef289d4"><code>64988d9</code></a> v1.10.0</li>
<li><a href="https://github.com/ljharb/shell-quote/commit/617d119795c7b44d6e49a4d41f80195c4aa5735c"><code>617d119</code></a> [Tests] <code>quote</code>: the tilde test escapes every <code>~</code>, not just a leading one (<a href="https://redirect.github.com/ljharb/shell-quote/issues/9">https://github.com/facebookincubator/cinderx/issues/9</a>)</li>
<li><a href="https://github.com/ljharb/shell-quote/commit/59bbf8b81bf3236842deb72805744d489f650eba"><code>59bbf8b</code></a> [types] fix an error TS v6 ignores but v7 fails on</li>
<li><a href="https://github.com/ljharb/shell-quote/commit/190e236bcf1d81caa8e40e8ea3bb11998575be71"><code>190e236</code></a> [Tests] <code>quote</code>: pin that a backslash with whitespace is not doubled in singl...</li>
<li><a href="https://github.com/ljharb/shell-quote/commit/a04d47516e1cd5b1b4d3f720ddf97561ed0082fc"><code>a04d475</code></a> [Dev Deps] update <code>arethetypeswrong/cli</code>, <code>evalmd</code></li>
<li><a href="https://github.com/ljharb/shell-quote/commit/b9545b39f4de17aa169410823c98acf58387e474"><code>b9545b3</code></a> [New] <code>parse</code>: add opt-in <code>splitUnquoted</code> option for shell field-splitting of...</li>
<li><a href="https://github.com/ljharb/shell-quote/commit/1b364683b1e9e8d078fd3017cde82cf10c9c04a5"><code>1b36468</code></a> [readme] <code>quote</code>: use output verbatim; do not re-quote it (<a href="https://redirect.github.com/ljharb/shell-quote/issues/11">https://github.com/facebookincubator/cinderx/issues/11</a>)</li>
<li><a href="https://github.com/ljharb/shell-quote/commit/1c36f3ff77d26d200620c1027e5c271050120b8e"><code>1c36f3f</code></a> [Tests] <code>quote</code>: pin conservative escaping of <code>=</code>, <code>@</code>, <code>^</code>, <code>,</code>, <code>:</code>, <code>!</code> (<a href="https://redirect.github.com/ljharb/shell-quote/issues/11">https://github.com/facebookincubator/cinderx/issues/11</a>)</li>
<li><a href="https://github.com/ljharb/shell-quote/commit/e1c75cd6e4a3c60003792c7f2802587d328622cb"><code>e1c75cd</code></a> [readme] document <code>parse</code>'s supported parameter-expansion subset</li>
<li><a href="https://github.com/ljharb/shell-quote/commit/c0842c8a7a034066da2496a75e91cbe500ff736c"><code>c0842c8</code></a> [Fix] <code>parse</code>: match nested <code>${...}</code> braces so nested parameter expansion is ...</li>
<li>Additional commits viewable in <a href="https://github.com/ljharb/shell-quote/compare/v1.8.4...v1.10.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=shell-quote&package-manager=npm_and_yarn&previous-version=1.8.4&new-version=1.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/cinderx/network/alerts).

</details>

Pull Request resolved: #135

Reviewed By: yoney

Differential Revision: D113770031

Pulled By: alrobichaud

fbshipit-source-id: 16137d7b97a423d93c261b54a5c6166ced2df168
Summary:
Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.20.5 to 1.20.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/expressjs/body-parser/releases">body-parser's releases</a>.</em></p>
<blockquote>
<h2>1.20.6</h2>
<h2>Important: Security</h2>
<ul>
<li>Security fix for <a href="https://www.cve.org/CVERecord?id=CVE-2025-13466">CVE-2026-12590</a> (<a href="https://github.com/expressjs/body-parser/security/advisories/GHSA-v422-hmwv-36x6">GHSA-v422-hmwv-36x6</a>)</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>fix: improve limit option validation by <a href="https://github.com/Phillip9587"><code>@​Phillip9587</code></a> in <a href="https://redirect.github.com/expressjs/body-parser/pull/741">expressjs/body-parser#741</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/expressjs/body-parser/compare/1.20.5...1.20.6">https://github.com/expressjs/body-parser/compare/1.20.5...1.20.6</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/expressjs/body-parser/blob/master/HISTORY.md">body-parser's changelog</a>.</em></p>
<blockquote>
<h1>1.20.6 / 2026-07-09</h1>
<ul>
<li>Security fix for <a href="https://github.com/expressjs/body-parser/security/advisories/GHSA-v422-hmwv-36x6">GHSA-v422-hmwv-36x6</a></li>
<li>fix: improve <code>limit</code> option validation (<a href="https://redirect.github.com/expressjs/body-parser/issues/698">#698</a>)
<ul>
<li>Invalid <code>limit</code> values (e.g. unparseable strings or <code>NaN</code>) now throw instead of being silently ignored, which previously disabled size limit enforcement</li>
<li><code>null</code> and <code>undefined</code> fall back to the default 100kb limit</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/expressjs/body-parser/commit/5cc4fb8867c93a3aa4455927e38858c9ab89ff43"><code>5cc4fb8</code></a> 1.20.6 (<a href="https://redirect.github.com/expressjs/body-parser/issues/746">#746</a>)</li>
<li><a href="https://github.com/expressjs/body-parser/commit/3492672eee593d5c158f239b6e9115498a5dbeac"><code>3492672</code></a> fix: improve limit option validation (<a href="https://redirect.github.com/expressjs/body-parser/issues/741">#741</a>)</li>
<li>See full diff in <a href="https://github.com/expressjs/body-parser/compare/1.20.5...1.20.6">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=body-parser&package-manager=npm_and_yarn&previous-version=1.20.5&new-version=1.20.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/cinderx/network/alerts).

</details>

Pull Request resolved: #136

Reviewed By: yoney

Differential Revision: D113770163

Pulled By: alrobichaud

fbshipit-source-id: 38407b2cb05be241f97a138af8487ee8537f1970
Summary: Add a Yarn resolution for `brace-expansion` 5.0.8, replacing vulnerable transitive versions pulled in by Docusaurus dependencies. Regenerate `yarn.lock` and add the package to fbsource’s Yarn offline mirror.

Reviewed By: alexmalyshev

Differential Revision: D113917444

fbshipit-source-id: 1054fb4894ebddbd7662cb189e0dd3f2c89a0cc2
Summary: Free-threaded builds use safe runtime calls instead of direct list-slot access.

Reviewed By: alexmalyshev

Differential Revision: D113913262

fbshipit-source-id: d1c4e01797a0f81b02f3ec5ada2cf8d40be4bd76
Summary:
Prep work for tracking a per-list element count in `IntrusiveList`.  Today
`Instr` mutates its block's instruction list directly through raw
`IntrusiveListNode` operations (`Instr::unlink/insertBefore/insertAfter/
replaceWith/expandInto` all poke `block_node_`), which bypasses the owning
`IntrusiveList`.  That makes it impossible for the list to maintain its own
size.

Move those operations onto `BasicBlock`, where they route through the `instrs_`
`IntrusiveList`.  New `BasicBlock` methods:
  * `remove(Instr& instr)`
  * `insertBefore(Instr& existing, Instr& new_instr)`
  * `insertAfter(Instr& existing, Instr& new_instr)`
  * `replace(Instr& existing, Instr& new_instr)`
  * `expand(Instr& existing, std::span<Instr*> expansion)`

`IntrusiveList` gains a `remove(reference)` so removal has a single path
through the list (the hook a future `size_` field will update).

This is a pure refactor with no behavior change; the `size_` field is a
follow-up.

Reviewed By: yoney

Differential Revision: D112614066

fbshipit-source-id: 40bc841e018fabc0d11e4c3132c867d27d1d75c5
Summary:
D113272094 switched `logImplV` in `Common/log.cpp` from
`jit::ThreadedCompileSerialize` to a raw `static std::mutex` +
`std::lock_guard`, and dropped `#include "cinderx/Jit/threaded_compile.h"`
(which had been pulling in `<mutex>` transitively) -- but did not add a direct
`#include <mutex>`.

Internal Buck and the Linux/macOS GitHub builds still pick up `<mutex>`
transitively through other headers, so they stayed green. The cinderx GitHub
Windows CI (clang-cl + MSVC STL) does not, so every `windows-latest` + Python
3.14 job fails to compile:

  Common/log.cpp: error: no type named 'mutex' in namespace 'std'
  Common/log.cpp: error: no member named 'lock_guard' in namespace 'std'

Add the direct `#include <mutex>` so `std::mutex`/`std::lock_guard` are always
available. This is include-what-you-use correct: the file uses them directly
and should not rely on a transitive include.

Reviewed By: alexmalyshev

Differential Revision: D113917360

fbshipit-source-id: 6aa2c0f80693399763ff011b574ff6a5a1261292
Summary:
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 5.2.5 to 5.2.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/webpack/webpack-dev-server/releases">webpack-dev-server's releases</a>.</em></p>
<blockquote>
<h2>v5.2.6</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p>fix: allow <code>undefined</code> as the <code>Server</code> constructor <code>options</code> argument again (by <a href="https://github.com/bjohansebas"><code>@​bjohansebas</code></a> in <a href="https://redirect.github.com/webpack/webpack-dev-server/pull/5695">#5695</a>)</p>
<p>Restores accepting <code>undefined</code> (defaulting it to <code>{}</code>) for the <code>options</code>
argument, so passing a webpack config's optional <code>devServer</code> field type-checks and works as before.</p>
</li>
<li>
<p>Protect the built-in state-changing routes (<code>/webpack-dev-server/invalidate</code> and <code>/webpack-dev-server/open-editor</code>) against cross-site request forgery. Requests are now checked with <code>Sec-Fetch-Site</code> (falling back to an <code>Origin</code>/<code>Host</code> comparison when it is absent), so a cross-site page can no longer trigger a rebuild or open a file in the editor. Same-origin requests, user-initiated navigations, and non-browser clients (e.g. curl) are unaffected. (by <a href="https://github.com/bjohansebas"><code>@​bjohansebas</code></a> in <a href="https://redirect.github.com/webpack/webpack-dev-server/pull/5698">#5698</a>)</p>
</li>
<li>
<p>Handle malformed <code>Host</code> and <code>Origin</code> header values gracefully when validating requests. (by <a href="https://github.com/bjohansebas"><code>@​bjohansebas</code></a> in <a href="https://redirect.github.com/webpack/webpack-dev-server/pull/5699">#5699</a>)</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/webpack/webpack-dev-server/blob/v5.2.6/CHANGELOG.md">webpack-dev-server's changelog</a>.</em></p>
<blockquote>
<h2>5.2.6</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p>fix: allow <code>undefined</code> as the <code>Server</code> constructor <code>options</code> argument again (by <a href="https://github.com/bjohansebas"><code>@​bjohansebas</code></a> in <a href="https://redirect.github.com/webpack/webpack-dev-server/pull/5695">#5695</a>)</p>
<p>Restores accepting <code>undefined</code> (defaulting it to <code>{}</code>) for the <code>options</code>
argument, so passing a webpack config's optional <code>devServer</code> field type-checks and works as before.</p>
</li>
<li>
<p>Protect the built-in state-changing routes (<code>/webpack-dev-server/invalidate</code> and <code>/webpack-dev-server/open-editor</code>) against cross-site request forgery. Requests are now checked with <code>Sec-Fetch-Site</code> (falling back to an <code>Origin</code>/<code>Host</code> comparison when it is absent), so a cross-site page can no longer trigger a rebuild or open a file in the editor. Same-origin requests, user-initiated navigations, and non-browser clients (e.g. curl) are unaffected. (by <a href="https://github.com/bjohansebas"><code>@​bjohansebas</code></a> in <a href="https://redirect.github.com/webpack/webpack-dev-server/pull/5698">#5698</a>)</p>
</li>
<li>
<p>Handle malformed <code>Host</code> and <code>Origin</code> header values gracefully when validating requests. (by <a href="https://github.com/bjohansebas"><code>@​bjohansebas</code></a> in <a href="https://redirect.github.com/webpack/webpack-dev-server/pull/5699">#5699</a>)</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/webpack/webpack-dev-server/commit/8a37b0ed89d07ca81532188fe19f080a2ee51475"><code>8a37b0e</code></a> chore(release): new release (<a href="https://redirect.github.com/webpack/webpack-dev-server/issues/5697">#5697</a>)</li>
<li><a href="https://github.com/webpack/webpack-dev-server/commit/f21ed0f44aceb6132abb591ee8b60d770b6e489f"><code>f21ed0f</code></a> fix: handle malformed Host and Origin headers (<a href="https://redirect.github.com/webpack/webpack-dev-server/issues/5699">#5699</a>)</li>
<li><a href="https://github.com/webpack/webpack-dev-server/commit/80cd9eea54975fe632a518d8bd902a260f374e7c"><code>80cd9ee</code></a> fix: reject cross-site requests to open-editor and invalidate endpoints (<a href="https://redirect.github.com/webpack/webpack-dev-server/issues/5698">#5698</a>)</li>
<li><a href="https://github.com/webpack/webpack-dev-server/commit/308e853808fc8f5d0722276e1a87aa73c91859a5"><code>308e853</code></a> fix: handle undefined options in Server constructor (<a href="https://redirect.github.com/webpack/webpack-dev-server/issues/5695">#5695</a>)</li>
<li><a href="https://github.com/webpack/webpack-dev-server/commit/8b2b9151f41e0d6157c8bd051cf5f16bce5dba17"><code>8b2b915</code></a> chore: update branch references from v4 to v5 in workflow configuration</li>
<li><a href="https://github.com/webpack/webpack-dev-server/commit/870ed2258dda612c8feeaf8d971afd08233696ad"><code>870ed22</code></a> chore: add v5 branch to release workflow triggers</li>
<li>See full diff in <a href="https://github.com/webpack/webpack-dev-server/compare/v5.2.5...v5.2.6">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=webpack-dev-server&package-manager=npm_and_yarn&previous-version=5.2.5&new-version=5.2.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/cinderx/network/alerts).

</details>

Pull Request resolved: #137

Reviewed By: yoney

Differential Revision: D113770326

Pulled By: alrobichaud

fbshipit-source-id: aad91e7f5cbc7759ac1cc3c5064277c19f098ce0
Summary: Update RuntimeTests to identify free-threaded Python builds with the 3.14t suffix when selecting and updating HIR expectations. Add dedicated expectations for eight HIRBuilderStaticTest cases while preserving the existing Python 3.14 expectations. Runtime assertion failures in the remaining four tests are unchanged and out of scope.

Reviewed By: alexmalyshev

Differential Revision: D113893113

fbshipit-source-id: 003dea13de508da1cc02f0743f4624d191a863bf
Summary:
Bumps [svgo](https://github.com/svg/svgo) from 3.3.3 to 3.3.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/svg/svgo/releases">svgo's releases</a>.</em></p>
<blockquote>
<h2>v3.3.4</h2>
<h2>What's Changed</h2>
<h3>Security</h3>
<ul>
<li><a href="https://svgo.dev/docs/plugins/removeScripts/">removeScriptElement</a>, remove JavaScript URIs case-insensitively and make <code>&lt;script&gt;</code> handling namespace aware. By <a href="https://github.com/SethFalco"><code>@​SethFalco</code></a></li>
</ul>
<h2>Support</h2>
<p>SVGO v3 is not officially supported, please consider upgrading to SVGO v4 instead. We've backported this fix as there are security implications, but there is no commitment to do this for more complex changes in future.</p>
<p>Consider reading our <a href="https://svgo.dev/docs/migrations/migration-from-v3-to-v4/">Migration Guide from v3 to v4</a> which should ease the process.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/svg/svgo/commit/72a23886b4698b27624b936f3a15a80afd36d75f"><code>72a2388</code></a> Merge commit from fork</li>
<li>See full diff in <a href="https://github.com/svg/svgo/compare/v3.3.3...v3.3.4">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=svgo&package-manager=npm_and_yarn&previous-version=3.3.3&new-version=3.3.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/cinderx/network/alerts).

</details>

Pull Request resolved: #131

Reviewed By: yoney

Differential Revision: D113572168

Pulled By: DinoV

fbshipit-source-id: e20789eee44e520c71ab8856f3025db4e1a4c588
Summary:
Give `IntrusiveList` a `size_` counter, maintained by every container mutation.

To guarantee the counter can never silently drift, enforce at the type level
that all membership changes go through the container: `IntrusiveListNode`'s
`setPrev`/`setNext`/`insertBefore`/`insertAfter`/`unlink` are private, with
`IntrusiveList` as a friend.  Only the read-only `prev()`/`next()`/`isLinked()`
accessors stay public (the iterator and callers still need them).

The one place that mutated nodes directly was `copy_graph.cpp`, which unlinked
`CopyGraph::Node`s from their `children`/`leaf_nodes_` lists via raw
`node.unlink()`.  Route those through the container.

With the earlier removal of the cached node-member offset, `IntrusiveList` is
back to 3 pointers, so the `sizeof` `static_assert`s for `Function`/`CFG`/
`BasicBlock` return to their original values.

Use the counter to cheapen HIR CFG size queries:
  * `CFG::numBlocks()`  O(blocks)          -> O(1)   (`blocks.size()`)
  * `CFG::numInstrs()`  O(blocks + instrs) -> O(blocks) (sums each block's
    O(1) `BasicBlock::size()`)

These feed `checkHirSize()`, which gates JIT compilation on oversized HIR.

Reviewed By: kddnewton

Differential Revision: D112614112

fbshipit-source-id: 0744adc7748e56de96dbc313f04ce8fffa34d807
Summary: Rename the conflicting local variable.

Reviewed By: alexmalyshev

Differential Revision: D113950530

fbshipit-source-id: 48ef87c772b0657e5571fc62edad2c2ab89b7342
Summary: Add dedicated Python 3.14t expectations for HIR inliner cases.

Reviewed By: alexmalyshev

Differential Revision: D113893763

fbshipit-source-id: 2f3f70bc736b6a2d076ac949f959b99f6019c91a
Summary:
Construct the per-instruction `CopyGraphWithOperand` on the stack. This removes
one heap allocation and deletion per LIR instruction while preserving the same
copy processing.

Reviewed By: martindemello

Differential Revision: D113938668

fbshipit-source-id: e23b8ad038e85d62d594dee67ba6d1325a1cf3d1
Summary: Add dedicated Python 3.14t HIR expectations for all 14 AllPassesTest cases.

Reviewed By: alexmalyshev

Differential Revision: D113894355

fbshipit-source-id: c36460ab1e2b9ba45a317aef072890fc5cfdc3ff
Summary: Add dedicated Python 3.14t HIR expectations for all 132 SimplifyTest cases.

Reviewed By: alexmalyshev

Differential Revision: D113895188

fbshipit-source-id: dcd54a2dfa8cbbfb3c04ba98c58ea060b34371a5
Summary:
Adds `SpillAllocator`, a deliberately naive register allocator that spills every
virtual register to its own stack slot, and makes the register allocator
selectable from the command line / environment.  It's meant for testing and
isolating the rest of the JIT pipeline from the optimizing linear scan
allocator.

Configuration:

- New `-X cinderx-jit-reg-alloc=<linear-scan|spill>` option (and
  `CINDERX_JIT_REG_ALLOC` env var), parsed in `pyjit.cpp` into a new
  `RegAllocKind` config enum.  The default is `linear-scan`.  Any other value
  raises a `ValueError` during CinderX initialization.

- `gen_asm.cpp` selects the allocator through the `RegisterAllocator` interface
  based on `getConfig().reg_alloc`.

SpillAllocator (`cinderx/Jit/lir/spill_alloc.{cpp,h}`, new `:spill-alloc`
library):
- Gives every vreg a home stack slot it keeps for the whole function, so a
  value defined in one block and used in another is just re-read from the same
  slot -- no live intervals, interval splitting, or cross-block location
  bookkeeping.

- Rewrites each instruction to refer only to physical locations, loading
  operands that must be in registers (per `getInputPhyRegUse` /
  `getOutputPhyRegUse`) into caller-save scratch registers around the
  instruction and leaving everything else in its slot.

- Lowers phis to copies on the incoming edges (phi-output slots are unique, so
  no critical-edge splitting is needed) and strips the `kReturn` /
  `kBranchToYieldExit` pseudo-terminators for PostRegAllocRewrite.

- Handles `kBind` (store the bound register into the slot), calls (operands
  stay in slots; PostRegAllocRewrite applies the calling convention), and
  read-modify-write `kInc`/`kDec`.

- Because nothing is ever live in a register across an instruction boundary,
  caller-save registers are always free at calls and no callee-saved register
  is ever clobbered.

Generators and coroutines are supported.  A generator runs with the frame
pointer swapped between the machine stack and a heap-allocated generator frame,
so a value produced on one side of a `Move` into the frame-pointer register but
read on the other is stale once spilled.  `handleFramePointerSwitch` carries
those values across the switch in a register: the frame-setup call's result on
the forward switch (stack -> heap), and the return-value exit phi on the
reverse switch (heap -> stack, including the extra deferred-refcount step on
free-threaded builds).

Reviewed By: DinoV

Differential Revision: D112574130

fbshipit-source-id: 06c4c72bd9ebc3480dcd67533cd13071e190d940
Summary: Add dedicated Python 3.14t HIR expectations for DeadCodeEliminationAndSimplifyTest cases.

Reviewed By: alexmalyshev

Differential Revision: D114046240

fbshipit-source-id: adfca3027afd5a965d7fe53258b278fa5f4e5376
Summary: Just a refactor, setting up for next diff.

Reviewed By: yoney

Differential Revision: D114023459

fbshipit-source-id: afa2c02876e44ce0f1fc150599f913ccb1b12eee
Summary:
`DataFlowAnalyzer` and the HIR `DataflowAnalysis` hierarchy were two parallel
constructs that both reached into the same `DataFlowBlock` instances, and each
carried its own worklist solver: `DataFlowAnalyzer::runAnalysis` (used only by
the unit test) and the hand-rolled loops in `ForwardDataflowAnalysis` /
`BackwardDataflowAnalysis` (used by production). The two solvers computed
identical math; the only things that varied were the flow direction and the
meet operator (union vs intersection, the latter needing an all-ones seed).

This consolidates everything onto one engine:

- `DataFlowAnalyzer<T>` now owns its blocks via `createBlock()`, holds the sole
  `num_bits_`, and exposes a single solver `solve(Direction, Meet)` that handles
  boundary blocks structurally and top-initializes for intersection. This
  replaces `runAnalysis` and removes the dead `getObjectIndex`, the
  `setEntryBlock` / `setExitBlock` pair (the latter had a copy-paste bug that
  assigned `entry_block_`), and an unused `BitVector` local.

- The HIR side flattens from a 3-level hierarchy to `RegisterAnalysis` plus its
  two concrete subclasses. `ForwardDataflowAnalysis` and
  `BackwardDataflowAnalysis` are gone, along with every `computeNewIn`,
  `computeNewOut`, and `setUninitialized` override. Each analysis now supplies
  only `computeGenKill` and a `(Direction, Meet)` pair: `LivenessAnalysis` is
  `{Backward, Union}`, `AssignmentAnalysis` is `{Forward, Intersect | Union}`.

Public signatures (`run`, `getIn` / `getOut`, constructors) are unchanged, so
the five production consumers need no changes. Also drops the now-unused
`BitVector::addBits`.

The synthetic entry/exit blocks are gone; sources are identified structurally,
relying on the CFG entry block having no predecessors, an invariant the SSA and
dominator passes already assume.

Reviewed By: mpage

Differential Revision: D112888067

fbshipit-source-id: 75fc7f20a9416802a8a11834d6e845bb1f4a282c
Summary: Add dedicated Python 3.14t HIR expectations for all CleanCFGTest cases.

Reviewed By: alexmalyshev

Differential Revision: D114046385

fbshipit-source-id: 4720444a15349ecc7569829750c47c4bea8d68c9
Summary: The free-threaded outputs match the existing 3.14

Reviewed By: alexmalyshev

Differential Revision: D114047024

fbshipit-source-id: 08359f01c8e345fb03bc09b4ff6cf3d1afbdab67
Summary: Prevent small macro conflicts on Windows.

Reviewed By: alexmalyshev

Differential Revision: D114053883

fbshipit-source-id: 3380207969220126ec24ed683a1f25be21543cc5
Summary: Add 3.14t expectations accounting for TagIfDeferred and AtQuiescentState.

Reviewed By: alexmalyshev

Differential Revision: D114047899

fbshipit-source-id: 1fc802fca5c01edac771076fa6f17f6e2ababf42
Summary:
Add heterogeneous `find()` overloads gated by a transparent comparator that
supports both comparison directions. Add reusable `RefLess` and use it for
annotation lookup without constructing an owning `Ref`.

This also renames `TransparentRefHasher` to `RefHasher` because it's shorter.
It's not used anywhere though.

Reviewed By: yoney

Differential Revision: D114023458

fbshipit-source-id: 297a1b2ace14ed75968476e0a59c10a22060aa95
Summary:
Fixes a thread safety issue w/ the preloader. We don't currently keep the global values alive when we run the preloader and then we use them during compilation. These values could potentially be replaced (and be freed). In the free-threaded build we don't do anything to safely read from the global cache but if we keep the strong reference from when we got it then everything's okay.

I suppose ultimately we need to update our global cache usage to do the TryIncref thing, but for the time being this just moves us to going back to the dictionary to get the values which gives us a strong ref as we pull it out so it's safe in the face of multi-threaded compile and free-threaded builds.

Reviewed By: alexmalyshev

Differential Revision: D113510299

fbshipit-source-id: 6b53c2b001526124d1271152ffd9086f919eb3e7
Summary: Add 3.14t expectations accounting for deferred-reference tagging, quiescent states, and free-threaded ownership behavior.

Reviewed By: alexmalyshev

Differential Revision: D114049165

fbshipit-source-id: d138532bc81a68e4d167113390dee773a87faeb1
Differential Revision: D114087553

fbshipit-source-id: f8ca2993338e959d97132a024a9a2ea86a55cb96
Summary: Update HIRBuildTest expected HIR for Python 3.14t builds.

Reviewed By: alexmalyshev

Differential Revision: D114120645

fbshipit-source-id: b8c5b888881b69f908e10d147c4f5e26e30787dd
Summary:
When the JIT compiles a function it stashes a `CompiledFunction` under
`func.__dict__["__cinderx_compiled_func__"]` (and a
`__cinderx_nested_compiled_funcs__` list for nested functions).
`CompiledFunction` is a native type with no reducer, so any pickler that walks a
function's `__dict__` by value, most notably `cloudpickle`, fails with
`TypeError: cannot pickle 'CompiledFunction' object`.

`CompiledFunction` is pure per-process JIT bookkeeping (machine code, native
entry point, `CodeRuntime`).  The underlying `PyFunctionObject` is left intact,
only its `vectorcall` is swapped, so it pickles normally. This adds a
`__reduce__` to the type that reduces it to a call to a new native
`cinderjit._reconstruct_pickled_compiled_function` helper, which returns `None`;
the dropped machine code is regenerated by re-JIT'ing in the destination
process. The reconstructor lives in the native `cinderjit` module so the
reference stays native to native, matching the `cinderx` (Python) over
`cinderjit`/`_cinderx` (native) layering.

Reviewed By: DinoV

Differential Revision: D114123343

fbshipit-source-id: 84e1b15eb642bf48701d4374cf3a574c278f7506
Summary: Here's the big fun change... we can now make our existing multi-threaded compile support work with the GIL. We kick off a multi-threaded compile on the calling thread which stack-allocates a ThreadedCompileContext and we set our thread-local state for thread state, ThreadCompilationContext, and isolated preloaders. We then spin up the worker threads who bind the thread-states to themselves and set their thread locals. The workers then do `Py_BEGIN_ALLOW_THREADS` and call off do the compilation w/o the GIL held. Finally they complete their compile and free up their thread states.

Reviewed By: alexmalyshev

Differential Revision: D113291992

fbshipit-source-id: 8e26a710802e3a780e0d7c2f1fc0d7af35c7b08e
DinoV and others added 30 commits August 24, 2026 11:05
Summary:
`LoadModuleAttrCache` handles module attribute reads at sites where the compiler
already knows the receiver is a module. Where it does not, the JIT emits
`LoadAttrCached`, and `fill()` rejected modules outright -- `module_getattro` is
not `PyObject_GenericGetAttr`, so every such read fell through to a full
`PyObject_GetAttr`. This adds a `kModule` AttributeMutator kind so those sites
specialize once the receiver turns out to be a module.

`ModuleMutator` mirrors `LoadModuleAttrCache`, including its version split:
3.14+ holds a pointer into the interpreter's global cache, 3.12 keeps the value
alongside the dict version it was read at. `getModuleDict` and
`getModuleDictAndAttribute` moved up the file and are reused as-is, so the rules
for what counts as a cacheable module read -- strict modules included, shadowed
names excluded -- stay in one place.

`type_` holds the module's *type*, not the module, and `ModuleMutator` carries
the module pointer for the identity check. Storing the module in `type_` would
have been a smaller struct, but `type_` is load-bearing elsewhere: the general
scan and `invokeUnrolled` match `entry.type()` against `Py_TYPE(obj)`, so such an
entry could never match in a multi-entry cache, and `fill()` hands the same
pointer to `ac_watcher.watch()`, which would then run `PyType_HasFeature` on a
module. Keeping a real type there means the framework guard passes for any
module and `ModuleMutator` adds identity on top, which also degrades gracefully
when a module shares a cache with other receivers.

`kModule` is registered only under `CINDERX_IC_USE_TARGET_PROMOTION`. We
can't support module identity under the old caches.

`AttributeMutator` grows from 24 to 32 bytes on 3.12, where `ModuleMutator` is
the widest union member; 3.14+ is unchanged. A `static_assert` pins the size so
future growth is deliberate.

Reviewed By: alexmalyshev

Differential Revision: D115215696

fbshipit-source-id: ac4c504ec1db5a938c86349b272d08d98e148c8a
Summary:
`LoadTypeAttrCache` handles `SomeClass.attr` where the compiler already knows the
receiver is a type. Where it does not, the JIT emits `LoadAttrCached`, and
`fill()` rejected type objects because `type_getattro` is not
`PyObject_GenericGetAttr`. Every such read ran the full type lookup protocol.
This adds a `kType` `AttributeMutator` kind so those sites specialize once the
receiver turns out to be a type.

The entry is guarded on the class itself rather than on `Py_TYPE(class)`. That
is what makes it cost nothing but the value: `ac_watcher.watch(cls)` plus
`AttributeCache::typeChanged(cls)`, which resets entries by matching
`entry.type()`, is the entire invalidation story. No version tag is stored and no
new bookkeeping is added. `PyType_Modified` recurses into subclasses and fires the
watcher once per visited type, so a value inherited from a base is invalidated
too even though the entry names only the subclass.

The hazard in guarding that way is that such an entry must never be matched
against `Py_TYPE(obj)`, or an *instance* of the cached class would be handed the
class's own attribute. `kAttrIdentityTag` is how an entry says which of the two
it wants: an identity-guarded entry stores `cls | 0x01`, and the guard becomes

```
guard == Py_TYPE(obj) || guard == (obj | kAttrIdentityTag)
```

The two comparisons cannot collide. A receiver and a type are both at least
8-byte aligned, so a tagged word can never equal an untagged `Py_TYPE(obj)`, and
an untagged word can never equal a tagged receiver. Which means the guard stays a
bare compare against the stored word -- nothing is masked off on the hot path --
and the two kinds of entry can sit in one cache and be found by one scan.

That disjointness is what keeps this small. There is no monomorphising step, no
second dispatch target, and no separate scan: `getAttrForKind<kType>` is an
ordinary arm like every other kind, reached the ordinary way.

Codegen emits the second compare for loads only. `fill()` only ever makes an
identity-guarded entry when `!is_set`, so a store cache cannot hold one and would
be paying for a compare that can never fire. The type compare still branches
straight to the hit, so a type-guarded hit is the same compare and branch it was
before; only a miss pays the extra `or`/`cmp`/`branch`.

`fill()` claims a receiver only when its metatype is plain `type`. That is
`lookupTypeAttr`'s own precondition -- it declines anything whose metatype
overrides `tp_getattro` -- so an entry is only made where the cached path can
actually be taken, and it keeps the metatype out of the picture entirely: the
only type an entry depends on is the class it watches.

`lookupTypeAttr` is extracted from `LoadTypeAttrCache::invokeSlowPath` rather
than copied. That function carries an explicit "keep in sync with
`PyType_Type.tp_getattro`" warning, so a second copy is precisely the failure the
warning exists to prevent. Both callers now share it, and the rules for which
reads are cacheable -- found on the type or its bases with no `tp_descr_get`,
plain functions, staticmethods unwrapped to their func, nothing else -- live in
one place. A read that is not cacheable still returns the right answer; it just
leaves the entry's value null, which keeps that class pinned to the lookup
instead of retrying an entry it can never fill.

`TypeMutator` is `{value}`, 8 bytes, against the 16 `SplitMutator` already
needed, so `AttributeMutator` does not grow. A `static_assert` now pins its size
so that adding a fatter sub-mutator is a deliberate act rather than a silent cost
to every other kind.

`kType` is registered only under `CINDERX_IC_USE_TARGET_PROMOTION`, and that
gating is load-bearing rather than tidy: without promotion the Kind itself
occupies the low bits of the type pointer that the identity tag would need.

Reviewed By: alexmalyshev

Differential Revision: D115215700

fbshipit-source-id: c6a8042e2ac8ec9c276def3b7853b24d0444eb2c
Summary: These are just various tweaks to our functions to improve code quality of the generated functions. Some of this is breaking functions out so that the smaller hot paths get inlined. Also dropping use of `Ref<>` in some places where we actually end up generating worse code gen than using manual incref/decref (because we end up with multiple decref code paths generated). And some slower paths we don't want to inline because they bloat the fast path functions.

Reviewed By: alexmalyshev

Differential Revision: D116665916

fbshipit-source-id: d58495017d90023b8cad593df5ae3ba25c7ea400
Summary: This gives us different variations where w have the getattr fallback vs when we don't. This is particularly effective for `	cinderx::jit::DataDescrMutator::getAttr` (.29% of all time spent in IG) because it lets us tail call the tp_descr_get function, so the inline cache variation goes from 37 to 13 instructions on ARM64. This is particularly nice because we get to elide setting up the stack frame because there's no fallback call.

Reviewed By: alexmalyshev

Differential Revision: D116387387

fbshipit-source-id: 2cb728d92f8b003f7ddb23b8926fee32db547c95
Summary: The OSS build enables frame pointers for stack_walk_test.cpp, but walkSelf() can inline into TestBody(), making its first caller GoogleTest code compiled without frame pointers. Add fixture-owned, non-inlined frames around self-walks so the tests reliably exercise the intended behavior.

Reviewed By: DinoV

Differential Revision: D117194593

fbshipit-source-id: 8c01052242a112d96ab764b748def18658908b20
Summary: Construct objects through `Slab::emplace()` and advance the slab only after successful construction.

Reviewed By: alexmalyshev

Differential Revision: D117164666

fbshipit-source-id: 972ed7ca444b8b1cda5425c1665c9de726b82855
Summary:
Annotate SlabArena mutex replacement after fork so TSAN does not retain stale lock state.

ThreadSanitizer: lock-order-inversion (potential deadlock) (/data/users/alperyoney/fbsource4/buck-out/v2/art/fbcode/a57827884e45a11c/cinderx/PythonBin/__python_3.14__/out/install/bin/python3.14+0x14f5b7) (BuildId: c1601a80ad284c5d4541a9a1a8e395e53cee7f3d) in pthread_mutex_lock
==================
```

Reviewed By: DinoV

Differential Revision: D117216746

fbshipit-source-id: d7cf9f7cfa30f6680328f8d35ab29d9306a5a91e
Summary: Add shared reset helpers for standard and recursive mutexes, including their TSAN lifecycle annotations.

Reviewed By: DinoV

Differential Revision: D117217167

fbshipit-source-id: 7df897fc7e61b516d7708c47256108c301b8ec5e
Summary:
Use the shared post-fork mutex reset helper for `CodeAllocatorCinder::allocator_mutex_`, preventing stale TSAN lock state in forked children.

ThreadSanitizer: double lock of a mutex (/data/users/alperyoney/fbsource4/buck-out/v2/art/fbcode/d8949898cc409f58/cinderx/PythonBin/__python_3.14t__/out/install/bin/python3.14t+0x14f5b7) (BuildId: 39d23ade7532494758611f3de2c12e438866310d) in pthread_mutex_lock
==================
```
 ---
```
$ TSAN_OPTIONS="suppressions=$PWD/tsan_suppressions_cpython.txt"   buck run fbcode//mode/dev-tsan fbcode//cinderx:python3.14t -- -m unittest discover PythonLib/test_cinderx/test_free_threading/
```

Reviewed By: DinoV

Differential Revision: D117219846

fbshipit-source-id: 2b6824f942961ba068fbd2f59fa1f7aa38c00540
Summary:
Agents are still too eager to wrap code in `#if defined(CINDER_X86_64)` checks.
Ideally they'd be using `kBuildArch` more.

Reviewed By: yoney

Differential Revision: D117229372

fbshipit-source-id: 89f3bdc221f5579a96daab56014bef8818fa421d
Summary: Removes the HIR opcodes in favor of generating a cached load / store in LIR.

Reviewed By: alexmalyshev

Differential Revision: D116818494

fbshipit-source-id: 34bf7ac83120ecd043bd0745791beda924c3a078
Summary:
The helpers caught one more spot where we were getting this wrong:

```
case hir::Opcode::kGetANext: {
    auto& instr = i.as<GetAIter>();   // was static_cast<const GetAIter*>

```

Reviewed By: alexmalyshev

Differential Revision: D116832505

fbshipit-source-id: 5a46da38335dd6ee5d246f60745f78199096463e
Summary:
Two places track a JIT generator's spill-word count, and only one of them is
real.

`CodeRuntime::spill_words_` is written once per compiled generator at the end of
codegen, from `env_.shadow_frames_and_spill_size`, and read by
`allocateAndLinkGenAndInterpreterFrame()` to size the generator's allocation and
to drive the memcpy that moves already-spilled data off the caller's stack
frame.  That is the right granularity: the spill area is a property of the
compiled code, not of any one generator instance.

`GenDataFooter::spillWords` has no writer anywhere in the tree.  Grepping for it
turns up the declaration, one stale doc comment and one reader.  The footer is a
`reinterpret_cast` over raw memory with fields assigned individually, so the
`size_t spillWords{}` initializer never runs, and neither allocation path zeroes
the body: `JitGenFreeList::allocate()` zeroes only the two GC pre-header words,
and the fallback is `PyObject_GC_NewVar`.

The one reader is `jitgen_sizeof()`, so `gen.__sizeof__()` on a JIT generator
returns uninitialized memory:

```
no jit:   [200, 200, 200, 200, 200, 200]
jit-all:  [1089009172935336, ...]            # ~1 PB
```

The garbage is often pointer-shaped, `0x7b619fdd1e3c` for one generator, and
sometimes small enough to look plausible, `6` for another.

The field is a leftover.  The spill data and footer used to be a separate
`malloc`'d block hung off `gi_jit_data`, and `spillWords` was the only way back
to the base pointer on free:

```
auto gen_data = reinterpret_cast<uint64_t*>(gen_data_footer) -
    gen_data_footer->spillWords;
```

T209500214 rolled that block into the generator object's own variable-length
tail, so nothing needs to recover a base pointer any more.  The writer went away
with the old allocator and only the reader was left behind.  That task is
closed, so its `TASK(...)` comment goes too, along with the base-address comment
that describes the old layout.

So delete the field and have `jitgen_sizeof()` read the count from the same
place the allocator does.  The footer already holds `compiled_func`, and
`jitgen_traverse()` next door already reaches through it to `runtime()`.
`__sizeof__` and the allocation are now guaranteed to agree by construction
rather than by two fields being kept in sync.

The arithmetic itself was already correct and does need a spill count: CPython's
`gen_sizeof()` derives everything from the code object, so it cannot see the JIT
data in the tail.

Removing the field also shrinks `GenDataFooter`, and therefore every JIT
generator, by 8 bytes.

Reviewed By: DinoV

Differential Revision: D117250489

fbshipit-source-id: 6e380212c056676739ad00d74079d783764dcfa3
Summary:
- Add `kLoad` and `kStore` to `FOREACH_LIR_OPCODE_COMMON` in `ops.h`.

- Define their properties in `ops.cpp`: no flag writes, Load is non-essential
  (memory read), Store is essential with memory output, both have Out-sized
  operands.

- Update `instruction.cpp` to treat `Store Ind` like Move for PhyReg use (avoid
  mem->mem).

- Add `translateLoad`/`translateStore` to `autogen.cpp` for x86_64 and AArch64,
  with TSAN read/write handling for x86.

- Keep existing `Move` translation fully memory-capable (old behavior) so this
  diff does not change any existing LIR generation yet.  `Move` still handles
  reg/reg, imm/reg, reg/mem, mem/reg.

Reviewed By: DinoV

Differential Revision: D117215778

fbshipit-source-id: c655c260fb8cdbab3fc2bdc4f482dd62a53fe89d
Summary: Mac doesn't have the semaphore support we want but it does have the ability to reasonable suspend threads. Use that instead on Mac OS/X.

Reviewed By: yoney

Differential Revision: D117274435

fbshipit-source-id: 2beb5bd441b37477449370b48ba9a2d99f3e7fd5
Summary:
Use the shared post-fork mutex reset helper for `CodeAllocator::runtime_mutex_`.

ThreadSanitizer: lock-order-inversion (potential deadlock) (/data/users/alperyoney/fbsource4/buck-out/v2/art/fbcode/d8949898cc409f58/cinderx/PythonBin/__pyth
on_3.14t__/out/install/bin/python3.14t+0x14f5b7) (BuildId: 39d23ade7532494758611f3de2c12e438866310d) in pthread_mutex_lock
==================
ThreadSanitizer: reported 1 warnings
```

Reviewed By: mpage

Differential Revision: D117366380

fbshipit-source-id: 7d80a70de6bcbcf4910d8fbdeaef3c63b4c60392
Summary:
`createConfig()` translates each `hir_opts` flag into its `PassConfig` bit, and
it covers every field of `HIROptimizations` except `dead_code_elim`.  So the
`DeadCodeElimination` pass in `Compiler::runPasses` never runs.

Wire the flag up.  On its own this is performance-neutral on
`cinderx/benchmarks:inference_pipeline`, since refcount insertion runs its own
`DeadCodeElimination` at the end of `bindGuards` and that already sweeps up most
of what the pipeline pass would have.  We should still have the flag working
though.

Reviewed By: DinoV

Differential Revision: D117381498

fbshipit-source-id: 8f020c2fc3b1dd56d845e97904201e6b812b76c3
Summary:
Convert all existing memory-based usages of `Move` to explicit `Load`/`Store`.
`Move` can still act as a load or a store, for temporary compatibility.

- `generator.cpp/h`: All `OutInd`/`OutStk` stores and `Ind`/`Stk`/`MemImm` loads
  become `Store`/`Load`.

- `postalloc.cpp`: `insertMoveToMemoryLocation` now emits Store/Load, call arg
  rewriting (`rewriteRegularFunction` SysV+Win32, `rewriteVectorCallCommon`,
  `rewriteVectorCallTstateFunctions`) directly emits `Load` for Stack inputs
  with lastUse propagation instead of Move+rewrite, `rewriteBitExtensionInstrs`
  Stack->Load, and `optimizeMoveSequence` fixed to set opcode to `kMove` when
  replacing `Load mem->reg` with reg->reg move and to correctly handle
  self-reload.

- `target_select.cpp`: `selectX64MoveToMemoryLargeConstant` supports Store,
  AArch64 stack legalization uses Load, IncDec legalization uses Store.

- `spill_alloc.cpp`: spill loads -> Load, spill stores/Bind/phi copies ->
  Store, `loadToScratch` -> Load.

- `linear_scan.cpp`: edge copies pick Move vs Load vs Store based on
  from/to register/stack.

- `postgen.cpp`: `rewriteGuardHasType` Move -> Load, `rewriteMoveAbsoluteAddress`
  Move Mem -> Load when original was Move (keeps MoveRelaxed), stack
  lowering and call input lowering -> Load.

- `c_helper_translations.cpp`: inlined `rt::cast` LIR string `Move [%` ->
  `Load [%`.

- `backend_test.cpp`: FP `Move Ind` -> `Load Ind`, `Move OutStk/OutInd` ->
  `Store`, `Move Stk` -> `Load`, `MoveSequenceOpt` tests updated to expect
  Store/Load, `InlineJITRTCastTest`/`PostgenJITRTCastTest` expected `Load`.

- `lir_inliner_test.cpp`: `Move Ind` -> `Load Ind`.

- `lir_test.cpp`: `ListDynamicIndexLoadStoreUsesScaledArrayLIR` regex
  updated from Move to Load/Store (generator now emits Load/Store).

Reviewed By: DinoV

Differential Revision: D117215776

fbshipit-source-id: 50bf459552410b502f3f9b7fff3caae3d2ac91f4
Summary:
Agents are still very eager to use `JIT_CHECK` and `JIT_ABORT`.  I'd like to
start pushing them towards raising C++ exceptions instead, which we can recover
from.

Reviewed By: yoney

Differential Revision: D117412143

fbshipit-source-id: 368e4f730009668ecc2ba7e3245b8c2336c254fb
Summary: Given that D117274435 added support for thread suspension we may as well add Windows support for completeness because we can do the same thing there.

Reviewed By: yoney

Differential Revision: D117429654

fbshipit-source-id: 417487c445e7e5ce25bab566ff2e936781064094
Summary:
`emitLoadGlobal` currently follows every `LoadGlobalCached` with a `GuardIs`
against the value seen at compile time.  The cache cell already tracks
rebinding, so the load itself is always correct; the `GuardIs` exists so the
rest of the compiler can treat the global as a constant, which is what enables
inlining and devirtualization.

That trade is good for functions, classes and modules, which are rebound
approximately never.  It is bad for mutable data.  Pinning a `bool` flag or an
`int` counter costs a deopt on every reassignment, and module-level flags
toggled by a context manager are a common Python idiom.  CPython does not have
this problem: `LOAD_GLOBAL_MODULE` caches the dict index and re-reads
`me_value`, guarding only on `keys->dk_version`, which a reassignment does not
touch.

So pin the value only when it is a function, a C function, a type, a module or a
strict module.  Otherwise emit a plain `Guard` for the unbound case, then a
`GuardType` on the value's exact type.

Two details worth calling out, both of which the existing tests caught.

The type guard is not incidental.  Dropping the pin entirely regressed three
RuntimeTests, and each was a genuine loss: pinning a `list` global is what turns
`len(g)` and `IsTruthy` into a `LoadField` of `ob_size`, and pinning an instance
global is what enables the split-dict `LoadAttr` specialization.  Those rewrites
key off the type, not the identity, so guarding the type keeps them while still
surviving rebinding: reassigning a flag or a counter does not change its type.

The unbound case must be a `Guard` and not a `CheckVar`.  `CheckVar` deopts with
`DeoptReason::kUnhandledUnboundLocal`, which makes the runtime raise
`UnboundLocalError`; a global needs `NameError`.  A plain `Guard` deopts with
`kGuardFailure` and lets the interpreter re-run `LOAD_GLOBAL`, which raises the
right error, matching what the `GuardIs` path already did.
`test_preload_side_effect_makes_globals_unwatchable` fails with `CheckVar`.

Reviewed By: DinoV

Differential Revision: D116878533

fbshipit-source-id: d5cad1fdab5d2cf08f71dd75b437550e1f88a3ea
Summary: Replace duplicated op-name lookup loops with a helper.

Reviewed By: alexmalyshev

Differential Revision: D117542961

fbshipit-source-id: e2ffdb9a960204cb9c870f9c248ffc8a9aa71d07
Summary:
The logic to simplify `CondBranch X, B1, B1` down to `Branch B1` is only everrun
as a dedicated pass over the CFG in mergeLinearBlocks().  This is done every
time a round of mergeLinearBlocksOnce() is kicked off.

Tweak this to run the logic for every block being processed by
mergeLinearBlocksOnce(), so that each round only does one CFG scan instead of
two.

Reviewed By: DinoV

Differential Revision: D117225882

fbshipit-source-id: beb6edfd87b905f70efd1f2726c5b031bdce5fe2
Summary:
Our internal testing systems don't appreciate skipped tests, so whenever we use
GTEST_SKIP() it'll cause us problems.

Create a wrapper over the macro that only applies for internal builds.  External
builds should use GTEST_SKIP() like usual.

Reviewed By: yoney

Differential Revision: D117545655

fbshipit-source-id: dd0075095fea67fffca06a77e3154c449d4b2758
Summary: Add the direct <signal.h> include needed for POSIX signal APIs used by SpinningThread, fixing undeclared sigemptyset and sigaddset errors on macOS OSS builds.

Reviewed By: alexmalyshev

Differential Revision: D117600694

fbshipit-source-id: 417efeb7479cd17bbfa56feef4ffba26362a6d09
Summary: Broken with the new Load/Store changes.

Reviewed By: yoney

Differential Revision: D117619042

fbshipit-source-id: e2193f1e7c8d7e027ee6529d397bc32791754421
Summary:
Remove memory support from `Move` so it only handles register-to-register and
immediate-to-register.  `MoveRelaxed` is left untouched.

- `autogen.cpp`: `translateMove` now checks output is Reg and input is Reg/Imm
  (plus VecD handling) and aborts with clear message suggesting `Load`/`Store`
  for memory.  Includes both x86_64 inline path and AArch64 helper.
  `MoveRelaxed` keeps full memory-capable path via shared Load/Store logic
  (relaxed atomics).  `Load`/`Store` translation already added in diff 1 and
  remains.

- `lir_abi_test.cpp`: Tests that previously exercised `Move` with memory
  (`TestkMove_OutPhyReg_Mem`, `Mem_PhyReg`, `Mem_Imm`, `Mem_FPPhyReg`,
  `OutFPPhyReg_Mem`) are updated to `TestkLoad`/`TestkStore` with correct
  opcodes.

- `lir_test.cpp`: Parser tests `ParserDataTypeTest`, `ParserSectionTest` `Move
  [0x5]` -> `Load [0x5]`, `ParserMemIndTest` converts memory Moves to Load and
  mem->mem Move to `Store`, plus `ListDynamicIndexLoadStoreUsesScaledArrayLIR`
  already updated in diff 2 to expect Load/Store.

Reviewed By: DinoV

Differential Revision: D117215777

fbshipit-source-id: a1fb32eee3afdf295ce035b22b73e7afd23b8535
Reviewed By: alexmalyshev

Differential Revision: D117623552

fbshipit-source-id: d3177b5ecfb4458a31ddb2bdcf92eeeec44671c1
Reviewed By: alexmalyshev

Differential Revision: D117634471

fbshipit-source-id: f7216b40c654ded72e83ccec9f2787a38f4f0d4c
Reviewed By: alexmalyshev

Differential Revision: D117653503

fbshipit-source-id: 1bbae5812cebf45192ccdf11f9244fca637b02aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants