Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-34784: Prevent creating types without bases on PyTuple_Pack failure#10536

Merged
pablogsal merged 2 commits into
python:masterpython/cpython:masterfrom
pablogsal:bpo34784pablogsal/cpython:bpo34784Copy head branch name to clipboard
Nov 15, 2018
Merged

bpo-34784: Prevent creating types without bases on PyTuple_Pack failure#10536
pablogsal merged 2 commits into
python:masterpython/cpython:masterfrom
pablogsal:bpo34784pablogsal/cpython:bpo34784Copy head branch name to clipboard

Conversation

@pablogsal

@pablogsal pablogsal commented Nov 14, 2018

Copy link
Copy Markdown
Member

PyTuple_Pack can fail and return NULL. If this happens, then PyType_FromSpecWithBases will incorrectly create a new type without bases. Also, it will crash on the Py_DECREF that follows.

https://bugs.python.org/issue34784

@encukou

encukou commented Nov 14, 2018

Copy link
Copy Markdown
Member

Oh dear. There are a few more things I overlooked that should be freed on errors.
I've pushed a commit here; @pablogsal, does it look OK?

@pablogsal

Copy link
Copy Markdown
Member Author

@encukou Yup! Thanks for pushing the commit :)

@serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error needs backport to 3.6 labels Nov 14, 2018
@pablogsal pablogsal merged commit bfb855b into python:master Nov 15, 2018
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

@pablogsal pablogsal deleted the bpo34784 branch November 15, 2018 02:04
@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @pablogsal, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker bfb855bef6b428d639693caaf4e4c84cbb8a2f51 3.7

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @pablogsal, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker bfb855bef6b428d639693caaf4e4c84cbb8a2f51 3.6

@pablogsal

Copy link
Copy Markdown
Member Author

Wait....the original PR was not backported. There is nothing to backport here.

@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64 Fedora 3.x has failed when building commit bfb855b.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/53/builds/1899) and take a look at the build logs.
  4. Check if the failure is related to this commit (bfb855b) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/53/builds/1899

Click to see traceback logs
Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/test_shutil.py", line 1366, in test_disk_usage
    self.assertEqual(usage, shutil.disk_usage(__file__))
AssertionError: usage(total=1749308141568, used=1585710096384, free=74714689536) != usage(total=1749308141568, used=1585710104576, free=74714681344)

----------------------------------------------------------------------

Ran 128 tests in 1.173s

FAILED (failures=1, skipped=16)


Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/test_shutil.py", line 1366, in test_disk_usage
    self.assertEqual(usage, shutil.disk_usage(__file__))
AssertionError: usage(total=1749308141568, used=1583928602624, free=76496183296) != usage(total=1749308141568, used=1583928606720, free=76496179200)

----------------------------------------------------------------------

Ran 128 tests in 1.109s

FAILED (failures=1, skipped=16)

@pablogsal

Copy link
Copy Markdown
Member Author

Seems like a false alarm, retriggering build:

https://buildbot.python.org/all/#/builders/53/builds/1900

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.