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

Py_FinalizeEx unconditionally exists in Py_LIMITED_API #79440

Closed
AJNeufeld mannequin opened this issue Nov 15, 2018 · 6 comments
Closed

Py_FinalizeEx unconditionally exists in Py_LIMITED_API #79440

AJNeufeld mannequin opened this issue Nov 15, 2018 · 6 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@AJNeufeld
Copy link
Mannequin

AJNeufeld mannequin commented Nov 15, 2018

BPO 35259
Nosy @ned-deily, @vadmium, @serhiy-storchaka, @AJNeufeld, @miss-islington
PRs
  • bpo-35259: Limit Py_FinalizeEx() to Py_LIMITED_API >= 0x03060000 #10620
  • [3.7] bpo-35259: Limit Py_FinalizeEx() to Py_LIMITED_API >= 0x03060000. (GH-10620) #11268
  • [3.6] bpo-35259: Limit Py_FinalizeEx() to Py_LIMITED_API >= 0x03060000. (GH-10620) #11269
  • 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 2018-12-21.06:21:02.281>
    created_at = <Date 2018-11-15.18:24:51.512>
    labels = ['interpreter-core', '3.7', '3.8', 'type-crash']
    title = 'Py_FinalizeEx unconditionally exists in Py_LIMITED_API'
    updated_at = <Date 2018-12-24.16:33:09.815>
    user = 'https://github.com/AJNeufeld'

    bugs.python.org fields:

    activity = <Date 2018-12-24.16:33:09.815>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-12-21.06:21:02.281>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2018-11-15.18:24:51.512>
    creator = 'AJNeufeld'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35259
    keywords = ['patch']
    message_count = 6.0
    messages = ['329959', '330383', '332260', '332264', '332267', '332491']
    nosy_count = 5.0
    nosy_names = ['ned.deily', 'martin.panter', 'serhiy.storchaka', 'AJNeufeld', 'miss-islington']
    pr_nums = ['10620', '11268', '11269']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue35259'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    @AJNeufeld
    Copy link
    Mannequin Author

    AJNeufeld mannequin commented Nov 15, 2018

    In application compiled with
      #define Py_LIMITED_API 0x03040000
    this method was used
      Py_FinalizeEx()

    Tested application with:
    SET PATH=...;C:\Program Files\Python35
    APPLICATION.EXE

    Result:
    Entry Point Not Found

    (X) The procedure entry point Py_FinalizeEx could not be located
    in the dynamic link library
    C:\PATH\TO\APPLICATION.EXE

    Expected Result:
    Application runs

    Rebuilding, after replacing Py_FinalizeEx(void) with Py_Finalize(void):
    Application runs when pointing to 3.5 DLLs.

    Suggested resolution:
    Declaration should be restricted to ABI 3.6+:

    #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
    PyAPI_FUNC(int) Py_FinalizeEx(void);
    #endif

    @AJNeufeld AJNeufeld mannequin added 3.7 (EOL) end of life 3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump labels Nov 15, 2018
    @vadmium
    Copy link
    Member

    vadmium commented Nov 25, 2018

    I added the Py_FinalizeEx API in bpo-5319, but was relying on input from others about dealing with Py_LIMITED_API. After reading the documentation <https://docs.python.org/3.6/c-api/stable.html\>, I now see that the function would be considered part of the limited API because its documentation doesn’t say otherwise. So Arthur’s resolution is correct.

    @serhiy-storchaka
    Copy link
    Member

    New changeset 3e8f962 by Serhiy Storchaka (Arthur Neufeld) in branch 'master':
    bpo-35259: Limit Py_FinalizeEx() to Py_LIMITED_API >= 0x03060000. (GH-10620)
    3e8f962

    @miss-islington
    Copy link
    Contributor

    New changeset d1e7175 by Miss Islington (bot) in branch '3.7':
    bpo-35259: Limit Py_FinalizeEx() to Py_LIMITED_API >= 0x03060000. (GH-10620)
    d1e7175

    @ned-deily
    Copy link
    Member

    New changeset 5241ecf by Ned Deily (Miss Islington (bot)) in branch '3.6':
    bpo-35259: Limit Py_FinalizeEx() to Py_LIMITED_API >= 0x03060000. (GH-10620) (GH-11269)
    5241ecf

    @ned-deily
    Copy link
    Member

    New changeset ffc106c by Ned Deily (Miss Islington (bot)) in branch '3.7':
    bpo-35259: Limit Py_FinalizeEx() to Py_LIMITED_API >= 0x03060000. (GH-10620)
    ffc106c

    @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.7 (EOL) end of life 3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants