Skip to content
Open
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 .buildkite-external-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
main
release-julia-1.13
2 changes: 1 addition & 1 deletion Compiler/src/tfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ function pointer_eltype(@nospecialize(ptr))
end

@nospecs function pointerarith_tfunc(𝕃::AbstractLattice, ptr, offset)
return ptr
return widenconst(ptr)
end
@nospecs function pointerref_tfunc(𝕃::AbstractLattice, a, i, align)
return pointer_eltype(a)
Expand Down
7 changes: 7 additions & 0 deletions Compiler/test/effects.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1486,3 +1486,10 @@ let effects = Base.infer_effects((Core.SimpleVector,Int); optimize=false) do sve
end

@test Compiler.is_nothrow(Base.infer_effects(length, (Core.SimpleVector,)))


# https://github.com/JuliaLang/julia/issues/60009
function null_offset(offset)
Ptr{UInt8}(C_NULL) + offset
end
@test null_offset(Int(100)) == Ptr{UInt8}(UInt(100))
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ distcleanall: cleanall

# Generate compilation database (leverages existing clang tooling setup)
compile-database:
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/src compile-database-src
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/src compile-database

test: check-whitespace $(JULIA_BUILD_MODE)
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/test default JULIA_BUILD_MODE=$(JULIA_BUILD_MODE)
Expand Down
4 changes: 4 additions & 0 deletions base/docs/Docs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ function objectdoc(__source__, __module__, str, def, expr, sig = :(Union{}))
# Special case: `global x` should return nothing to avoid syntax errors with assigning to a value
val = nothing
else
if isexpr(def, :(=), 2) && isexpr(def.args[1], :curly)
# workaround for lowering bug #60001
exdef = Expr(:block, exdef)
end
val = :val
exdef = Expr(:(=), val, exdef)
end
Expand Down
44 changes: 22 additions & 22 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4018,7 +4018,7 @@ end
record_reason(::Nothing, ::String) = nothing
function list_reasons(reasons::Dict{String,Int})
isempty(reasons) && return ""
return " (cache misses: $(join(("$k ($v)" for (k,v) in reasons), ", ")))"
return " (caches not reused: $(join(("$v for $k" for (k,v) in reasons), ", ")))"
end
list_reasons(::Nothing) = ""

