Global built-in smallint

Issue #2 new
Sekkit created an issue

--- module.py GLOBAL_VAR = None

modify it to: GLOBAL_VAR = 23 do reimport module.py

Oops. Whole program crashes because anywhere None will become 23. How to solve this problem?

Comments (4)

  1. Peter Peter repo owner

    If this is an easy way to reproduce this case I'll dig into it. That would be great since I've seen this in various cases and it has been challenging to track down.

  2. Sekkit reporter

    I will mail u with a modified version which passed this issue. but unable to patch smallint between -5~256, boolean, string(chars(0-255), intern string), Nonetype. They are all cached inside python(u can read python 2.7 source code). if u get this bug sovled, reimport will be a perfect solution for games. PS: modified version already been used in commmercial games, it works.

  3. Sekkit reporter

    What's ur email. Maybe i can mail u some files. BTW. why do u only swap refs for limited types( deque, list, blahblah), but I saw many types like ModuleType in gc while debugging. Won't u miss some objects to patch?

  4. Log in to comment