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

bpo-41995: Fix a null pointer dereference in _tracemalloc.c #22660

Merged
merged 1 commit into from
Oct 13, 2020
Merged

bpo-41995: Fix a null pointer dereference in _tracemalloc.c #22660

merged 1 commit into from
Oct 13, 2020

Conversation

Yunlongs
Copy link
Contributor

@Yunlongs Yunlongs commented Oct 12, 2020

bpo-41995 :fix a null pointer dereference in _tracemalloc.c
https://bugs.python.org/issue41995

https://bugs.python.org/issue41995

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@Yunlongs

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@vstinner vstinner changed the title fix a null pointer dereference in _tracemalloc.c bpo-41995: Fix a null pointer dereference in _tracemalloc.c Oct 12, 2020
@vstinner
Copy link
Member

The fix is correct, but I will wait until you sign the CLA to merge it.

@Yunlongs
Copy link
Contributor Author

The fix is correct, but I will wait until you sign the CLA to merge it.

Ok,i have signed the CLA

@vstinner vstinner merged commit 66c28f5 into python:master Oct 13, 2020
@miss-islington
Copy link
Contributor

Thanks @Yunlongs for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @Yunlongs and @vstinner, I had trouble checking out the 3.9 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 66c28f50c76e4f23af7146e0e580457c5fd6bde7 3.9

@vstinner vstinner added needs backport to 3.9 only security fixes and removed needs backport to 3.9 only security fixes labels Oct 13, 2020
@miss-islington
Copy link
Contributor

Thanks @Yunlongs for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 13, 2020
…2660)

Fix a null pointer dereference in tracemalloc_copy_trace()
of _tracemalloc.
(cherry picked from commit 66c28f5)

Co-authored-by: Yunlongs <lylgood@foxmail.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Oct 13, 2020
@bedevere-bot
Copy link

GH-22681 is a backport of this pull request to the 3.9 branch.

@vstinner vstinner added the needs backport to 3.8 only security fixes label Oct 13, 2020
@miss-islington
Copy link
Contributor

Thanks @Yunlongs for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @Yunlongs and @vstinner, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 66c28f50c76e4f23af7146e0e580457c5fd6bde7 3.8

@vstinner
Copy link
Member

Oh, Python 3.8 is not affected: tracemalloc_copy_trace() is new in Python 3.9.

@vstinner vstinner removed the needs backport to 3.8 only security fixes label Oct 13, 2020
@bedevere-bot
Copy link

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

Hi! The buildbot s390x RHEL8 3.x has failed when building commit 66c28f5.

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/509/builds/179) and take a look at the build logs.
  4. Check if the failure is related to this commit (66c28f5) 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/509/builds/179

Summary of the results of the build (if available):

== Tests result: ENV CHANGED ==

409 tests OK.

10 slowest tests:

  • test_concurrent_futures: 3 min 43 sec
  • test_multiprocessing_spawn: 1 min 48 sec
  • test_peg_generator: 1 min 41 sec
  • test_tokenize: 1 min 37 sec
  • test_capi: 1 min 28 sec
  • test_asyncio: 1 min 21 sec
  • test_multiprocessing_forkserver: 1 min 18 sec
  • test_unparse: 1 min 17 sec
  • test_gdb: 1 min 10 sec
  • test_multiprocessing_fork: 1 min 4 sec

1 test altered the execution environment:
test_asyncio

14 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_nis
test_ossaudiodev test_startfile test_tix test_tk test_ttk_guionly
test_winconsoleio test_winreg test_winsound test_zipfile64

Total duration: 6 min 57 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/sslproto.py", line 321, in __del__
    self.close()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/sslproto.py", line 316, in close
    self._ssl_protocol._start_shutdown()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/sslproto.py", line 590, in _start_shutdown
    self._abort()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/sslproto.py", line 731, in _abort
    self._transport.abort()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/selector_events.py", line 680, in abort
    self._force_close(None)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/selector_events.py", line 731, in _force_close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/base_events.py", line 746, in call_soon
    self._check_closed()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

miss-islington added a commit that referenced this pull request Oct 13, 2020
Fix a null pointer dereference in tracemalloc_copy_trace()
of _tracemalloc.
(cherry picked from commit 66c28f5)

Co-authored-by: Yunlongs <lylgood@foxmail.com>
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
…2660)

Fix a null pointer dereference in tracemalloc_copy_trace()
of _tracemalloc.
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
…2660)

Fix a null pointer dereference in tracemalloc_copy_trace()
of _tracemalloc.
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.

5 participants