Global built-in smallint
--- 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)
-
repo owner -
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.
-
repo owner I tried making a simple example with just one module, but that worked fine for me.
-
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?
- Log in to comment
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.