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

Backports release 1.5.3 #38122

Merged
merged 15 commits into from
Nov 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ endif

exe:
# run Inno Setup to compile installer
$(call spawn,$(JULIAHOME)/dist-extras/inno/iscc.exe /DAppVersion=$(JULIA_VERSION) /DSourceDir="$(call cygpath_w,$(BUILDROOT)/julia-$(JULIA_COMMIT))" /DRepoDir="$(call cygpath_w,$(JULIAHOME))" /F"$(JULIA_BINARYDIST_FILENAME)" /O"$(call cygpath_w,$(BUILDROOT))" $(call cygpath_w,$(JULIAHOME)/contrib/windows/build-installer.iss))
$(call spawn,$(JULIAHOME)/dist-extras/inno/iscc.exe /DAppVersion=$(JULIA_VERSION) /DSourceDir="$(call cygpath_w,$(BUILDROOT)/julia-$(JULIA_COMMIT))" /DRepoDir="$(call cygpath_w,$(JULIAHOME))" /F"$(JULIA_BINARYDIST_FILENAME)" /O"$(call cygpath_w,$(BUILDROOT))" $(INNO_ARGS) $(call cygpath_w,$(JULIAHOME)/contrib/windows/build-installer.iss))
chmod a+x "$(BUILDROOT)/$(JULIA_BINARYDIST_FILENAME).exe"

app:
Expand Down
2 changes: 1 addition & 1 deletion base/compiler/tfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ function getfield_tfunc(@nospecialize(s00), @nospecialize(name))
nv = fieldindex(widenconst(s), nv, false)
end
if isa(nv, Int) && 1 <= nv <= length(s.fields)
return s.fields[nv]
return unwrapva(s.fields[nv])
end
end
s = widenconst(s)
Expand Down
9 changes: 0 additions & 9 deletions base/compiler/typeutils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,6 @@ function typesubtract(@nospecialize(a), @nospecialize(b))
if isa(a, Union)
return Union{typesubtract(a.a, b),
typesubtract(a.b, b)}
elseif a isa DataType
if b isa DataType
if a.name === b.name === Tuple.name && length(a.types) == length(b.types)
ta = switchtupleunion(a)
if length(ta) > 1
return typesubtract(Union{ta...}, b)
end
end
end
end
return a # TODO: improve this bound?
end
Expand Down
32 changes: 31 additions & 1 deletion base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,32 @@ function tempdir()
end
end

"""
prepare_for_deletion(path::AbstractString)

Prepares the given `path` for deletion by ensuring that all directories within that
`path` have write permissions, so that files can be removed from them. This is
automatically invoked by methods such as `mktempdir()` to ensure that no matter what
weird permissions a user may have created directories with within the temporary prefix,
it will always be deleted.
"""
function prepare_for_deletion(path::AbstractString)
# Nothing to do for non-directories
if !isdir(path)
return
end

try chmod(path, filemode(path) | 0o333)
catch; end
for (root, dirs, files) in walkdir(path)
for dir in dirs
dpath = joinpath(root, dir)
try chmod(dpath, filemode(dpath) | 0o333)
catch; end
end
end
end

