[issue1608] test_str.py crashes
Guido van Rossum
report at bugs.python.org
Thu Dec 13 20:16:37 CET 2007
Guido van Rossum added the comment:
> if you can give me a sample testcase I can bug GCC developers, this
> doesn't look good from GCC side at all. Btw from my limited C knowledge
> marking variables would volatile would prevent optimizations of them.
The example would be something like
void foo(ssize_t x)
{
if (x >= 0) {
if (x+x < 0) printf("Overflow\n");
}
}
main()
{
foo(2147483647);
}
This should print "Overflow" but won't if the evil optimization
triggers. (However you may have to tweak the example program so the
compiler can't inline the argument to foo.)
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1608>
__________________________________
More information about the Python-bugs-list
mailing list