[cfe-dev] clang with Python 3.1 release31-maint
theraven at sucs.org
Wed Mar 3 10:47:44 CST 2010
On 3 Mar 2010, at 16:19, Andrius Morkūnas wrote:
> We've seen this too, on FreeBSD. It happens on i386 machines, amd64 ones
> don't seem to have this problem. There are more things that are miscompiled
> by clang/llvm but python is more interesting case because it is a dependency
> for lots of other software.
These are almost certainly cases of clang using the wrong calling convention. The Darwin ABI is well tested, but other platforms are not. The x86-64 ABI is more or less the same between Darwin and FreeBSD, so you won't see any problems. The x86 ABI is different everywhere (and includes weirdnesses like Linux passing unions of two smaller-than-a-register integer types by pointer, which was the most recent one that I saw break stuff).
The most commonly used function prototypes are now well tested because they broke stuff early on, but there are still some corner cases. They're usually easy to fix if you can produce a small test case, which is typically just a function and call to that function which generates invalid code when one is compiled with clang and the other with the system compiler.
More information about the cfe-dev