Skip to content

Commit

Permalink
Update libuv commit
Browse files Browse the repository at this point in the history
This includes a fix from upstream libuv that ensures that the thread
stack size is set to a multiple of the page size.

Fixes #18818
Fixes #24169
  • Loading branch information
ararslan committed Nov 11, 2017
1 parent da34a89 commit a49a446
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 3 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e2d1baa42d69dc5391e2e8bae2596eac
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
272e3cc7b1290ef19cc941c3b3e6dd39dba7dcb26f0aea8e667c48c56288aa9266020504e0cc90074f02881521b3352079416f564c7eb24ab444326a8f04ca64
2 changes: 1 addition & 1 deletion deps/libuv.version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LIBUV_BRANCH=julia-uv1.9.0
LIBUV_SHA1=c5a4e584989669ad48c1728b35063291e16f85ee
LIBUV_SHA1=d8ab1c6a33e77bf155facb54215dd8798e13825d
30 changes: 30 additions & 0 deletions test/socket.jl
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,33 @@ end
@test 0 == ccall(:jl_tcp_reuseport, Int32, (Ptr{Void},), s.handle)
end
end

# Issues #18818 and #24169
mutable struct RLimit
cur::Int64
max::Int64
end
function with_ulimit(f::Function, stacksize::Int)
RLIMIT_STACK = 3 # from /usr/include/sys/resource.h
rlim = Ref(RLimit(0, 0))
# Get the current maximum stack size in bytes
rc = ccall(:getrlimit, Cint, (Cint, Ref{RLimit}), RLIMIT_STACK, rlim)
@assert rc == 0
current = rlim[].cur
try
rlim[].cur = stacksize * 1024
ccall(:setrlimit, Cint, (Cint, Ref{RLimit}), RLIMIT_STACK, rlim)
f()
finally
rlim[].cur = current
ccall(:setrlimit, Cint, (Cint, Ref{RLimit}), RLIMIT_STACK, rlim)
end
nothing
end
@static if Sys.isapple()
@testset "Issues #18818 and #24169" begin
with_ulimit(7001) do
@test getaddrinfo("localhost") isa IPAddr
end
end
end

0 comments on commit a49a446

Please sign in to comment.