Skip to content

Conversation

@pablogsal
Copy link
Member

@pablogsal pablogsal commented Nov 14, 2018

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
Copy link
Member

encukou commented Nov 14, 2018

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
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
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
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
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
Member Author

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

@bedevere-bot
Copy link

⚠️⚠️⚠️ 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
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