Expand All @@ -4027,7 +4027,7 @@ function any_includes_stale(includes::Vector{CacheHeaderIncludes}, cachefile::St
f, fsize_req, hash_req, ftime_req = chi.filename, chi.fsize, chi.hash, chi.mtime
if startswith(f, string("@depot", Filesystem.pathsep()))
@debug("Rejecting stale cache file $cachefile because its depot could not be resolved")
record_reason(reasons, "nonresolveable depot")
record_reason(reasons, "file location uses unresolved depot path")
return true
end
if !ispath(f)
Expand All @@ -4036,7 +4036,7 @@ function any_includes_stale(includes::Vector{CacheHeaderIncludes}, cachefile::St
continue
end
@debug "Rejecting stale cache file $cachefile because file $f does not exist"
record_reason(reasons, "missing sourcefile")
record_reason(reasons, "source file not found")
return true
end
if ftime_req >= 0.0
Expand All @@ -4050,21 +4050,21 @@ function any_includes_stale(includes::Vector{CacheHeaderIncludes}, cachefile::St
!( 0 < (ftime_req - ftime) < 1e-6 ) # PR #45552: Compensate for Windows tar giving mtimes that may be incorrect by up to one microsecond
if is_stale
@debug "Rejecting stale cache file $cachefile because mtime of include_dependency $f has changed (mtime $ftime, before $ftime_req)"
record_reason(reasons, "include_dependency mtime change")
record_reason(reasons, "file modification time changed")
return true
end
else
fstat = stat(f)
fsize = filesize(fstat)
if fsize != fsize_req
@debug "Rejecting stale cache file $cachefile because file size of $f has changed (file size $fsize, before $fsize_req)"
record_reason(reasons, "include_dependency fsize change")
record_reason(reasons, "file size changed")
return true
end
hash = isdir(fstat) ? _crc32c(join(readdir(f))) : open(_crc32c, f, "r")
if hash != hash_req
@debug "Rejecting stale cache file $cachefile because hash of $f has changed (hash $hash, before $hash_req)"
record_reason(reasons, "include_dependency fhash change")
record_reason(reasons, "file content changed")
return true
end
end
Expand Down Expand Up @@ -4092,7 +4092,7 @@ end
checksum = isvalid_cache_header(io)
if iszero(checksum)
@debug "Rejecting cache file $cachefile due to it containing an incompatible cache header"
record_reason(reasons, "incompatible header")
record_reason(reasons, "different Julia build configuration")
return true # incompatible cache file
end
modules, (includes, _, requires), required_modules, srctextpos, prefs, prefs_hash, clone_targets, actual_flags = parse_cache_header(io, cachefile)
Expand All @@ -4105,7 +4105,7 @@ end
requested flags: $(requested_flags) [$(_cacheflag_to_uint8(requested_flags))]
cache file: $(CacheFlags(actual_flags)) [$actual_flags]
"""
record_reason(reasons, "mismatched flags")
record_reason(reasons, "different compilation options")
return true
end
pkgimage = !isempty(clone_targets)
Expand All @@ -4114,7 +4114,7 @@ end
if JLOptions().use_pkgimages == 0
# presence of clone_targets means native code cache
@debug "Rejecting cache file $cachefile for $modkey since it would require usage of pkgimage"
record_reason(reasons, "requires pkgimages")
record_reason(reasons, "native code caching disabled")
return true
end
rejection_reasons = check_clone_targets(clone_targets)
Expand All @@ -4123,12 +4123,12 @@ end
Reasons=rejection_reasons,
var"Image Targets"=parse_image_targets(clone_targets),
var"Current Targets"=current_image_targets())
record_reason(reasons, "target mismatch")
record_reason(reasons, "different system or CPU target")
return true
end
if !isfile(ocachefile)
@debug "Rejecting cache file $cachefile for $modkey since pkgimage $ocachefile was not found"
record_reason(reasons, "missing ocachefile")
record_reason(reasons, "native code cache file not found")
return true
end
else
Expand All @@ -4137,15 +4137,15 @@ end
id = first(modules)
if id.first != modkey && modkey != PkgId("")
@debug "Rejecting cache file $cachefile for $modkey since it is for $id instead"
record_reason(reasons, "for different pkgid")
record_reason(reasons, "different package identifier")
return true
end
id_build = id.second
id_build = (UInt128(checksum) << 64) | (id_build % UInt64)
if build_id != UInt128(0)
if id_build != build_id
@debug "Ignoring cache file $cachefile for $modkey ($(UUID(id_build))) since it does not provide desired build_id ($((UUID(build_id))))"
record_reason(reasons, "for different buildid")
record_reason(reasons, "different build identifier")
return true
end
end
Expand All @@ -4171,20 +4171,20 @@ end
continue
elseif M == Core
@debug "Rejecting cache file $cachefile because it was made with a different julia version"
record_reason(reasons, "wrong julia version")
record_reason(reasons, "different Julia version")
return true # Won't be able to fulfill dependency
elseif ignore_loaded || !stalecheck
# Used by Pkg.precompile given that there it's ok to precompile different versions of loaded packages
else
@debug "Rejecting cache file $cachefile because module $req_key is already loaded and incompatible."
record_reason(reasons, "wrong dep version loaded")
record_reason(reasons, "different dependency version already loaded")
return true # Won't be able to fulfill dependency
end
end
path = locate_package(req_key) # TODO: add env and/or skip this when stalecheck is false
if path === nothing
@debug "Rejecting cache file $cachefile because dependency $req_key not found."
record_reason(reasons, "dep missing source")
record_reason(reasons, "dependency source file not found")
return true # Won't be able to fulfill dependency
end
depmods[i] = (path, req_key, req_build_id)
Expand All @@ -4203,7 +4203,7 @@ end
break
end
@debug "Rejecting cache file $cachefile because it provides the wrong build_id (got $((UUID(build_id)))) for $req_key (want $(UUID(req_build_id)))"
record_reason(reasons, "wrong dep buildid")
record_reason(reasons, "different dependency build identifier")
return true # cachefile doesn't provide the required version of the dependency
end
end
Expand All @@ -4219,7 +4219,7 @@ end
if !(isreadable(stdlib_path) && samefile(stdlib_path, modpath))
!samefile(fixup_stdlib_path(includes[1].filename), modpath)
@debug "Rejecting cache file $cachefile because it is for file $(includes[1].filename) not file $modpath"
record_reason(reasons, "wrong source")
record_reason(reasons, "different source file path")
return true # cache file was compiled from a different path
end
end
Expand All @@ -4228,7 +4228,7 @@ end
pkg = identify_package(modkey, req_modkey.name)
if pkg != req_modkey
@debug "Rejecting cache file $cachefile because uuid mapping for $modkey => $req_modkey has changed, expected $modkey => $(repr("text/plain", pkg))"
record_reason(reasons, "dep uuid changed")
record_reason(reasons, "dependency identifier changed")
return true
end
end
Expand All @@ -4239,22 +4239,22 @@ end

if !isvalid_file_crc(io)
@debug "Rejecting cache file $cachefile because it has an invalid checksum"
record_reason(reasons, "invalid checksum")
record_reason(reasons, "cache file checksum is invalid")
return true
end

if pkgimage
if !isvalid_pkgimage_crc(io, ocachefile::String)
@debug "Rejecting cache file $cachefile because $ocachefile has an invalid checksum"
record_reason(reasons, "ocachefile invalid checksum")
record_reason(reasons, "native code cache checksum is invalid")
return true
end
end

curr_prefs_hash = get_preferences_hash(id.uuid, prefs)
if prefs_hash != curr_prefs_hash
@debug "Rejecting cache file $cachefile because preferences hash does not match 0x$(string(prefs_hash, base=16)) != 0x$(string(curr_prefs_hash, base=16))"
record_reason(reasons, "preferences hash mismatch")
record_reason(reasons, "package preferences changed")
return true
end

Expand Down
Loading