Skip to content

Commit a14e917

Browse files
authored
Merge branch 'master' into structured_opnorm
2 parents 548deda + 152030f commit a14e917

File tree

207 files changed

+3572
-2418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+3572
-2418
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: https://numfocus.org/donate-to-julia

.github/SECURITY.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
The LTS and current stable releases of Julia are the ones supported for security updates.
6+
7+
| Version | Supported |
8+
| ------- | ------------------ |
9+
| LTS | :white_check_mark: |
10+
| Stable | :white_check_mark: |
11+
| < 1.0 | :x: |
12+
13+
## Reporting a Vulnerability
14+
15+
Please report security vulnerabilities by emailing [email protected].

Make.inc

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,19 @@ endif
126126

127127
# we include twice to pickup user definitions better
128128
# include from JULIAHOME first so that BUILDROOT can override
129-
ifeq (exists, $(shell [ -e $(JULIAHOME)/Make.user ] && echo exists ))
130-
include $(JULIAHOME)/Make.user
129+
MAYBE_HOST :=
130+
ifneq ($(BUILDING_HOST_TOOLS),1)
131+
MAKE_USER_FNAME = Make.user
132+
else
133+
MAYBE_HOST := /host
134+
MAKE_USER_FNAME = Make.host.user
135+
endif
136+
137+
ifeq (exists, $(shell [ -e $(JULIAHOME)/$(MAKE_USER_FNAME) ] && echo exists ))
138+
include $(JULIAHOME)/$(MAKE_USER_FNAME)
131139
endif
132-
ifeq (exists, $(shell [ -e $(BUILDROOT)/Make.user ] && echo exists ))
133-
include $(BUILDROOT)/Make.user
140+
ifeq (exists, $(shell [ -e $(BUILDROOT)/$(MAKE_USER_FNAME) ] && echo exists ))
141+
include $(BUILDROOT)/$(MAKE_USER_FNAME)
134142
endif
135143

136144
# disable automatic Makefile rules
@@ -236,8 +244,12 @@ sysconfdir := $(prefix)/etc
236244
endif
237245

238246
# Directories where things get built into
239-
build_prefix := $(BUILDROOT)/usr
247+
build_prefix := $(BUILDROOT)/usr$(MAYBE_HOST)
248+
ifeq ($(BUILDING_HOST_TOOLS), 1)
249+
build_staging := $(BUILDROOT)/usr-host-staging
250+
else
240251
build_staging := $(build_prefix)-staging
252+
endif
241253
build_bindir := $(build_prefix)/bin
242254
build_depsbindir := $(build_prefix)/tools
243255
build_libdir := $(build_prefix)/lib
@@ -571,11 +583,11 @@ else
571583
LOCALBASE ?= /usr
572584
endif
573585

574-
ifeq (exists, $(shell [ -e $(JULIAHOME)/Make.user ] && echo exists ))
575-
include $(JULIAHOME)/Make.user
586+
ifeq (exists, $(shell [ -e $(JULIAHOME)/$(MAKE_USER_FNAME) ] && echo exists ))
587+
include $(JULIAHOME)/$(MAKE_USER_FNAME)
576588
endif
577-
ifeq (exists, $(shell [ -e $(BUILDROOT)/Make.user ] && echo exists ))
578-
include $(BUILDROOT)/Make.user
589+
ifeq (exists, $(shell [ -e $(BUILDROOT)/$(MAKE_USER_FNAME) ] && echo exists ))
590+
include $(BUILDROOT)/$(MAKE_USER_FNAME)
579591
endif
580592

581593
# A bit of a kludge to work around libraries linking to FreeBSD's outdated system libgcc_s
@@ -1064,7 +1076,7 @@ else ifneq ($(USEMSVC), 1)
10641076
endif
10651077

10661078
ifeq ($(OS), Linux)
1067-
OSLIBS += -Wl,--no-as-needed -ldl -lrt -lpthread -Wl,--export-dynamic,--as-needed,--no-whole-archive $(LIBUNWIND)
1079+
OSLIBS += -Wl,--no-as-needed -ldl -lrt -lpthread -Wl,--export-dynamic,--as-needed,--no-whole-archive
10681080
# Detect if ifunc is supported
10691081
IFUNC_DETECT_SRC := 'void (*f0(void))(void) { return (void(*)(void))0L; }; void f(void) __attribute__((ifunc("f0")));'
10701082
ifeq (supported, $(shell echo $(IFUNC_DETECT_SRC) | $(CC) -Werror -x c - -S -o /dev/null > /dev/null 2>&1 && echo supported))
@@ -1103,8 +1115,6 @@ OSLIBS += -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expma
11031115
endif
11041116

