Message52277
The current code in MSVCCompiler.initialiaze will throw an OSError on the assignment to os.environ['path'] after repeated usages of MSVCCompilers because the string produced may exceeed 4096 characters (usually after several compilations). In the call to initialize, the needed paths for compiling via the compiler selected are added on to the front of the path regardless of what the current path is set to be. This is bad because we could be adding redundant paths (and thus exceeding the 4096 character limit needlessly)
Furthmore, this happens regularly whenever anyone uses the VCToolkit2003 compiler because you end up in the "if self.__version >= 7:" control path of get_msvc_paths which merely returns the current path back to the callee. This results in initialize /duplicating the entire path/.
The proposed patch adds a pass through the new path that removes duplicates while maintaining the ordering.
Unfortunately it is difficult for me to provide a real test case for this as it arises out of trying to run the translate code with PyPy. However, I hope that the change is obviously fixing a bug that I've made clear exists.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:57:42 | admin | link | issue1685563 messages |
2007-08-23 15:57:42 | admin | create | |
|