Skip to content

Commit 29b6dad

Browse files
committed
Update libuv commit (#24190)
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)
1 parent 072e166 commit 29b6dad

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e2d1baa42d69dc5391e2e8bae2596eac
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
272e3cc7b1290ef19cc941c3b3e6dd39dba7dcb26f0aea8e667c48c56288aa9266020504e0cc90074f02881521b3352079416f564c7eb24ab444326a8f04ca64

deps/libuv.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
LIBUV_BRANCH=julia-uv1.9.0
2-
LIBUV_SHA1=52d72a52cc7ccd570929990f010ed16e2ec604c8
2+
LIBUV_SHA1=d8ab1c6a33e77bf155facb54215dd8798e13825d

test/socket.jl

+29
Original file line numberDiff line numberDiff line change
@@ -351,3 +351,32 @@ let
351351
@test test_connect(addr)
352352
end
353353

354+
# Issues #18818 and #24169
355+
mutable struct RLimit
356+
cur::Int64
357+
max::Int64
358+
end
359+
function with_ulimit(f::Function, stacksize::Int)
360+
RLIMIT_STACK = 3 # from /usr/include/sys/resource.h
361+
rlim = Ref(RLimit(0, 0))
362+
# Get the current maximum stack size in bytes
363+
rc = ccall(:getrlimit, Cint, (Cint, Ref{RLimit}), RLIMIT_STACK, rlim)
364+
@assert rc == 0
365+
current = rlim[].cur
366+
try
367+
rlim[].cur = stacksize * 1024
368+
ccall(:setrlimit, Cint, (Cint, Ref{RLimit}), RLIMIT_STACK, rlim)
369+
f()
370+
finally
371+
rlim[].cur = current
372+
ccall(:setrlimit, Cint, (Cint, Ref{RLimit}), RLIMIT_STACK, rlim)
373+
end
374+
nothing
375+
end
376+
@static if is_apple()
377+
@testset "Issues #18818 and #24169" begin
378+
with_ulimit(7001) do
379+
@test getaddrinfo("localhost") isa IPAddr
380+
end
381+
end
382+
end

0 commit comments

Comments
 (0)