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

Function pointer cast in test_imp #91352

Closed
hoodmane mannequin opened this issue Apr 2, 2022 · 4 comments
Closed

Function pointer cast in test_imp #91352

hoodmane mannequin opened this issue Apr 2, 2022 · 4 comments
Labels
3.11 only security fixes tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@hoodmane
Copy link
Mannequin

hoodmane mannequin commented Apr 2, 2022

BPO 47196
Nosy @tiran, @miss-islington, @hoodmane, @hoodmane
PRs
  • bpo-47196: Fix function pointer cast in test_imp #32244
  • bpo-47196: Fix one more PyInit function signature #32280
  • 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 = None
    closed_at = <Date 2022-04-03.21:01:24.653>
    created_at = <Date 2022-04-02.00:01:51.149>
    labels = ['type-feature', 'tests', '3.11']
    title = 'Function pointer cast in test_imp'
    updated_at = <Date 2022-04-03.21:01:24.652>
    user = 'https://github.com/hoodmane'

    bugs.python.org fields:

    activity = <Date 2022-04-03.21:01:24.652>
    actor = 'christian.heimes'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-04-03.21:01:24.653>
    closer = 'christian.heimes'
    components = ['Tests']
    creation = <Date 2022-04-02.00:01:51.149>
    creator = 'hoodchatham'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 47196
    keywords = ['patch']
    message_count = 4.0
    messages = ['416524', '416525', '416540', '416614']
    nosy_count = 4.0
    nosy_names = ['christian.heimes', 'miss-islington', 'hoodmane', 'hoodchatham']
    pr_nums = ['32244', '32280']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue47196'
    versions = ['Python 3.11']

    @hoodmane
    Copy link
    Mannequin Author

    hoodmane mannequin commented Apr 2, 2022

    The function PyInit_imp_dummy is declared as void f(PyObject* spec) and ignores the argument. In the test, it is called via imp.load_dynamic as void f(void). On wasm targets without the call trampolines added in
    https://bugs.python.org/issue47162
    this causes a fatal error. (There's a bit more discussion about this issue in that thread.)

    @hoodmane
    Copy link
    Mannequin Author

    hoodmane mannequin commented Apr 2, 2022

    Every other PyInit function in that module also needs the spec argument to be removed in order for test_importlib to pass.

    @miss-islington
    Copy link
    Contributor

    New changeset 7000cd7 by Hood Chatham in branch 'main':
    bpo-47196: Fix function pointer cast in test_imp (GH-32244)
    7000cd7

    @miss-islington
    Copy link
    Contributor

    New changeset 3faa9f7 by Hood Chatham in branch 'main':
    bpo-47196: Fix one more PyInit function signature (GH-32280)
    3faa9f7

    @tiran tiran added 3.11 only security fixes tests Tests in the Lib/test dir labels Apr 3, 2022
    @tiran tiran closed this as completed Apr 3, 2022
    @tiran tiran added type-feature A feature request or enhancement 3.11 only security fixes labels Apr 3, 2022
    @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 tests Tests in the Lib/test dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants