Tuesday, October 24, 2006

Perl on Win32

Rebuilt my desktop PC at work. Moved the codebase over to Visual Studio 2005 so I can take advantage of the vastly improved debugger (for example, you can now see the contents of STL containers). Found out the hard way that you can't compile Perl with VS 2005. Grabbed the HEAD from dev.perl.org and found that it isn't supported there either. The debugger shows miniperl.exe is crashing when building the B module. Looks like a double fclose() condition. Will email a developer who appears to be doing some other work on getting VS 2005 working, and see if he has any information about where things are at. The problem seems pretty reproducible, but digging into the reference counting on the file handle is going to be a pain. Also dealing with filehandle problems is not necessarily the best case for using printf() to create logs either.

Worked until 10pm trying to isolate the problem. On one hand the company clearly can't afford to be responsible for porting Perl to Visual Studio 2005, but on the other hand if I can get it working without too much trouble the general benefits of VS 2005 would be a significant help in debugging other parts of the codebase.

Tomorrow will debug the heap corruption problem we are having with VS 2003 and Embedded Perl. My hope is that with the help of BoundsChecker I should be able to isolate the problem without too much hassle. Of course, since I just got BoundChecker yesterday who knows what else it will turn up before I can even get far enough to debug the Embedded Perl problem. When I did the same exercise on the Linux platform last year using Valgrind, the memory corruption problems I found kept me busy for a week.

Vikki left today. Was great to have her out here for the weekend during her break.