Yeah, I realized this after posting. Mavericks is installing its own version of python compiled with clang-5.0. My path was modified by the python installer (from mountain lion) to point under Library and was compiled using the older gcc 4.2. Looks like that program crashes for simple things (division, addition etc.).