[PATCH] D52840: Include Python binding tests in CMake rules

Yvan Roux via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 16 07:03:13 PDT 2018


Hi Michal,

AArch64 bots are broken as well, logs are available at:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/15717/steps/ninja%20check%201/logs/stdio

Cheers,
Yvan
On Mon, 15 Oct 2018 at 20:39, Ulrich Weigand via Phabricator via
cfe-commits <cfe-commits at lists.llvm.org> wrote:
>
> uweigand added a comment.
>
> In https://reviews.llvm.org/D52840#1265615, @mgorny wrote:
>
> > The first one seems to indicate that your `libclang.so` is broken in release mode (optimization error?). The second one is correct (some of the tests test for errors, and apparently don't silence the messages).
>
>
> Ok, thanks for the clarification on the second point.
>
> As to the first issue, it turned out to be more complicated.  The wrong value results from this call in CursorVisitor::Visit
>
>   switch (Visitor(Cursor, Parent, ClientData)) {
>
> This is a callback routine passed in from the caller, which in the case of the Python bindings means that an FFI closure is being called.
>
> Now, due to a historical quirk in the FFI ABI, return values of integral type smaller than the register word size must be passed as the special "ffi_arg" type when using FFI (either for calls or for closures).  It seems the Python 2.7 code that interfaces with FFI does not correctly respect this.  As a result, it seems that when the closure returns a 32-bit value, it is not properly extended and the high bits of the return register contain garbage.
>
> But that violates our ABI, which requires extension to full register size.   And it seems the clang code, when built with optimization, does indeed rely on that ABI guarantee.
>
> So there's a bug in Python (or depending on how you want to look at it, in libffi -- that part of the interface has also long been under-documented unfortunately), which hits on our platform.  I'll see if I can do anything about that, but for now we'll probably want to disable those tests on SystemZ.
>
>
> Repository:
>   rC Clang
>
> https://reviews.llvm.org/D52840
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the llvm-commits mailing list