Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the right format of bkpt/brk for align that falls after jump #62106

Merged
merged 4 commits into from
Nov 30, 2021

Conversation

kunalspathak
Copy link
Member

@kunalspathak kunalspathak commented Nov 28, 2021

GDB expects the brk instruction to be brk #0 on Linux and windows debugger expect brk #F000 on Windows. Although the immediate is different, both are of form brk #immediate which are of same format. We were having outdated bkpt instruction name for brk #F000 encoding. Instead rename it to brk_windows and brk_unix to clearly distinguish the two.

See discussion in #61944 (comment).

This also fixes an issue where we would accidently (under stress mode) emit brk instruction for an align that is not placed after jmp. Example in #61944 (comment)

Fixes: #61944, #61824

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 28, 2021
@ghost
Copy link

ghost commented Nov 28, 2021

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: kunalspathak
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@kunalspathak kunalspathak changed the title Always use int3/bkpt Always use int3/bkpt/brk for align that falls after jump Nov 29, 2021
@kunalspathak kunalspathak changed the title Always use int3/bkpt/brk for align that falls after jump Use the right format of bkpt/brk for align that falls after jump Nov 30, 2021
@kunalspathak kunalspathak marked this pull request as ready for review November 30, 2021 19:56
@kunalspathak
Copy link
Member Author

@dotnet/jit-contrib

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

arm64 jitstress failing with encoding_found assert
2 participants