diff --git a/Make.inc b/Make.inc index a32cd32eda5f7..81ff923156ed8 100644 --- a/Make.inc +++ b/Make.inc @@ -1042,13 +1042,13 @@ ifeq ($(OS), WINNT) ifneq ($(USEMSVC), 1) HAVE_SSP := 1 OSLIBS += -Wl,--export-all-symbols -Wl,--version-script=$(JULIAHOME)/src/julia.expmap \ - $(NO_WHOLE_ARCHIVE) -lpsapi -lkernel32 -lws2_32 -liphlpapi -lwinmm -ldbghelp -luserenv + $(NO_WHOLE_ARCHIVE) -lpsapi -lkernel32 -lws2_32 -liphlpapi -lwinmm -ldbghelp -luserenv -lsecur32 JLDFLAGS := -Wl,--stack,8388608 ifeq ($(ARCH),i686) JLDFLAGS += -Wl,--large-address-aware endif else #USEMSVC -OSLIBS += kernel32.lib ws2_32.lib psapi.lib advapi32.lib iphlpapi.lib shell32.lib winmm.lib userenv.lib +OSLIBS += kernel32.lib ws2_32.lib psapi.lib advapi32.lib iphlpapi.lib shell32.lib winmm.lib userenv.lib secur32.lib JLDFLAGS := -stack:8388608 endif JCPPFLAGS += -D_WIN32_WINNT=0x0502 diff --git a/deps/checksums/libuv-2348256acf5759a544e5ca7935f638d2bc091d60.tar.gz/md5 b/deps/checksums/libuv-2348256acf5759a544e5ca7935f638d2bc091d60.tar.gz/md5 new file mode 100644 index 0000000000000..5ab28fd10c4ad --- /dev/null +++ b/deps/checksums/libuv-2348256acf5759a544e5ca7935f638d2bc091d60.tar.gz/md5 @@ -0,0 +1 @@ +f70104dab096fbb2f029fb57ce83f321 diff --git a/deps/checksums/libuv-2348256acf5759a544e5ca7935f638d2bc091d60.tar.gz/sha512 b/deps/checksums/libuv-2348256acf5759a544e5ca7935f638d2bc091d60.tar.gz/sha512 new file mode 100644 index 0000000000000..317972b4a4c6e --- /dev/null +++ b/deps/checksums/libuv-2348256acf5759a544e5ca7935f638d2bc091d60.tar.gz/sha512 @@ -0,0 +1 @@ +c8bf3c736a60feb0c6994aa7cd1b80e1a45bd6096aa66db320ddfc27b59a0797d303338ea75978619173e4f0a680254f3db29c9f6d1b84361030cc11c7729c98 diff --git a/deps/checksums/libuv-ed3700c849289ed01fe04273a7bf865340b2bd7e.tar.gz/md5 b/deps/checksums/libuv-ed3700c849289ed01fe04273a7bf865340b2bd7e.tar.gz/md5 deleted file mode 100644 index f2728429466bb..0000000000000 --- a/deps/checksums/libuv-ed3700c849289ed01fe04273a7bf865340b2bd7e.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -4b25bc8933574c8ced7b0005883338ee diff --git a/deps/checksums/libuv-ed3700c849289ed01fe04273a7bf865340b2bd7e.tar.gz/sha512 b/deps/checksums/libuv-ed3700c849289ed01fe04273a7bf865340b2bd7e.tar.gz/sha512 deleted file mode 100644 index 7860ef8c5f2b5..0000000000000 --- a/deps/checksums/libuv-ed3700c849289ed01fe04273a7bf865340b2bd7e.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -1305035b1372bdf234e3c5e673ee4c8ab5bda83ff06bc27704786def52667c3143fe587fca8f6e0855ba0c8b6d4dd90b2faefd33736224173f459d751885683e diff --git a/deps/libuv.mk b/deps/libuv.mk index d8c189fb33f03..5f9062ea8f910 100644 --- a/deps/libuv.mk +++ b/deps/libuv.mk @@ -3,7 +3,7 @@ LIBUV_GIT_URL:=git://github.com/JuliaLang/libuv.git LIBUV_TAR_URL=https://api.github.com/repos/JuliaLang/libuv/tarball/$1 $(eval $(call git-external,libuv,LIBUV,configure,,$(SRCCACHE))) -UV_CFLAGS := -D_GNU_SOURCE +UV_CFLAGS := -O2 ifeq ($(USEMSVC), 1) UV_CFLAGS += -DBUILDING_UV_SHARED endif @@ -11,18 +11,18 @@ ifeq ($(USEICC), 1) UV_CFLAGS += -static-intel endif -UV_MFLAGS += LDFLAGS="$(LDFLAGS) $(CLDFLAGS) -v" +UV_FLAGS := LDFLAGS="$(LDFLAGS) $(CLDFLAGS) -v" ifneq ($(UV_CFLAGS),) -UV_MFLAGS += CFLAGS="$(CFLAGS) $(UV_CFLAGS)" +UV_FLAGS += CFLAGS="$(CFLAGS) $(UV_CFLAGS)" endif +ifeq ($(USEMSVC), 1) +UV_FLAGS += --disable-shared +endif + ifneq ($(VERBOSE), 0) UV_MFLAGS += V=1 endif -ifneq ($(USEMSVC), 1) -UV_FLAGS := $(UV_MFLAGS) -else -UV_FLAGS := --disable-shared $(UV_MFLAGS) -endif + $(BUILDDIR)/$(LIBUV_SRC_DIR)/build-configured: $(SRCCACHE)/$(LIBUV_SRC_DIR)/source-extracted touch -c $(SRCCACHE)/$(LIBUV_SRC_DIR)/aclocal.m4 # touch a few files to prevent autogen from getting called diff --git a/deps/libuv.version b/deps/libuv.version index 17a47f3323e49..ca06025c4bfd6 100644 --- a/deps/libuv.version +++ b/deps/libuv.version @@ -1,2 +1,2 @@ -LIBUV_BRANCH=julia-uv2 -LIBUV_SHA1=ed3700c849289ed01fe04273a7bf865340b2bd7e +LIBUV_BRANCH=julia-uv2-1.24.0 +LIBUV_SHA1=2348256acf5759a544e5ca7935f638d2bc091d60 diff --git a/src/jl_uv.c b/src/jl_uv.c index b2081a7f2eac8..a98108e0953ce 100644 --- a/src/jl_uv.c +++ b/src/jl_uv.c @@ -293,11 +293,16 @@ JL_DLLEXPORT int jl_spawn(char *name, char **argv, uv_stdio_container_t *stdio, int nstdio, uint32_t flags, char **env, char *cwd, uv_exit_cb cb) { - uv_process_options_t opts; + uv_process_options_t opts = {0}; opts.stdio = stdio; opts.file = name; opts.env = env; opts.flags = flags; + // unused fields: + //opts.uid = 0; + //opts.gid = 0; + //opts.cpumask = NULL; + //opts.cpumask_size = 0; opts.cwd = cwd; opts.args = argv; opts.stdio_count = nstdio; diff --git a/src/uv_constants.h b/src/uv_constants.h index 32882133c64b4..c403bd7374413 100644 --- a/src/uv_constants.h +++ b/src/uv_constants.h @@ -1,8 +1,14 @@ // This file is a part of Julia. License is MIT: https://julialang.org/license #include "uv.h" +#if EDOM > 0 +# define UV__ERR(x) (-(x)) +#else +# define UV__ERR(x) (x) +#endif #define XX(uc,lc) :UV_##uc, -#define YY(uc,lc) (:UV_##uc,UV__##uc), +#define YY(uc,mc) (:UV_##uc,UV__##uc), + const uv_handle_types = [UV_HANDLE_TYPE_MAP(XX) :UV_FILE] const uv_req_types = [UV_REQ_TYPE_MAP(XX)] const uv_err_vals = [UV_ERRNO_MAP(YY)] diff --git a/stdlib/Sockets/src/addrinfo.jl b/stdlib/Sockets/src/addrinfo.jl index d9c765f199d9b..59e4f2dae1088 100644 --- a/stdlib/Sockets/src/addrinfo.jl +++ b/stdlib/Sockets/src/addrinfo.jl @@ -57,7 +57,6 @@ julia> getalladdrinfo("google.com") ``` """ function getalladdrinfo(host::String) - isascii(host) || error("non-ASCII hostname: $host") req = Libc.malloc(Base._sizeof_uv_getaddrinfo) uv_req_set_data(req, C_NULL) # in case we get interrupted before arriving at the wait call status = ccall(:jl_getaddrinfo, Int32, (Ptr{Cvoid}, Ptr{Cvoid}, Cstring, Ptr{Cvoid}, Ptr{Cvoid}), diff --git a/test/runtests.jl b/test/runtests.jl index be99b7084d8e1..e6f00c61aa955 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -112,9 +112,10 @@ cd(@__DIR__) do local stdin_monitor all_tasks = Task[] try - if isa(stdin, Base.TTY) + # Monitor stdin and kill this task on ^C + # but don't do this on Windows, because it may deadlock in the kernel + if !Sys.iswindows() && isa(stdin, Base.TTY) t = current_task() - # Monitor stdin and kill this task on ^C stdin_monitor = @async begin term = REPL.Terminals.TTYTerminal("xterm", stdin, stdout, stderr) try @@ -197,7 +198,7 @@ cd(@__DIR__) do foreach(task->try; schedule(task, InterruptException(); error=true); catch; end, all_tasks) foreach(wait, all_tasks) finally - if isa(stdin, Base.TTY) + if @isdefined stdin_monitor schedule(stdin_monitor, InterruptException(); error=true) end end