Skip to content

Conversation

@igogo-x86
Copy link

color_block_initialize() biases each live-in toward the phys reg that its processed predecessors already use by adding weight to every other phys reg in the shared penalty vector. When multiple live-ins reuse that vector but their predecessors chose different phys regs, those penalties contradict each other. The resulting vector no longer corresponds to any of the prior assignments, so the allocator picks a register based on whatever mix of penalties remains, and we emit edge copies to fix the mismatches (while also pushing the wrong hint backward).
Detect conflicting consensus assignments and clone the penalty vector on the spot so each live-in keeps its own bias/undo bookkeeping.

color_block_initialize() biases each live-in toward the phys reg that its
processed predecessors already use by adding weight to every *other* phys reg
in the shared penalty vector. When multiple live-ins reuse that vector but
their predecessors chose different phys regs, those penalties contradict each
other. The resulting vector no longer corresponds to any of the prior
assignments, so the allocator picks a register based on whatever mix of
penalties remains, and we emit edge copies to fix the mismatches (while also
pushing the wrong hint backward).
Detect conflicting consensus assignments and clone the penalty vector on the
spot so each live-in keeps its own bias/undo bookkeeping.
@meta-cla meta-cla bot added the CLA Signed label Dec 5, 2025
@meta-codesync
Copy link

meta-codesync bot commented Dec 5, 2025

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D88480438. (Because this pull request was imported automatically, there will not be any future comments.)

@meteorfox
Copy link

meteorfox commented Dec 10, 2025

Thanks again for the PR!

This one triggers an assertion

Assertion failure: fbcode/hphp/runtime/vm/jit/vasm-graph-color.cpp:11212: void HPHP::jit::(anonymous namespace)::assign_colors(State &): assertion `v[r] == 0' failed.

We also get SIGABRT crashes (e.g Process terminated by the signal: 6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants