This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: segmentation fault on calling __reversed__()
Type: crash Stage: resolved
Components: Interpreter Core Versions: Python 3.8
Status: closed Resolution: duplicate
Dependencies: Superseder: Strange reversed dict behavior
View: 38525
Assigned To: Nosy List: Grzegorz Krasoń, rhettinger, xtreak
Priority: normal Keywords:

Created on 2020-02-17 23:33 by Grzegorz Krasoń, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (7)
msg362164 - (view) Author: Grzegorz Krasoń (Grzegorz Krasoń) Date: 2020-02-17 23:33
This causes segmentation fault:

list((lambda: None).__annotations__.__reversed__())
msg362175 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2020-02-18 05:24
This works fine for me on macOS using the 64-bit build.

What are you using?
msg362176 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-02-18 05:47
This could be fixed with 24dc2f8c56697f9ee51a4887cf0814b6600c1815 issue38525

➜  cpython git:(24dc2f8c56) ./python.exe -c 'list((lambda: None).__annotations__.__reversed__())'
➜  cpython git:(24dc2f8c56) git checkout HEAD~1
Previous HEAD position was 24dc2f8c56 bpo-38525: Fix a segmentation fault when using reverse iterators of empty dict (GH-16846)
HEAD is now at 88eeda6311 Remove doc reference to unmaitained Nose package (GH-16849)
➜  cpython git:(88eeda6311) make -s -j4 2> /dev/null
➜  cpython git:(88eeda6311) ./python.exe -c 'list((lambda: None).__annotations__.__reversed__())'
[1]    36178 segmentation fault  ./python.exe -c 'list((lambda: None).__annotations__.__reversed__())'
msg362179 - (view) Author: Grzegorz Krasoń (Grzegorz Krasoń) Date: 2020-02-18 09:16
Python 3.8.0 (default, Oct 23 2019, 18:51:26) [GCC 9.2.0] on linux
Linux anarchy 4.19.91-1-lts #1 SMP Sat, 21 Dec 2019 16:34:46 +0000 x86_64 GNU/Linux
Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
msg362180 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-02-18 09:31
Can you please try and update to 3.8.1? It should be fixed there.
msg362185 - (view) Author: Grzegorz Krasoń (Grzegorz Krasoń) Date: 2020-02-18 09:50
I confirm. 3.8.1 is fixed. Thank you and sorry for bothering.
msg362189 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-02-18 09:57
No problem, closing it as duplicate of issue38525.
Date User Action Args
2022-04-11 14:59:26adminsetgithub: 83849
2020-02-18 09:57:03xtreaksetstatus: open -> closed
superseder: Strange reversed dict behavior
messages: + msg362189

resolution: duplicate
stage: resolved
2020-02-18 09:50:42Grzegorz Krasońsetmessages: + msg362185
2020-02-18 09:31:52xtreaksetmessages: + msg362180
2020-02-18 09:16:20Grzegorz Krasońsetmessages: + msg362179
2020-02-18 05:47:45xtreaksetnosy: + xtreak
messages: + msg362176
2020-02-18 05:24:55rhettingersetnosy: + rhettinger
messages: + msg362175
2020-02-17 23:33:17Grzegorz Krasońcreate