On Tuesday, 23 February 2016 15:40:50 UTC+1, Yichao Yu wrote:
>
>
>
> On Tue, Feb 23, 2016 at 9:26 AM, 'Bill Hart' via julia-users <
> [email protected] <javascript:>> wrote:
>
>> We just had a failure of Nemo.jl on Travis on OSX which looks completely
>> random. We replace uint with UInt in two places. Before the patch all
>> passes. After the patch, segfault on OSX in a fairly unrelated function.
>>
>
> This is unrelated to the OP.
>
Agreed. I was referring to the "known intermittent failure on master"
mentioned in the follow-up, of which I know nothing. I was of course
speculating.
>
>
>> The failure almost seems to random to even bother posting, but here is
>> the line of code we changed:
>>
>> ccall((:fmpz_pow_ui, :libflint), Void, (Ptr{fmpz}, Ptr{fmpz}, UInt), &z,
>> &x, UInt(y))
>>
>
>>
>> Here is the function that now segfaults:
>>
>> function fmpz(x::Float64)
>> !isinteger(x) && throw(InexactError())
>> z = new()
>> ccall((:fmpz_set_d, :libflint), Void, (Ptr{fmpz}, Cdouble), &z, x
>> )
>> finalizer(z, _fmpz_clear_fn)
>> return z
>> end
>>
>> This was with Julia 0.4. It's hard not to draw the conclusion that these
>> are unrelated and that therefore there are intermittent failures on Travis.
>>
>>
>
> The most likely reason is that you have a incorrect ccall that happens to
> trigger segfault due to something subtle changes and it wasn't before since
> the GC is very forgiving..
>
Well, I can confirm that this is failing intermittently. Some travis builds
pass and others fail at precisely this point. The most recent failure being
on Linux and not OSX. Travis tells me it is running on their new platform
for Precise builds.
It is one of the very first ccalls made in our tests, the one immediately
prior being to precisely the function that had the UInt typo fixed.
I will try disabling the very few tests run prior to this to see if the
problem goes away.
Could the implicit Float64 -> Cdouble be problematic in any sense?
Bill.