Closed maleadt closed 6 years ago
Is this the linux64 nightly you're looking at?
Yes. but the Travis failure also happens on osx: https://travis-ci.org/maleadt/LLVM.jl/jobs/342490156#L137
We could try a complete git clean -fdx
and build from scratch.
Hmmm, the linux64 binaries are definitely recent enough, and logging in to them, I can verify that the llvm-3.9-c_api_nullptr.patch
effects have been applied to the source code....... perhaps there is some bug in the make system that is causing the source changes to not propagate out into changes in the actual library file. I'll nuke it and see if that changes anything for you.
perhaps there is some bug in the make system that is causing the source changes to not propagate out into changes in the actual library file
So we are building incrementally?
$ make -C deps compile-llvm
make: Entering directory '/home/tbesard/Julia/julia-dev/build/dist/deps'
make: Nothing to be done for 'compile-llvm'.
make: Leaving directory '/home/tbesard/Julia/julia-dev/build/dist/deps'
$ touch ../../deps/srccache/llvm-3.9.1/lib/IR/Core.cpp
$ make -C deps compile-llvm
make: Entering directory '/home/tbesard/Julia/julia-dev/build/dist/deps'
make: Nothing to be done for 'compile-llvm'.
make: Leaving directory '/home/tbesard/Julia/julia-dev/build/dist/deps'
ie. no rebuild. Tested with actual changes too.
I thought @vtjnash had mentioned we use ccache with clean builds now, presumable to avoid such issues.
We haven't quite switched over to that yet (I did some proof of concepts to show how nice that would be) because our Windows build system can't handle that yet. I would really like to switch over to building on linux with wine, but bootstrap fails during that segment so we can't use ccache + cross-compilers. Yet.
OK thanks, LLVM.jl now works again with Linux nightlies. I hope the patch will be part of the other nightlies too, once those get updated?
I've been running into some issues with LLVM.jl, with tests segfaulting on something I've definitely fixed on master. After some debugging, I think the nightlies do not contain that patch.
For example, take my local build of LLVM without JuliaLang/julia#25794, where the assembly of
LLVMGetAttributeCountAtIndex
(the function where LLVM.jl segfaults) looks like:Applying the patch transforms the assembly into:
Note the
test %rax,%rax
and jump overmov 0x8(%rsp),%edx
, corresponding with the check for a returned null pointer.Meanwhile, on today's nightly (0.7.0-DEV.3998, 4371808c4e) we seen the following IR:
Quite a bit cleaner (no stack protector?), but more notably no test for a null pointer. So it seams the patch to LLVM has not been applied?
cc @staticfloat as per template