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

format(float, str): integer overflow for huge precision #62337

Closed
vstinner opened this issue Jun 4, 2013 · 2 comments
Closed

format(float, str): integer overflow for huge precision #62337

vstinner opened this issue Jun 4, 2013 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@vstinner
Copy link
Member

vstinner commented Jun 4, 2013

BPO 18137
Nosy @mdickinson, @vstinner, @serhiy-storchaka
Files
  • float_format_precision.patch
  • 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 2013-06-23.12:57:47.291>
    created_at = <Date 2013-06-04.23:11:30.633>
    labels = ['interpreter-core']
    title = 'format(float, str): integer overflow for huge precision'
    updated_at = <Date 2013-06-23.12:57:47.290>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2013-06-23.12:57:47.290>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-06-23.12:57:47.291>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2013-06-04.23:11:30.633>
    creator = 'vstinner'
    dependencies = []
    files = ['30465']
    hgrepos = []
    issue_num = 18137
    keywords = ['patch']
    message_count = 2.0
    messages = ['190629', '191693']
    nosy_count = 4.0
    nosy_names = ['mark.dickinson', 'vstinner', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue18137'
    versions = ['Python 2.7', 'Python 3.3', 'Python 3.4']

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 4, 2013

    format(1.2, ".%sf" % (2**32 + 2)) returns "1.20": the integer overflow is not catced.

    Attached patch fixes the issue.

    @vstinner vstinner added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Jun 4, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jun 23, 2013

    New changeset ef5175d08e7e by Victor Stinner in branch '3.3':
    Issue bpo-18137: Detect integer overflow on precision in float.__format__() and
    http://hg.python.org/cpython/rev/ef5175d08e7e

    New changeset 81fef2666ebb by Victor Stinner in branch 'default':
    (Merge 3.3) Issue bpo-18137: Detect integer overflow on precision in
    http://hg.python.org/cpython/rev/81fef2666ebb

    New changeset d2b4f59943fa by Victor Stinner in branch '2.7':
    Issue bpo-18137: Detect integer overflow on precision in float.__format__()
    http://hg.python.org/cpython/rev/d2b4f59943fa

    @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
    interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant