◐ Shell
clean mode source ↗

bpo-33041: Fix downcast warning on Windows by vstinner · Pull Request #6595 · python/cpython

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Merged

vstinner

merged 1 commit into

Apr 27, 2018

Conversation

Cast pointer difference from ssize_t to int: a frame is very unlikely
larger than 2 GB.

@vstinner

I'm not sure about silently downcasting ssize_t to int. Maybe a check at runtime would be safer, but I'm too lazy to write complex code to handle errors :-) What do you think @serhiy-storchaka? Is it ok to rely that a stack will not be larger than 2 GB?

serhiy-storchaka

Choose a reason for hiding this comment

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

I think it is safe. This difference should be limited by co_stacksize which has type int.

serhiy-storchaka

@vstinner

I think it is safe. This difference should be limited by co_stacksize which has type int.

Oh right. Thanks for checking!

@bedevere-bot

@vstinner: Please replace # with GH- in the commit message next time. Thanks!

Labels