FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-31779: Prevent assertion failures and a crash when using an uninitialized struct.Struct object by orenmn · Pull Request #3984 · python/cpython · GitHub

Repository navigation

bpo-31779: Prevent assertion failures and a crash when using an uninitialized struct.Struct object - #3984

Closed
orenmn wants to merge 5 commits into
python:mainfrom
orenmn:bpo31779-fix-crash-and-assert-fails
Closed

orenmn wants to merge 5 commits into
python:mainfrom
orenmn:bpo31779-fix-crash-and-assert-fails

Conversation

orenmn commented Oct 13, 2017 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

In addition, add tests to test_struct to make sure the assertion failures and the crash are no more.

https://bugs.python.org/issue31779

Comment thread Lib/test/test_struct.py
s2 = struct.Struct(s.format.encode())
self.assertEqual(s2.format, s.format)

@support.cpython_only

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why is this test cpython only?

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

github-actions Bot added the stale Stale PR or inactive for long period of time. label Feb 28, 2022

MaxwellDupre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good:

struct_obj.iter_unpack(b'foo')
Traceback (most recent call last):
File "", line 1, in
ValueError: Struct.init() wasn't called

Can you respond to:
pppery on 16 Sep 2018
Why is this test cpython only?

Copy link
Copy Markdown
Contributor

Superseded by #94532

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL