Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swprintf ccall test failure on CI #37735

Closed
vtjnash opened this issue Sep 24, 2020 · 4 comments
Closed

swprintf ccall test failure on CI #37735

vtjnash opened this issue Sep 24, 2020 · 4 comments
Labels
ci Continuous integration system:freebsd Affects only FreeBSD test This change adds or pertains to unit tests

Comments

@vtjnash
Copy link
Member

vtjnash commented Sep 24, 2020

https://build.julialang.org/#/builders/33/builds/3983

Error in testset ccall:
Error During Test at /usr/home/julia/buildbot/worker-tabularasa/tester_freebsd64/build/share/julia/test/ccall.jl:1713
  Got exception outside of a @test
  InexactError: check_top_bit(UInt64, -1)
  Stacktrace:
    [1] throw_inexacterror(f::Symbol, #unused#::Type{UInt64}, val::Int32)
      @ Core ./boot.jl:602
    [2] check_top_bit
      @ ./boot.jl:616 [inlined]
    [3] toUInt64
      @ ./boot.jl:726 [inlined]
    [4] UInt64
      @ ./boot.jl:757 [inlined]
    [5] convert
      @ ./number.jl:7 [inlined]
    [6] cconvert
      @ ./essentials.jl:396 [inlined]
    [7] #unsafe_wrap#78
      @ ./pointer.jl:89 [inlined]
    [8] unsafe_string
      @ ./c.jl:418 [inlined]
    [9] macro expansion
      @ /usr~/buildbot/worker-tabularasa/tester_freebsd64/build/share/julia/test/ccall.jl:1722 [inlined]
   [10] macro expansion
      @ /usr~/buildbot/worker/package_freebsd64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1113 [inlined]
   [11] top-level scope
      @ /usr~/buildbot/worker-tabularasa/tester_freebsd64/build/share/julia/test/ccall.jl:1714
   [12] include(mod::Module, _path::String)
      @ Base ./Base.jl:379
   [13] include
      @ /usr~/buildbot/worker-tabularasa/tester_freebsd64/build/share/julia/test/testdefs.jl:13 [inlined]
   [14] macro expansion
      @ /usr~/buildbot/worker-tabularasa/tester_freebsd64/build/share/julia/test/testdefs.jl:25 [inlined]
   [15] macro expansion
      @ /usr~/buildbot/worker/package_freebsd64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1113 [inlined]
   [16] macro expansion
      @ /usr~/buildbot/worker-tabularasa/tester_freebsd64/build/share/julia/test/testdefs.jl:24 [inlined]
   [17] macro expansion
      @ ./timing.jl:310 [inlined]
   [18] top-level scope
      @ /usr~/buildbot/worker-tabularasa/tester_freebsd64/build/share/julia/test/testdefs.jl:22
   [19] eval
      @ ./boot.jl:360 [inlined]
   [20] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
      @ Main /usr~/buildbot/worker-tabularasa/tester_freebsd64/build/share/julia/test/testdefs.jl:28
   [21] (::Distributed.var"#106#108"{Distributed.CallMsg{:call_fetch}})()
      @ Distributed /usr~/buildbot/worker/package_freebsd64/build/usr/share/julia/stdlib/v1.6/Distributed/src/process_messages.jl:294
   [22] run_work_thunk(thunk::Distributed.var"#106#108"{Distributed.CallMsg{:call_fetch}}, print_error::Bool)
      @ Distributed /usr~/buildbot/worker/package_freebsd64/build/usr/share/julia/stdlib/v1.6/Distributed/src/process_messages.jl:79
   [23] macro expansion
      @ /usr~/buildbot/worker/package_freebsd64/build/usr/share/julia/stdlib/v1.6/Distributed/src/process_messages.jl:294 [inlined]
   [24] (::Distributed.var"#105#107"{Distributed.CallMsg{:call_fetch}, Distributed.MsgHeader, Sockets.TCPSocket})()
      @ Distributed ./task.jl:392

len = @ccall swprintf(buffer::Ptr{Cwchar_t}, n::Csize_t, "α+%ls=%hhd"::Cwstring; "β"::Cwstring, 0xf::UInt8)::Cint

@musm
Copy link
Contributor

musm commented Sep 24, 2020

I don't think swprintf takes a length argument n::Csize_t, this would explain why swprintf_s is used on Windows (explaining the segfault

len = @ccall swprintf_s(buffer::Ptr{Cwchar_t}, n::Csize_t, "α+%ls=%hhd"::Cwstring; "β"::Cwstring, 0xf::UInt8)::Cint
)
Edit: I think that only applies in the Windows case, and is irrelevant in this case.

@JeffBezanson JeffBezanson added the test This change adds or pertains to unit tests label Sep 29, 2020
@KristofferC KristofferC added the system:freebsd Affects only FreeBSD label Oct 1, 2020
@StefanKarpinski StefanKarpinski added the ci Continuous integration label Oct 1, 2020
@StefanKarpinski
Copy link
Member

I've been trying to use the ci label for all issues that affect CI reliability, but it seems like no one else is using it. Can we agree on a label that will give us a list of all ongoing CI problems?

@simonbyrne
Copy link
Contributor

Something does appear to be wrong with sprintf/swprintf on Windows: #36040 (comment)

@vtjnash
Copy link
Member Author

vtjnash commented Oct 8, 2020

This issue has nothing to do with windows, sprintf, or %f but is only a bug on FreeBSD in their implementation of %ls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous integration system:freebsd Affects only FreeBSD test This change adds or pertains to unit tests
Projects
None yet
Development

No branches or pull requests

6 participants