[issue27695] Compilation doesnt' end

2016-08-05 Thread STINNER Victor
STINNER Victor added the comment: FYI my Python reimplementation of the bytecode peephole optimizer doesn't have this issue. It estimates the size of a**b using exp() and ln() functions. http://bytecode.readthedocs.io/en/latest/ -- ___ Python tracker

[issue27695] Compilation doesnt' end

2016-08-05 Thread Ammar Askar
Ammar Askar added the comment: Just in case anyone is wondering why this happens. The compiler's peephole optimizer will fold constant expressions like x = 5 + 5 into x = 10 More specifically, this bit here:

[issue27695] Compilation doesnt' end

2016-08-05 Thread SilentGhost
SilentGhost added the comment: On 3.6 it takes a very long time, but it does finish. time ./python -c "raise ValueError ; 2 ** 12345678912345" Traceback (most recent call last): File "", line 1, in ValueError real1m35.673s user1m18.952s sys 0m16.644s -- nosy:

[issue27695] Compilation doesnt' end

2016-08-05 Thread SilentGhost
Changes by SilentGhost : -- type: compile error -> resource usage versions: +Python 2.7 ___ Python tracker ___

[issue27695] Compilation doesnt' end

2016-08-05 Thread SilentGhost
Changes by SilentGhost : -- components: +Interpreter Core nosy: +haypo, serhiy.storchaka versions: +Python 3.6 -Python 2.7 ___ Python tracker

[issue27695] Compilation doesnt' end

2016-08-05 Thread Franco Costantini
New submission from Franco Costantini: Hi, we currently are fuzzing Python programs to find valid code that fails to compile. We found this program never finishes its compilation. $ echo "raise ValueError ; 2 ** 12345678912345" > inf.py $ python -m py_compile inf.py We realize the computation