11051117
ifeq ($(OS), Darwin)
1106-
INSTALL_NAME_CMD := install_name_tool -id $(INSTALL_NAME_ID_DIR)
1107-
INSTALL_NAME_CHANGE_CMD := install_name_tool -change
11081118
SHLIB_EXT := dylib
11091119
OSLIBS += -framework CoreFoundation $(LIBUNWIND)
11101120
WHOLE_ARCHIVE := -Xlinker -all_load

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ all: debug release
99
# sort is used to remove potential duplicates
1010
DIRS := $(sort $(build_bindir) $(build_depsbindir) $(build_libdir) $(build_private_libdir) $(build_libexecdir) $(build_includedir) $(build_includedir)/julia $(build_sysconfdir)/julia $(build_datarootdir)/julia $(build_datarootdir)/julia/stdlib $(build_man1dir))
1111
ifneq ($(BUILDROOT),$(JULIAHOME))
12-
BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src src/clangsa ui doc deps stdlib test test/embedding test/llvmpasses)
12+
BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src src/flisp src/support src/clangsa ui doc deps stdlib test test/embedding test/llvmpasses)
1313
BUILDDIRMAKE := $(addsuffix /Makefile,$(BUILDDIRS)) $(BUILDROOT)/sysimage.mk
1414
DIRS := $(DIRS) $(BUILDDIRS)
1515
$(BUILDDIRMAKE): | $(BUILDDIRS)

NEWS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ New language features
55
---------------------
66

77
* Support for Unicode 12.1.0 ([#32002]).
8+
* Methods can now be added to an abstract type ([#31916]).
89

910
Language changes
1011
----------------
@@ -47,6 +48,11 @@ Standard library changes
4748

4849
#### SparseArrays
4950

51+
* `SparseMatrixCSC(m,n,colptr,rowval,nzval)` perform consistency checks for arguments:
52+
`colptr` must be properly populated and lengths of `colptr`, `rowval`, and `nzval`
53+
must be compatible with `m`, `n`, and `eltype(colptr)`.
54+
* `sparse(I, J, V, m, n)` verifies lengths of `I`, `J`, `V` are equal and compatible with
55+
`eltype(I)` and `m`, `n`.
5056

5157
#### Dates
5258

@@ -62,6 +68,11 @@ Standard library changes
6268

6369
* `mean` now accepts both a function argument and a `dims` keyword ([#31576]).
6470

71+
#### Sockets
72+
73+
* Added `InetAddr` constructor from `AbstractString`, representing IP address, and `Integer`,
74+
representing port number ([#31459]).
75+
6576
#### Miscellaneous
6677

6778
* `foldr` and `mapfoldr` now work on any iterator that supports `Iterators.reverse`, not just arrays ([#31781]).

base/Base.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ include("asyncevent.jl")
267267
include("stream.jl")
268268
include("filesystem.jl")
269269
using .Filesystem
270+
include("cmd.jl")
270271
include("process.jl")
271272
include("grisu/grisu.jl")
272273
include("secretbuffer.jl")

base/array.jl

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,20 @@ false
175175
isbitsunion(u::Union) = (@_pure_meta; ccall(:jl_array_store_unboxed, Cint, (Any,), u) != Cint(0))
176176
isbitsunion(x) = false
177177

178+
isptrelement(t::Type) = (@_pure_meta; ccall(:jl_array_store_unboxed, Cint, (Any,), t) == Cint(0))
179+
180+
function _unsetindex!(A::Array{T}, i::Int) where {T}
181+
@boundscheck checkbounds(A, i)
182+
if isptrelement(T)
183+
t = @_gc_preserve_begin A
184+
p = Ptr{Ptr{Cvoid}}(pointer(A))
185+
unsafe_store!(p, C_NULL, i)
186+
@_gc_preserve_end t
187+
end
188+
return A
189+
end
190+
191+
178192
"""
179193
Base.bitsunionsize(U::Union)
180194
@@ -1267,7 +1281,7 @@ If specified, replacement values from an ordered
12671281
collection will be spliced in place of the removed item.
12681282
12691283
# Examples
1270-
```jldoctest splice!
1284+
```jldoctest
12711285
julia> A = [6, 5, 4, 3, 2, 1]; splice!(A, 5)
12721286
2
12731287
@@ -1338,8 +1352,8 @@ To insert `replacement` before an index `n` without removing any items, use
13381352
`splice!(collection, n:n-1, replacement)`.
13391353
13401354
# Examples
1341-
```jldoctest splice!
1342-
julia> splice!(A, 4:3, 2)
1355+
```jldoctest
1356+
julia> A = [-1, -2, -3, 5, 4, 3, -1]; splice!(A, 4:3, 2)
13431357
0-element Array{Int64,1}
13441358
13451359
julia> A

0 commit comments

Comments
 (0)