Skip to content

Commit

Permalink
Update libuv commit (#24190)
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

(cherry picked from commit 6a23e23)
  • Loading branch information
ararslan committed Nov 11, 2017
1 parent 072e166 commit 29b6dad
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
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=52d72a52cc7ccd570929990f010ed16e2ec604c8
LIBUV_SHA1=d8ab1c6a33e77bf155facb54215dd8798e13825d
29 changes: 29 additions & 0 deletions test/socket.jl
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,32 @@ let
@test test_connect(addr)
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 is_apple()
@testset "Issues #18818 and #24169" begin
with_ulimit(7001) do
@test getaddrinfo("localhost") isa IPAddr
end
end
end

0 comments on commit 29b6dad

Please sign in to comment.