Integrated: JDK-8310020: MacroAssembler::call_VM(_leaf) doesn't consistently check for conflict with C calling convention.
Damon Fenacci
duke at openjdk.org
Tue Jun 20 07:44:15 UTC 2023
On Wed, 14 Jun 2023 14:12:12 GMT, Damon Fenacci <duke at openjdk.org> wrote:
> # Issue
> The `MacroAssembler::call_VM` and `MacroAssembler::call_VM_leaf` methods don't include asserts to check if the passed arguments collide with the C calling convention registers **consistently**. Some versions omit them completely (e.g. aarch64 `MacroAssembler::call_VM_leaf`), other ones use regular asserts (where the `assert_different_registers` function should be used).
>
> # Solution
> We use `assert_different_registers` across all `MacroAssembler::call_VM` and `MacroAssembler::call_VM_leaf` where a check is needed (except for the arm implementation, which doesn't change as it uses fixed registers).
>
> # Testing
> This fix includes changes for x86_32/64 and aarch64, which I could test thoroughly but also for **ppc,** **riscv**, and **s390** for which I would **need some help with testing**.
This pull request has now been integrated.
Changeset: 08788728
Author: Damon Fenacci <damon.fenacci at oracle.com>
Committer: Amit Kumar <amitkumar at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/087887286d575107c076605e1027b553939c3836
Stats: 117 lines in 5 files changed: 27 ins; 45 del; 45 mod
8310020: MacroAssembler::call_VM(_leaf) doesn't consistently check for conflict with C calling convention.
Reviewed-by: thartmann, fyang, mdoerr, amitkumar
-------------
PR: https://git.openjdk.org/jdk/pull/14470
More information about the hotspot-dev
mailing list