const TEMP_CLEANUP_MIN = Ref(1024)
const TEMP_CLEANUP_MAX = Ref(1024)
const TEMP_CLEANUP = Dict{String,Bool}()
Expand All @@ -484,6 +510,7 @@ function temp_cleanup_purge(all::Bool=true)
if (all || asap) && ispath(path)
need_gc && GC.gc(true)
need_gc = false
prepare_for_deletion(path)
rm(path, recursive=true, force=true)
end
!ispath(path) && delete!(TEMP_CLEANUP, path)
Expand Down Expand Up @@ -682,7 +709,10 @@ function mktempdir(fn::Function, parent::AbstractString=tempdir();
fn(tmpdir)
finally
try
ispath(tmpdir) && rm(tmpdir, recursive=true)
if ispath(tmpdir)
prepare_for_deletion(tmpdir)
rm(tmpdir, recursive=true)
end
catch ex
@error "mktempdir cleanup" _group=:file exception=(ex, catch_backtrace())
# might be possible to remove later
Expand Down
2 changes: 1 addition & 1 deletion base/methodshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function argtype_decl(env, n, sig::DataType, i::Int, nargs, isva::Bool) # -> (ar
s = string(n)
i = findfirst(isequal('#'), s)
if i !== nothing
s = s[1:i-1]
s = s[1:prevind(s, i)]
end
if t === Any && !isempty(s)
return s, ""
Expand Down
7 changes: 3 additions & 4 deletions base/process.jl
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ Returns successfully if the process has already exited, but throws an
error if killing the process failed for other reasons (e.g. insufficient
permissions).
"""
function kill(p::Process, signum::Integer)
function kill(p::Process, signum::Integer=SIGTERM)
iolock_begin()
if process_running(p)
@assert p.handle != C_NULL
Expand All @@ -558,9 +558,8 @@ function kill(p::Process, signum::Integer)
iolock_end()
nothing
end
kill(ps::Vector{Process}) = foreach(kill, ps)
kill(ps::ProcessChain) = foreach(kill, ps.processes)
kill(p::Process) = kill(p, SIGTERM)
kill(ps::Vector{Process}, signum::Integer=SIGTERM) = for p in ps; kill(p, signum); end
kill(ps::ProcessChain, signum::Integer=SIGTERM) = kill(ps.processes, signum)

"""
getpid(process) -> Int32
Expand Down
3 changes: 3 additions & 0 deletions contrib/windows/build-installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ UninstallDisplayName={#AppNameLong}
UninstallDisplayIcon={app}\{#AppMainExeName}
UninstallFilesDir={app}\uninstall

#ifdef Sign
SignTool=mysigntool
#endif

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Expand Down
2 changes: 1 addition & 1 deletion deps/Versions.make
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CURL_BB_REL = 1
LIBGIT2_VER = 0.28.2
LIBGIT2_BB_REL = 1
LIBUV_VER = 1.29.1
LIBUV_BB_REL = 0
LIBUV_BB_REL = 9
OBJCONV_VER = 2.49.0
OBJCONV_BB_REL = 0
ZLIB_VER = 1.2.11
Expand Down
1 change: 1 addition & 0 deletions deps/checksums/LibUV.v2.0.0-9.aarch64-linux-gnu.tar.gz/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2bd32030f78a45b6195999407f510aa5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1ccc3ffa4f5473e74f4ce342423bddc268a6f70d9743aa2f11124163db27f3e56711e85555895e2ff506a025f9dfbfec686ff457e949aa45d86ffef5ec6c2037
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c3b6f24843c4be53fa72d995a9296450
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1659c0fa80c162411c284bcf85dfac2d6a699bf2b09bbfe7868ebade0c5e424e3bda416b345cc101f946dbbbd7fea677318d733ad12bf3bb6ba5555accbe8d45
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
71b09d3e80394d283756348854a65017
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b360975c81b574a9ed673c106ab0a520eac42e594b48933a9e0526a1e00462da524b86a516d860945e04fe395ddba31acebe1ed8609aa65ccc7eea784ef0fb68
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
40bf3062a91d1c24122e71be0479ed94
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aa66897bd05f13daf682104b16329093f1234922c07d97e8134db0a1f499d17c8716704e4c8b21a00d148afa920f4fa1d2fd884a545c973b8a6734d7aada5fc6
1 change: 1 addition & 0 deletions deps/checksums/LibUV.v2.0.0-9.i686-linux-gnu.tar.gz/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11477f56cffc636d48245ad623eea1c7
1 change: 1 addition & 0 deletions deps/checksums/LibUV.v2.0.0-9.i686-linux-gnu.tar.gz/sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
da82d92db2ba2bf0c0b52928390bbf0ee5a8212883fd23a772c7735c7f427ca229229b75e8d7ff8964d42a2ab0614f1adfd156e0ef067b682931e0236fe7ef7b
1 change: 1 addition & 0 deletions deps/checksums/LibUV.v2.0.0-9.i686-linux-musl.tar.gz/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
739be10627a93a419f0a9f193232931c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8abf48cf61ef7dd1a7d619bb062ba919d97d9d68f2e3d04dd7c4fdfacf01e5bcc864ecd6fe5e8782ba72822764883583d60c5164c96fe030a979d3436278f2bd
1 change: 1 addition & 0 deletions deps/checksums/LibUV.v2.0.0-9.i686-w64-mingw32.tar.gz/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3e27de72945d3eda858798b8faaaa2f9
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c0dd0c3dea0f9e2b7319f46733685a5ac1ecb6423886e669aeb14e1bc8aae4017ad994b8802dcc9f57cceaebf138f3f4328b97d2f0a64c317243ce3fe282dd52
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4231a4b2c1adb333f2ed603ad22b92c5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aef5f19dc6b1061f1ebd205e4663779498e0094435dc875e4ebca3dda67b0c11d5cb8eb88a20f9baaf82d59a1e83a5fedcdb7a6be9255d738aca1981656523bf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ac719bf85a3619e9d238d0efb1291ef0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
753e640aeca665b6e35deed35860d8e3f3076b9c1cfae382d029827e138bc3ff65a90bbee2f828a8371ac15bca29469c1720b3c1b9c29f56d8b402790c7608e8
1 change: 1 addition & 0 deletions deps/checksums/LibUV.v2.0.0-9.x86_64-linux-gnu.tar.gz/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
446e2ffac64e64b24c47d17d03cdc3a3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
185ec913e17aa00b866c1c7f2b4645c80ab8ff067ee1c176cc33c75e6161450994a795feeb46ca0bcbb80bbc727de8a4532ddee5b658fdc9bbf10b1676a54026
1 change: 1 addition & 0 deletions deps/checksums/LibUV.v2.0.0-9.x86_64-linux-musl.tar.gz/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0f7913302512ad1002ce77b2c619a4c8
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c8cc6d5a27bc21f28a1cb7e75b40947e9870ace136e50040fefe067c30398f3a1655ce28fa43b28e09ff743d5f1bbce061dff2f47ab67ca81cd3d1e6f360317a
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2fd4a5b814194d588186485b8cc5b73d
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4b72488b5afa6dcc64763155489a4aad0f438266bdc039c03ed8835cf14f6159c5151751cdbc61cdfb54253bf458b2af4a7d3d8cb6ad70ffb154df0082c2149b
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bab85c5eae8370f4058e06b6779c7dc7
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
78f42e12f99a9dddfec221c03e43fb76ac0ab664b6aec7f3f1a5f55fbc72c9cf03e2e7f99a4bb22b9a0e568cd448d52f5b91f22cf4aff6a3a3e5ddc6e5c963b7
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d6a6ee3e1575e3b0cf64adf6d2c7c28d
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3aa17ba7f7a9b76be7a8ddcebfa55c2eb62961c9dd3b4d06551a85fb58cacfcd53a40d2c2dd168f25f8ef5630fb01b3a41537dc9e4b4d54b409fe7d52a748cfa
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9388aa4d36915724f1de4b20b205ed35
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
70b0c738a60b4e476750b7de8d120e735359e2c36fcb3a8a38628a0ae326210ed3b15d793dfd5443d7aa5603e83e7d99f567aa4c1696846d950df9f83648669c
4 changes: 2 additions & 2 deletions deps/libuv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ fastcheck-libuv: #none
check-libuv: $(LIBUV_BUILDDIR)/build-checked

else # USE_BINARYBUILDER_LIBUV
LIBUV_BB_URL_BASE := https://github.com/JuliaPackaging/Yggdrasil/releases/download/LibUV-v2+$(LIBUV_VER)-julia+$(LIBUV_BB_REL)
LIBUV_BB_NAME := LibUV.v2.0.0+$(LIBUV_VER)-julia
LIBUV_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/LibUV_jll.jl/releases/download/LibUV-v2.0.0+$(LIBUV_BB_REL)
LIBUV_BB_NAME := LibUV.v2.0.0

$(eval $(call bb-install,libuv,LIBUV,false))
endif
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-uv2-1.29.1
LIBUV_SHA1=35b1504507a7a4168caae3d78db54d1121b121e1
LIBUV_SHA1=1fcc6d66f9df74189c74d3d390f02202bb7db953
1 change: 1 addition & 0 deletions doc/src/devdocs/locks.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The following are definitely leaf locks (level 1), and must not try to acquire a
> * pagealloc
> * gc_perm_lock
> * flisp
> * jl_in_stackwalk (Win32)
>
> > flisp itself is already threadsafe, this lock only protects the `jl_ast_context_list_t` pool

Expand Down
3 changes: 3 additions & 0 deletions src/datatype.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ jl_datatype_t *jl_new_uninitialized_datatype(void)
t->zeroinit = 0;
t->isinlinealloc = 0;
t->has_concrete_subtype = 1;
t->name = NULL;
t->super = NULL;
t->parameters = NULL;
t->layout = NULL;
t->names = NULL;
t->types = NULL;
Expand Down
Loading