Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix string.char() recording with no arguments.
(cherry picked from commit dfa692b) `string.char()` call without arguments yields an empty string. JIT recording machinery doesn’t handle this case. Each recording of a fast function expects 1 result by default. Hence, when return from this call is recorded, some garbage value is considered as a result to be yielded. It is loaded from the corresponding slot as an IR with `IRT_NUM` type. It leads to assertion failure in `rec_check_slots()`, when a next bytecode is recorded, because type of TValue on the stack (`LJ_STR`) isn't the same as IR (and TRef) type. This patch handles the case without arguments by the loading of IR with empty string reference as a result value. Sergey Kaplun: * added the description and the test for the problem Resolves tarantool/tarantool#6371 Part of tarantool/tarantool#6548 Reviewed-by: Sergey Ostanevich <sergos@tarantool.org> Reviewed-by: Igor Munkin <imun@tarantool.org> Signed-off-by: Igor Munkin <imun@tarantool.org>
- Loading branch information