[PATCH] D122582: StackMap: Fix assertion on undef operands for anyregc
Denis Antrushin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 28 08:42:19 PDT 2022
dantrushin added a comment.
StackMap contents is opaque for compiler and is interpreted by runtime. With your change, relocating garbage collector can get some garbage in register and try to relocate (move) it. This will result in immediate crash.
Also, StackMap can encode operand types in it. Suddenly changing operand size from `.quad` to `.long` might also break runtime's invariants.
I think proper fix would be to add parameter to `StackMaps::parseOperand()` which will tell if replacement of undef is legal or not. For call arguments is should be `false` while for variable part it must be `true`.
(And then `StackMaps::recordPatchPoint()` in case of `anycc` convention will have to split call to `recordStackMapOpers` into two calls - one for call arguments and second for variable arguments)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122582/new/
https://reviews.llvm.org/D122582
More information about the llvm-commits
mailing list