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.

Author serhiy.storchaka
Recipients BreamoreBoy, christian.heimes, loewis, serhiy.storchaka, vstinner
Date 2015-02-12.20:32:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1423773122.91.0.753674887174.issue18295@psf.upfronthosting.co.za>
In-reply-to
Content
Many of these overflows can be provoked by specially constructed function, code object or bytecode.

Also I think following examples crash or return wrong result on 64 bit platform:

def f(*args, **kwargs): return len(args), len(kwargs)

f(*([0]*(2**32+1)))
f(**dict.fromkeys(map(hex, range(2**31+1))))

Here is updated patch which handles overflows in non-debug build. It prevent creating Python function with more than 255 default values (in any case compiler and interpreter don't support more than 255 arguments) and raise exception when function is called with too many arguments or too large *args or **kwargs.
History
Date User Action Args
2015-02-12 20:32:02serhiy.storchakasetrecipients: + serhiy.storchaka, loewis, vstinner, christian.heimes, BreamoreBoy
2015-02-12 20:32:02serhiy.storchakasetmessageid: <1423773122.91.0.753674887174.issue18295@psf.upfronthosting.co.za>
2015-02-12 20:32:02serhiy.storchakalinkissue18295 messages
2015-02-12 20:32:02serhiy.storchakacreate