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 JUMP_FORWARD for all forward jumps. #89551

Closed
markshannon opened this issue Oct 6, 2021 · 1 comment
Closed

Use JUMP_FORWARD for all forward jumps. #89551

markshannon opened this issue Oct 6, 2021 · 1 comment
Assignees
Labels
3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@markshannon
Copy link
Member

BPO 45388
Nosy @markshannon
PRs
  • bpo-45388: Normalize jumps in compiler. #28755
  • bpo-45388: Bump MAGIC_NUMBER to reflect change in JUMP_ABSOLUTE semantics. #28829
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/markshannon'
    closed_at = <Date 2021-10-27.10:01:20.404>
    created_at = <Date 2021-10-06.10:06:24.477>
    labels = ['interpreter-core', '3.11']
    title = 'Use JUMP_FORWARD for all forward jumps.'
    updated_at = <Date 2021-10-27.10:01:20.404>
    user = 'https://github.com/markshannon'

    bugs.python.org fields:

    activity = <Date 2021-10-27.10:01:20.404>
    actor = 'Mark.Shannon'
    assignee = 'Mark.Shannon'
    closed = True
    closed_date = <Date 2021-10-27.10:01:20.404>
    closer = 'Mark.Shannon'
    components = ['Interpreter Core']
    creation = <Date 2021-10-06.10:06:24.477>
    creator = 'Mark.Shannon'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45388
    keywords = ['patch']
    message_count = 1.0
    messages = ['403291']
    nosy_count = 1.0
    nosy_names = ['Mark.Shannon']
    pr_nums = ['28755', '28829']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue45388'
    versions = ['Python 3.11']

    @markshannon
    Copy link
    Member Author

    Python has two unconditional jumps, JUMP_ABSOLUTE and JUMP_FORWARD.

    The bytecode compiler should ensure that all forward jumps use JUMP_FORWARD and all backwards jumps use JUMP_ABSOLUTE.

    That way, the interpreter will know that JUMP_ABSOLUTE jumps are backwards and won't need to check.

    @markshannon markshannon added the 3.11 only security fixes label Oct 6, 2021
    @markshannon markshannon self-assigned this Oct 6, 2021
    @markshannon markshannon added interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.11 only security fixes labels Oct 6, 2021
    @markshannon markshannon self-assigned this Oct 6, 2021
    @markshannon markshannon added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Oct 6, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant