From 08f12b9cc20b83f8660079afcd7c91cd6c13bcdf Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Thu, 14 Jul 2022 20:22:33 +0200 Subject: [PATCH 01/44] fix convert call in Artifacts.jl (#46040) (cherry picked from commit e96b19d096c45fec5e5d3f0d62a9b5f2a7b2428b) --- stdlib/Artifacts/src/Artifacts.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Artifacts/src/Artifacts.jl b/stdlib/Artifacts/src/Artifacts.jl index 27e352be59270..724bda22ae531 100644 --- a/stdlib/Artifacts/src/Artifacts.jl +++ b/stdlib/Artifacts/src/Artifacts.jl @@ -697,7 +697,7 @@ end with_artifacts_directory(f::Function, artifacts_dir::AbstractString) = with_artifacts_directory(f, String(artifacts_dir)::String) query_override(pkg::Base.UUID, artifact_name::AbstractString; overrides::Dict=load_overrides()) = - query_override(pkg, String(artifact_name)::String; overrides=convert(Dict{Symbol, Any}(overrides))) + query_override(pkg, String(artifact_name)::String; overrides=convert(Dict{Symbol, Any}, overrides)) unpack_platform(entry::Dict, name::AbstractString, artifacts_toml::AbstractString) = unpack_platform(convert(Dict{String, Any}, entry), String(name)::String, String(artifacts_toml)::String) load_artifacts_toml(artifacts_toml::AbstractString; kwargs...) = From 78ad6ff30f59ff2dbc8ce87557cdf247e1689fec Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Fri, 15 Jul 2022 13:43:58 -0700 Subject: [PATCH 02/44] Allow `BUILDKITE_BRANCH` to provide branch name (#46053) * Allow `BUILDKITE_BRANCH` to provide branch name Our CI system checks commits out as a detached head, which breaks our `Base.GIT_VERSION_INFO.branch` information. * Fix typo (cherry picked from commit d117975aa629bee97901a2c132f028adf23d16ae) --- base/version_git.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/base/version_git.sh b/base/version_git.sh index 2a3352d1066ef..39ebb1b8ec5ee 100644 --- a/base/version_git.sh +++ b/base/version_git.sh @@ -41,7 +41,15 @@ if [ -n "$(git status --porcelain)" ]; then # append dirty mark '*' if the repository has uncommitted changes commit_short="$commit_short"* fi -branch=$(git rev-parse --abbrev-ref HEAD) + +# Our CI system checks commits out as a detached head, and so we must +# use the provided branch name, as we cannot autodetect this commit as +# the tip of any such branch. +if [ -n "${BUILDKITE_BRANCH}" ]; then + branch="${BUILDKITE_BRANCH}" +else + branch=$(git rev-parse --abbrev-ref HEAD) +fi topdir=$(git rev-parse --show-toplevel) verchanged=$(git blame -L ,1 -sl -- "$topdir/VERSION" | cut -f 1 -d " ") From 7674873b4f42d1e32f6846fa38fbb7ef808774a0 Mon Sep 17 00:00:00 2001 From: Ian Date: Sat, 16 Jul 2022 16:05:51 -0400 Subject: [PATCH 03/44] fixup time_imports news entry (cherry picked from commit dad1c7fabcdbfab739195023b8bf5d85978ebace) --- NEWS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 63172f026cac5..c13c55eda38d8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -111,7 +111,6 @@ New library features * `extrema` now accepts an `init` keyword argument ([#36265], [#43604]). * `Iterators.countfrom` now accepts any type that defines `+` ([#37747]). * `@time` now separates out % time spent recompiling invalidated methods ([#45015]). -* `@time_imports` now shows any compilation and recompilation time percentages per import ([#45064]). Standard library changes ------------------------ @@ -147,7 +146,8 @@ Standard library changes #### InteractiveUtils -* New macro `@time_imports` for reporting any time spent importing packages and their dependencies ([#41612]). +* New macro `@time_imports` for reporting any time spent importing packages and their dependencies, highlighting + compilation and recompilation time as percentages per import ([#41612],[#45064]). #### LinearAlgebra From c8c6cc712f50693684c358904aee8bda222583d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Tue, 12 Jul 2022 20:43:49 +0100 Subject: [PATCH 04/44] [LibCURL_jll] Update to v7.84 (#45967) (cherry picked from commit 9629154b023de2b085b75fccb20c9a80a604b244) --- deps/Versions.make | 2 +- deps/checksums/curl | 68 ++++++++++++++++----------------- stdlib/LibCURL_jll/Project.toml | 2 +- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/deps/Versions.make b/deps/Versions.make index 09ba2b4e3e8a9..c250dfe984671 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -26,7 +26,7 @@ GMP_VER := 6.2.1 GMP_JLL_NAME := GMP # LibCURL -CURL_VER := 7.83.1 +CURL_VER := 7.84.0 CURL_JLL_NAME := LibCURL # LAPACK, source-only diff --git a/deps/checksums/curl b/deps/checksums/curl index 77cb46923aefd..0f235d8238e8e 100644 --- a/deps/checksums/curl +++ b/deps/checksums/curl @@ -1,36 +1,36 @@ LibCURL-fd8af649b38ae20c3ff7f5dca53753512ca00376.tar.gz/md5/f082283e6a35fcba5b63c9a6219d8003 LibCURL-fd8af649b38ae20c3ff7f5dca53753512ca00376.tar.gz/sha512/3bea5fa3fb6d29651daa923ae6bcb8eeb356ab9f2a1f3e005a6b746b617b0cf609aed4cadda4181783959840873c04b18e34e45ab973549169d19775a05ea01e -LibCURL.v7.83.1+1.aarch64-apple-darwin.tar.gz/md5/de0048ffcd0cf779f648c58df4d87ea9 -LibCURL.v7.83.1+1.aarch64-apple-darwin.tar.gz/sha512/874d1f83e0ff21ff8a5e39f29ca03588142e5f292a7e3bfb36f6f6f4f3e5b518b76dc8c0272a2df1167daed108b92f0e620277e6f3e2c091aa60934d18c292e4 -LibCURL.v7.83.1+1.aarch64-linux-gnu.tar.gz/md5/55bb17c62f5cf9894770bbc6e9fcce45 -LibCURL.v7.83.1+1.aarch64-linux-gnu.tar.gz/sha512/bb1e2246bb169ad7cc36749d56cf4bf6d3bd57bb9d141c5d807be5048ecc3cb3adeef95438d52c6360b5e70ba0ec75efb134c381affc812d0f5e1d8e76ff9884 -LibCURL.v7.83.1+1.aarch64-linux-musl.tar.gz/md5/52ce54a88113140c7f7c57895054d68c -LibCURL.v7.83.1+1.aarch64-linux-musl.tar.gz/sha512/dbd385d28ba6cf9e7c0ca05e9b10bafc041320c307ea7571bb972ae90b71a29ffa50d7c934d358c9e35cb168d3a378589cf0de66d5f13fe69da8a44ba1712284 -LibCURL.v7.83.1+1.armv6l-linux-gnueabihf.tar.gz/md5/68150dd7d41938065f444a1fc162d8d0 -LibCURL.v7.83.1+1.armv6l-linux-gnueabihf.tar.gz/sha512/0d8eccd3fc30160899789b91ff12ae08d97f48c08c25dcbcf737ceb9a9388fb082b7abac53da6e4711f9a5ff40700ac735d748f13895ea5205f919449182711b -LibCURL.v7.83.1+1.armv6l-linux-musleabihf.tar.gz/md5/963de5f46421087fc4f0c0e3674d6a5b -LibCURL.v7.83.1+1.armv6l-linux-musleabihf.tar.gz/sha512/a9b491384a19d4cb26ab48a09dff8e58989b0e2ba8f143a0740daa582ddcf4a29c21216045baaeec5d121922a2dc38e9072174aa8f5deaf2d38ea1997a1c6ba5 -LibCURL.v7.83.1+1.armv7l-linux-gnueabihf.tar.gz/md5/b64791ed06518e53d5e0bc713bf82af4 -LibCURL.v7.83.1+1.armv7l-linux-gnueabihf.tar.gz/sha512/30dcbbb3f944da18a9764728850fe24ba7612d11fe0b81f6c56e7735479128b0a55bd43d29cb326db20dc8f1fc9a1407bb7f54da1526d5fa182ab223e11377d0 -LibCURL.v7.83.1+1.armv7l-linux-musleabihf.tar.gz/md5/fc64fc8de930b1f2deee6910706da54e -LibCURL.v7.83.1+1.armv7l-linux-musleabihf.tar.gz/sha512/04e9cfdf55403ce2c7077356f05a98fe6a94772b5846ceff0cc81f0ebac95df85e259ecf4ded2baa369f55580892d083c74460e436a33c0286a797db60497558 -LibCURL.v7.83.1+1.i686-linux-gnu.tar.gz/md5/44a4f66754105b24102135fe62691aab -LibCURL.v7.83.1+1.i686-linux-gnu.tar.gz/sha512/9200ec12725fbf93039e534625f8cb14607be820df27ac4bcabcf8332f2e5214604b6c1efd6f4d1ae6c554b8cdd0808a1dda0f9e1fba7764484c0b00e351db7b -LibCURL.v7.83.1+1.i686-linux-musl.tar.gz/md5/bf0a521a03bb216430e66d29e9bd597e -LibCURL.v7.83.1+1.i686-linux-musl.tar.gz/sha512/ef549d533d1a1d40a0e10ec68611f586878fd3a218a9d388ae3328e4fad3dc613ed700671bbbd1f62554555073a7ab224c122fb31e7bcc6c751a7d0ce6fba9f6 -LibCURL.v7.83.1+1.i686-w64-mingw32.tar.gz/md5/c48af4c27cecbc38694cce627412eceb -LibCURL.v7.83.1+1.i686-w64-mingw32.tar.gz/sha512/9dbdbc8cbeafa913debfeed88b0514355fec89a48945716a43baae94e9855cb84cb9ba794cd022958636858a5be9f671f92a40ad3cd3b5145245c94cb26112d7 -LibCURL.v7.83.1+1.powerpc64le-linux-gnu.tar.gz/md5/50256b715d014ef9a2b328668a71a5dd -LibCURL.v7.83.1+1.powerpc64le-linux-gnu.tar.gz/sha512/730eef536baa0be00fc9f1e87f82fb84a051141bab277f11873e7e2fdaeced3964e9a0e4343504e1cb7b89fbf92df8890fa33eaed9b3c6555171c8a8adbf9dcf -LibCURL.v7.83.1+1.x86_64-apple-darwin.tar.gz/md5/367d7944167a83ff2a8d4982c8504e47 -LibCURL.v7.83.1+1.x86_64-apple-darwin.tar.gz/sha512/591f268ecbb0f5c43266876e9e0f33235b5c2e96aae4386d22c50785a4466e4b3f14e5b48117f1751733492c4ccc54638bfcf10c904d12145db7881e07778a23 -LibCURL.v7.83.1+1.x86_64-linux-gnu.tar.gz/md5/57bf4c88945b3f83e336754b075b35f7 -LibCURL.v7.83.1+1.x86_64-linux-gnu.tar.gz/sha512/71984f5240c5962422cf69069b3f0d0529a64c9ccb9995b9f26742a19dc12ae9700e888fe8b79b17edfcaa1b13b24a56b4d776453d83cce233dfa9c3fdb79660 -LibCURL.v7.83.1+1.x86_64-linux-musl.tar.gz/md5/64f3026a24b6a7df77e8325a108e76db -LibCURL.v7.83.1+1.x86_64-linux-musl.tar.gz/sha512/bf0c16b90b7b6ef33ed7d4678df539f88d041f5a78942ca5549d9d0e7ce8cef38af8da1f68d9d3999f969805dd1da546da3d289b32dad442ec1b2b5e44d158cb -LibCURL.v7.83.1+1.x86_64-unknown-freebsd.tar.gz/md5/578ba7e5607ce2de16132ab8f7a213d9 -LibCURL.v7.83.1+1.x86_64-unknown-freebsd.tar.gz/sha512/42c5892038aaedbbb19e192fc867e00d354da7cdf11c90151124f3c9006883960107663eaa865ee482895ee5784b5c5f487ea8aeef2a8ebbbe51f59d693e0778 -LibCURL.v7.83.1+1.x86_64-w64-mingw32.tar.gz/md5/5e5bb662234dd4520f4e4f73f8536daa -LibCURL.v7.83.1+1.x86_64-w64-mingw32.tar.gz/sha512/4553dc10d464771166b8a53473e68a23baa6fb8f65f09a5a274826d313dafc3289348e0e8026abcec6fea98e461aca31001176387526afcf3966167b71ec2178 -curl-7.83.1.tar.bz2/md5/08626822d50cbef47503f220718b920b -curl-7.83.1.tar.bz2/sha512/c43ec2da9c8609a312f723c0b3eff7e171ed1258c6ed1af16020190d4253e6bea63ca3905f04d0ca46a97986a8bb79be1d532f8d68fcbdbacfa80cc42f134db1 +LibCURL.v7.84.0+0.aarch64-apple-darwin.tar.gz/md5/0e1d2884864419df574b61a6db15ef9d +LibCURL.v7.84.0+0.aarch64-apple-darwin.tar.gz/sha512/18986ce04a39a8935d3b2e595e9c7b6ecd38340f1f886cb5b16880ad72b9889a5bba8720c30c2775add115c0385ca1f98956df2cb89cd4ffa92d67e433a8f12b +LibCURL.v7.84.0+0.aarch64-linux-gnu.tar.gz/md5/e4d57ee8f1304b8fde272a373a13cdf6 +LibCURL.v7.84.0+0.aarch64-linux-gnu.tar.gz/sha512/88ee9129a3053b8221808f977561541be573068c5abf388a78b1c748b6c7cca2cd23f8bfcb779541fc83dff07a7a3c979194359f6cd4d0cb6d6696affac03c11 +LibCURL.v7.84.0+0.aarch64-linux-musl.tar.gz/md5/f40a48d02ee841d7393477ef63163c43 +LibCURL.v7.84.0+0.aarch64-linux-musl.tar.gz/sha512/9998db3a896fa46a51d2da2a07b48470a9719fe301fb0589f04e2bd0e1bd116c5c74ca8f03d4dff6529339fdf68a42788ed33c629794bc3886e5147f51c53eb7 +LibCURL.v7.84.0+0.armv6l-linux-gnueabihf.tar.gz/md5/223727927aff997175d1d8bdcea39c79 +LibCURL.v7.84.0+0.armv6l-linux-gnueabihf.tar.gz/sha512/f856ca8a63f55d455ae161e58cd5e195ffb80ceaeeaa7cf306a3d192ae51a1ebfb93e87e27aa90f513294e27beb8e1358c7a07eb5a3a85d434327b4331211426 +LibCURL.v7.84.0+0.armv6l-linux-musleabihf.tar.gz/md5/efc2bcc500edaaf59542f86119b9a090 +LibCURL.v7.84.0+0.armv6l-linux-musleabihf.tar.gz/sha512/297f2999f1544816e2edd1fb78aa5f8abf9dde9b782a62054b0f61974f3dbde7ae67cf4d8dd63c21082de5f89dfeb32aa099e2228851242c3379a811883f92e4 +LibCURL.v7.84.0+0.armv7l-linux-gnueabihf.tar.gz/md5/e5a0a5b7f1e664675bc2ac4970b39297 +LibCURL.v7.84.0+0.armv7l-linux-gnueabihf.tar.gz/sha512/bd9c602b69841dd1b8625627c774dbf99e7c3fcf951b00299dbe8007e8ea2bf5a312fa34f0be9e21a7ac947332652ffa55fdbcdf21096449a8ab982c9a7ce776 +LibCURL.v7.84.0+0.armv7l-linux-musleabihf.tar.gz/md5/05f04c53e4a04ced1d6aefc1e9493332 +LibCURL.v7.84.0+0.armv7l-linux-musleabihf.tar.gz/sha512/7ea517a048d8d7a940f5e32d1476366d9e63bf0103276c8208cd23e1ae7e4dd70e0acba4cdeafd1e9a5db90dfc213bd0895ebef755ea237cab3fc9d39808c325 +LibCURL.v7.84.0+0.i686-linux-gnu.tar.gz/md5/97cffa9e6e771e5b96d77a0acff157af +LibCURL.v7.84.0+0.i686-linux-gnu.tar.gz/sha512/84b81c69c021e8aad542c909c81ace41ea96650ef1dcd46b1ef29b683a870abddff96b8d2ecde593c8cea427256dfa194cf5bd4e5b610b0b8ce779e383aadb76 +LibCURL.v7.84.0+0.i686-linux-musl.tar.gz/md5/3dccdbc2cde661c7d868f2bd7d5c0316 +LibCURL.v7.84.0+0.i686-linux-musl.tar.gz/sha512/7625d1ba19e69cce185d61ef09374af4d433730f4908f1ce5da7d3352c96a58e1543dc66a0cb01000c4ced9033e2b2137877a4d7c9f8f0fa551613e436cb574c +LibCURL.v7.84.0+0.i686-w64-mingw32.tar.gz/md5/bd2b06eadacaf984cc25993c242517eb +LibCURL.v7.84.0+0.i686-w64-mingw32.tar.gz/sha512/21aee096ff42e3c4dfbf6b8c9e3cbdcc4cae234ac784e871d4ca55424263eb59cfd2b159287861a076373017ab5454d0c9f93c99d87e90f263563ddee28d737d +LibCURL.v7.84.0+0.powerpc64le-linux-gnu.tar.gz/md5/221f481553cdb28d97a7caa69a895b12 +LibCURL.v7.84.0+0.powerpc64le-linux-gnu.tar.gz/sha512/90caf2fe245a0e1f5816fadf2c0b8e7bda5df38d716c309aadb37721923f57919af09c6a7396ce2888dc02ae02670da9300c0e5814d5ad851bdb4e661c48bc48 +LibCURL.v7.84.0+0.x86_64-apple-darwin.tar.gz/md5/9f609374291fe24ec9bd752c967d3072 +LibCURL.v7.84.0+0.x86_64-apple-darwin.tar.gz/sha512/8a8461a8cf7591a798d7ed32423a33b38425d32e3a7fd4feda06095237ae6dc43c6737dcc55bb86e260080198d5295f11fee88883354425b132c8e04bfa9feaf +LibCURL.v7.84.0+0.x86_64-linux-gnu.tar.gz/md5/c1cc01bbc7aec5b272f7dbe803fda257 +LibCURL.v7.84.0+0.x86_64-linux-gnu.tar.gz/sha512/e6f9ff29a8ab46537054e1fa364ece163fd4376d16fe7e22dc94c0a640397b45659c143b8e170b1b01ef800ab7f53a9f4087197f2fae9002e061530cefe6157b +LibCURL.v7.84.0+0.x86_64-linux-musl.tar.gz/md5/20dec1cebca3b2ef188a31ae50a40b42 +LibCURL.v7.84.0+0.x86_64-linux-musl.tar.gz/sha512/9d5675f90eb348ecb637ee7ed31d68701504efa7871c9f55eacb331b6717eae893e88c63cb5abd6ca9d13d34a055d67d0cf36ca173f2bd58e19b65cabbd816e7 +LibCURL.v7.84.0+0.x86_64-unknown-freebsd.tar.gz/md5/a57884bfdcbca83c1f14ece9d501224f +LibCURL.v7.84.0+0.x86_64-unknown-freebsd.tar.gz/sha512/f8bf1755b3a758b351532ede8f19af6ace8cfcf59b656067ddfd1135533052b340ca35e9cb0e134e1f082cea19860af2029448fc1ca231a32bf03bd07698d4da +LibCURL.v7.84.0+0.x86_64-w64-mingw32.tar.gz/md5/71182295492b38bb419a71489f01fa54 +LibCURL.v7.84.0+0.x86_64-w64-mingw32.tar.gz/sha512/9d84bfad36ca69b3ed2519bef8845cece4d9b3e8c9e1e040f744c6163469c732cfd1301cf5e5c9e23c25420b1b17a844bcb43bde858a501eb6133dbc266f2f75 +curl-7.84.0.tar.bz2/md5/35fca80437f32dd7ef6c2e30b4916f06 +curl-7.84.0.tar.bz2/sha512/57823295e2c036355d9170b9409d698e1cece882b2cb55ce33fcf384dd30a75c00e68d6550f3b3faba4ef38443e2172c731ddfef6e508b99476f4e36d25bdd1c diff --git a/stdlib/LibCURL_jll/Project.toml b/stdlib/LibCURL_jll/Project.toml index 3719fcbf37bef..45dbb45830837 100644 --- a/stdlib/LibCURL_jll/Project.toml +++ b/stdlib/LibCURL_jll/Project.toml @@ -1,6 +1,6 @@ name = "LibCURL_jll" uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.83.1+1" +version = "7.84.0+0" [deps] LibSSH2_jll = "29816b5a-b9ab-546f-933c-edad1886dfa8" From 3dc152b073612081d30a198080702fc83f92aef0 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 7 Apr 2022 13:47:50 -0400 Subject: [PATCH 05/44] fix Libc.rand and seed problems (#44432) Continuation from #43606 - Replaces thread-unsafe function `rand` with `jl_rand`. - Fixes `_ad_hoc_entropy_source` fallback in Random. - Uses uv_random for more direct access to quality-randomness (usually a syscall rather than a file.) - Ensures Array{Bool} are valid when created from RandomDevice. (cherry picked from commit b4bed7171730a8ea29b8ead2a16dfa7e78c2b15f) --- base/Base.jl | 5 --- base/error.jl | 2 +- base/libc.jl | 38 ++++++++-------- base/randomdevice.jl | 77 --------------------------------- src/coverage.cpp | 4 +- src/gc-debug.c | 3 +- src/init.c | 1 + src/jl_exported_funcs.inc | 1 - src/jl_uv.c | 9 ---- src/julia.h | 5 +-- src/julia_atomics.h | 2 +- src/julia_internal.h | 13 +++--- src/runtime_ccall.cpp | 2 +- src/signal-handling.c | 2 +- src/signals-unix.c | 2 +- src/sys.c | 34 +++++++++++++++ src/task.c | 28 ++++++------ src/threading.c | 2 +- stdlib/Random/src/RNGs.jl | 79 ++++++++++++---------------------- stdlib/Random/test/runtests.jl | 5 +-- test/error.jl | 10 ++--- 21 files changed, 119 insertions(+), 205 deletions(-) delete mode 100644 base/randomdevice.jl diff --git a/base/Base.jl b/base/Base.jl index a3fe44a2add86..b2e79224edbd7 100644 --- a/base/Base.jl +++ b/base/Base.jl @@ -292,9 +292,6 @@ include("process.jl") include("ttyhascolor.jl") include("secretbuffer.jl") -# RandomDevice support -include("randomdevice.jl") - # core math functions include("floatfuncs.jl") include("math.jl") @@ -484,8 +481,6 @@ end if is_primary_base_module function __init__() - # for the few uses of Libc.rand in Base: - Libc.srand() # Base library init reinit_stdio() Multimedia.reinit_displays() # since Multimedia.displays uses stdout as fallback diff --git a/base/error.jl b/base/error.jl index 9ffcac5d7820c..4459e54def19b 100644 --- a/base/error.jl +++ b/base/error.jl @@ -261,7 +261,7 @@ function iterate(ebo::ExponentialBackOff, state= (ebo.n, min(ebo.first_delay, eb state[1] < 1 && return nothing next_n = state[1]-1 curr_delay = state[2] - next_delay = min(ebo.max_delay, state[2] * ebo.factor * (1.0 - ebo.jitter + (rand(Float64) * 2.0 * ebo.jitter))) + next_delay = min(ebo.max_delay, state[2] * ebo.factor * (1.0 - ebo.jitter + (Libc.rand(Float64) * 2.0 * ebo.jitter))) (curr_delay, (next_n, next_delay)) end length(ebo::ExponentialBackOff) = ebo.n diff --git a/base/libc.jl b/base/libc.jl index 38b62847eaeb4..f6776e8aec4f9 100644 --- a/base/libc.jl +++ b/base/libc.jl @@ -255,7 +255,7 @@ time() = ccall(:jl_clock_now, Float64, ()) Get Julia's process ID. """ -getpid() = ccall(:jl_getpid, Int32, ()) +getpid() = ccall(:uv_os_getpid, Int32, ()) ## network functions ## @@ -376,31 +376,35 @@ free(p::Cwstring) = free(convert(Ptr{Cwchar_t}, p)) ## Random numbers ## +# Access to very high quality (kernel) randomness +function getrandom!(A::Union{Array,Base.RefValue}) + ret = ccall(:uv_random, Cint, (Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}, Csize_t, Cuint, Ptr{Cvoid}), + C_NULL, C_NULL, A, sizeof(A), 0, C_NULL) + Base.uv_error("getrandom", ret) + return A +end +_make_uint64_seed() = getrandom!(Base.RefValue{UInt64}())[] + # To limit dependency on rand functionality implemented in the Random module, -# Libc.rand is used in file.jl, and could be used in error.jl (but it breaks a test) +# Libc.rand is used in Base (it also is independent from Random.seed, so is +# only affected by `Libc.srand(seed)` calls) """ - rand([T::Type]) + rand([T::Type]=UInt32) -Interface to the C `rand()` function. If `T` is provided, generate a value of type `T` -by composing two calls to `rand()`. `T` can be `UInt32` or `Float64`. +Generate a random number of type `T`. `T` can be `UInt32` or `Float64`. """ -rand() = ccall(:rand, Cint, ()) -@static if Sys.iswindows() - # Windows RAND_MAX is 2^15-1 - rand(::Type{UInt32}) = ((rand() % UInt32) << 17) ⊻ ((rand() % UInt32) << 8) ⊻ (rand() % UInt32) -else - # RAND_MAX is at least 2^15-1 in theory, but we assume 2^16-1 - # on non-Windows systems (in practice, it's 2^31-1) - rand(::Type{UInt32}) = ((rand() % UInt32) << 16) ⊻ (rand() % UInt32) -end -rand(::Type{Float64}) = rand(UInt32) * 2.0^-32 +rand() = ccall(:jl_rand, UInt64, ()) % UInt32 +rand(::Type{UInt32}) = rand() +rand(::Type{Float64}) = rand() * 2.0^-32 """ srand([seed]) -Interface to the C `srand(seed)` function. +Set a value for the current global `seed`. """ -srand(seed=Base._make_uint_seed()) = ccall(:srand, Cvoid, (Cuint,), seed) +function srand(seed::Integer=_make_uint64_seed()) + ccall(:jl_srand, Cvoid, (UInt64,), seed % UInt64) +end struct Cpasswd username::Cstring diff --git a/base/randomdevice.jl b/base/randomdevice.jl deleted file mode 100644 index d63ff7edc1647..0000000000000 --- a/base/randomdevice.jl +++ /dev/null @@ -1,77 +0,0 @@ -# This file is a part of Julia. License is MIT: https://julialang.org/license - -# This file contains the minimal support of RandomDevice for Base's own usage. -# The actual RandomDevice type that makes use of this infrastructure is defined -# in the Random stdlib. - -module DevRandomState - if !Sys.iswindows() - mutable struct FileRef - @atomic file::Union{IOStream, Nothing} - end - const DEV_RANDOM = FileRef(nothing) - const DEV_URANDOM = FileRef(nothing) - end - function __init__() - if !Sys.iswindows() - @atomic DEV_RANDOM.file = nothing - @atomic DEV_URANDOM.file = nothing - end - end -end - -if Sys.iswindows() - function RtlGenRandom!(A::Union{Array, Ref}) - Base.windowserror("SystemFunction036 (RtlGenRandom)", 0 == ccall( - (:SystemFunction036, :Advapi32), stdcall, UInt8, (Ptr{Cvoid}, UInt32), - A, sizeof(A))) - end - - # Manually implemented to work without the Random machinery - function _rand_uint() - r = Ref{Cuint}() - RtlGenRandom!(r) - return r[] - end -else # !windows - function _get_dev_random_fd(unlimited::Bool) - ref = unlimited ? DevRandomState.DEV_URANDOM : DevRandomState.DEV_RANDOM - fd = ref.file - if fd === nothing - fd = open(unlimited ? "/dev/urandom" : "/dev/random") - old, ok = @atomicreplace ref.file nothing => fd - if !ok - close(fd) - fd = old::IOStream - end - end - return fd - end - - # Manually implemented to work without the Random machinery - function _rand_uint() - return read(_get_dev_random_fd(true), Cuint) - end -end # os-test - -function _ad_hoc_entropy() - println(stderr, - "Entropy pool not available to seed RNG; using ad-hoc entropy sources.") - seed = reinterpret(UInt64, time()) - seed = hash(seed, getpid() % UInt) - try - seed = hash(seed, parse(UInt64, - read(pipeline(`ifconfig`, `sha1sum`), String)[1:40], - base = 16) % UInt) - catch - end - return seed -end - -function _make_uint_seed() - try - _rand_uint() - catch - return _ad_hoc_entropy() % Cuint - end -end \ No newline at end of file diff --git a/src/coverage.cpp b/src/coverage.cpp index 4ce33c105691c..46363a7e9ac01 100644 --- a/src/coverage.cpp +++ b/src/coverage.cpp @@ -201,7 +201,7 @@ extern "C" JL_DLLEXPORT void jl_write_coverage_data(const char *output) } else { std::string stm; - raw_string_ostream(stm) << "." << jl_getpid() << ".cov"; + raw_string_ostream(stm) << "." << uv_os_getpid() << ".cov"; write_log_data(coverageData, stm.c_str()); } } @@ -209,6 +209,6 @@ extern "C" JL_DLLEXPORT void jl_write_coverage_data(const char *output) extern "C" JL_DLLEXPORT void jl_write_malloc_log(void) { std::string stm; - raw_string_ostream(stm) << "." << jl_getpid() << ".mem"; + raw_string_ostream(stm) << "." << uv_os_getpid() << ".mem"; write_log_data(mallocData, stm.c_str()); } diff --git a/src/gc-debug.c b/src/gc-debug.c index 8403a9f9f2e1b..fcd1b464e5b43 100644 --- a/src/gc-debug.c +++ b/src/gc-debug.c @@ -467,10 +467,9 @@ static void gc_debug_alloc_init(jl_alloc_num_t *num, const char *name) return; if (*env == 'r') { env++; - srand((unsigned)uv_hrtime()); for (int i = 0;i < 3;i++) { while (num->random[i] == 0) { - num->random[i] = rand(); + num->random[i] = jl_rand(); } } } diff --git a/src/init.c b/src/init.c index d2c76bac404e7..3ea8456479c3e 100644 --- a/src/init.c +++ b/src/init.c @@ -685,6 +685,7 @@ JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel) jl_error("cannot generate code-coverage or track allocation information while generating a .o, .bc, or .s output file"); } + jl_init_rand(); jl_init_runtime_ccall(); jl_init_tasks(); jl_init_threading(); diff --git a/src/jl_exported_funcs.inc b/src/jl_exported_funcs.inc index 614ed0d9d16af..4e3849477a5ac 100644 --- a/src/jl_exported_funcs.inc +++ b/src/jl_exported_funcs.inc @@ -201,7 +201,6 @@ XX(jl_getallocationgranularity) \ XX(jl_getnameinfo) \ XX(jl_getpagesize) \ - XX(jl_getpid) \ XX(jl_get_ARCH) \ XX(jl_get_backtrace) \ XX(jl_get_binding) \ diff --git a/src/jl_uv.c b/src/jl_uv.c index 726290605ee32..dcac09ce6afef 100644 --- a/src/jl_uv.c +++ b/src/jl_uv.c @@ -641,15 +641,6 @@ JL_DLLEXPORT void jl_exit(int exitcode) exit(exitcode); } -JL_DLLEXPORT int jl_getpid(void) JL_NOTSAFEPOINT -{ -#ifdef _OS_WINDOWS_ - return GetCurrentProcessId(); -#else - return getpid(); -#endif -} - typedef union { struct sockaddr in; struct sockaddr_in v4; diff --git a/src/julia.h b/src/julia.h index 695d816aa19c1..48f89ec7661e3 100644 --- a/src/julia.h +++ b/src/julia.h @@ -1880,10 +1880,7 @@ typedef struct _jl_task_t { jl_value_t *result; jl_value_t *logstate; jl_function_t *start; - uint64_t rngState0; // really rngState[4], but more convenient to split - uint64_t rngState1; - uint64_t rngState2; - uint64_t rngState3; + uint64_t rngState[4]; _Atomic(uint8_t) _state; uint8_t sticky; // record whether this Task can be migrated to a new thread _Atomic(uint8_t) _isexception; // set if `result` is an exception to throw or that we exited with diff --git a/src/julia_atomics.h b/src/julia_atomics.h index 1f1a7a46cc9b6..cb14e535cd010 100644 --- a/src/julia_atomics.h +++ b/src/julia_atomics.h @@ -149,7 +149,7 @@ bool jl_atomic_cmpswap_explicit(std::atomic *ptr, T *expected, S val, std::me { return std::atomic_compare_exchange_strong_explicit(ptr, expected, val, order, order); } -#define jl_atomic_cmpswap_relaxed(ptr, val) jl_atomic_cmpswap_explicit(ptr, val, memory_order_relaxed) +#define jl_atomic_cmpswap_relaxed(ptr, expected, val) jl_atomic_cmpswap_explicit(ptr, expected, val, memory_order_relaxed) template T jl_atomic_exchange(std::atomic *ptr, S desired) { diff --git a/src/julia_internal.h b/src/julia_internal.h index 873ef2541d6f6..7e47a4c9b453f 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -1110,21 +1110,19 @@ void jl_push_excstack(jl_excstack_t **stack JL_REQUIRE_ROOTED_SLOT JL_ROOTING_AR //-------------------------------------------------- // congruential random number generator // for a small amount of thread-local randomness -// we could just use libc:`rand()`, but we want to ensure this is fast -STATIC_INLINE void seed_cong(uint64_t *seed) -{ - *seed = rand(); -} -STATIC_INLINE void unbias_cong(uint64_t max, uint64_t *unbias) +STATIC_INLINE void unbias_cong(uint64_t max, uint64_t *unbias) JL_NOTSAFEPOINT { *unbias = UINT64_MAX - ((UINT64_MAX % max) + 1); } -STATIC_INLINE uint64_t cong(uint64_t max, uint64_t unbias, uint64_t *seed) +STATIC_INLINE uint64_t cong(uint64_t max, uint64_t unbias, uint64_t *seed) JL_NOTSAFEPOINT { while ((*seed = 69069 * (*seed) + 362437) > unbias) ; return *seed % max; } +JL_DLLEXPORT uint64_t jl_rand(void) JL_NOTSAFEPOINT; +JL_DLLEXPORT void jl_srand(uint64_t) JL_NOTSAFEPOINT; +JL_DLLEXPORT void jl_init_rand(void); JL_DLLEXPORT extern void *jl_libjulia_internal_handle; JL_DLLEXPORT extern void *jl_RTLD_DEFAULT_handle; @@ -1156,7 +1154,6 @@ JL_DLLEXPORT const char *jl_dlfind_win32(const char *name); // libuv wrappers: JL_DLLEXPORT int jl_fs_rename(const char *src_path, const char *dst_path); -int jl_getpid(void) JL_NOTSAFEPOINT; #ifdef SEGV_EXCEPTION extern JL_DLLEXPORT jl_value_t *jl_segv_exception; diff --git a/src/runtime_ccall.cpp b/src/runtime_ccall.cpp index 02523abe73479..690062b2d98fb 100644 --- a/src/runtime_ccall.cpp +++ b/src/runtime_ccall.cpp @@ -157,7 +157,7 @@ std::string jl_format_filename(StringRef output_pattern) } switch (c) { case 'p': - outfile << jl_getpid(); + outfile << uv_os_getpid(); break; case 'd': if (got_pwd) diff --git a/src/signal-handling.c b/src/signal-handling.c index d9c53b0211eae..acaa934397485 100644 --- a/src/signal-handling.c +++ b/src/signal-handling.c @@ -341,7 +341,7 @@ JL_DLLEXPORT int jl_profile_init(size_t maxsize, uint64_t delay_nsec) profile_round_robin_thread_order[i] = i; } } - seed_cong(&profile_cong_rng_seed); + profile_cong_rng_seed = jl_rand(); unbias_cong(jl_n_threads, &profile_cong_rng_unbias); bt_data_prof = (jl_bt_element_t*) calloc(maxsize, sizeof(jl_bt_element_t)); if (bt_data_prof == NULL && maxsize > 0) diff --git a/src/signals-unix.c b/src/signals-unix.c index b4eb57a5501cb..ca624c765303f 100644 --- a/src/signals-unix.c +++ b/src/signals-unix.c @@ -897,7 +897,7 @@ static void *signal_listener(void *arg) jl_ptls_t ptls2 = jl_all_tls_states[idx]; nrunning += !jl_atomic_load_relaxed(&ptls2->sleep_check_state); } - jl_safe_printf("\ncmd: %s %d running %d of %d\n", jl_options.julia_bin ? jl_options.julia_bin : "julia", jl_getpid(), nrunning, jl_n_threads); + jl_safe_printf("\ncmd: %s %d running %d of %d\n", jl_options.julia_bin ? jl_options.julia_bin : "julia", uv_os_getpid(), nrunning, jl_n_threads); #endif jl_safe_printf("\nsignal (%d): %s\n", sig, strsignal(sig)); diff --git a/src/sys.c b/src/sys.c index 2538eaf62163c..6cf015eb05c1d 100644 --- a/src/sys.c +++ b/src/sys.c @@ -923,6 +923,40 @@ JL_DLLEXPORT size_t jl_maxrss(void) #endif } +// Simple `rand()` like function, with global seed and added thread-safety +// (but slow and insecure) +static _Atomic(uint64_t) g_rngseed; +JL_DLLEXPORT uint64_t jl_rand(void) JL_NOTSAFEPOINT +{ + uint64_t max = UINT64_MAX; + uint64_t unbias = UINT64_MAX; + uint64_t rngseed0 = jl_atomic_load_relaxed(&g_rngseed); + uint64_t rngseed; + uint64_t rnd; + do { + rngseed = rngseed0; + rnd = cong(max, unbias, &rngseed); + } while (!jl_atomic_cmpswap_relaxed(&g_rngseed, &rngseed0, rngseed)); + return rnd; +} + +JL_DLLEXPORT void jl_srand(uint64_t rngseed) JL_NOTSAFEPOINT +{ + jl_atomic_store_relaxed(&g_rngseed, rngseed); +} + +void jl_init_rand(void) JL_NOTSAFEPOINT +{ + uint64_t rngseed; + if (uv_random(NULL, NULL, &rngseed, sizeof(rngseed), 0, NULL)) { + ios_puts("WARNING: Entropy pool not available to seed RNG; using ad-hoc entropy sources.\n", ios_stderr); + rngseed = uv_hrtime(); + rngseed ^= int64hash(uv_os_getpid()); + } + jl_srand(rngseed); + srand(rngseed); +} + #ifdef __cplusplus } #endif diff --git a/src/task.c b/src/task.c index 1dd4e76b8ba1c..09d6e04c77646 100644 --- a/src/task.c +++ b/src/task.c @@ -706,12 +706,12 @@ JL_DLLEXPORT void jl_rethrow_other(jl_value_t *e JL_MAYBE_UNROOTED) There is a pure Julia implementation in stdlib that tends to be faster when used from within Julia, due to inlining and more agressive architecture-specific optimizations. */ -JL_DLLEXPORT uint64_t jl_tasklocal_genrandom(jl_task_t *task) JL_NOTSAFEPOINT +uint64_t jl_genrandom(uint64_t rngState[4]) JL_NOTSAFEPOINT { - uint64_t s0 = task->rngState0; - uint64_t s1 = task->rngState1; - uint64_t s2 = task->rngState2; - uint64_t s3 = task->rngState3; + uint64_t s0 = rngState[0]; + uint64_t s1 = rngState[1]; + uint64_t s2 = rngState[2]; + uint64_t s3 = rngState[3]; uint64_t t = s1 << 17; uint64_t tmp = s0 + s3; @@ -723,14 +723,14 @@ JL_DLLEXPORT uint64_t jl_tasklocal_genrandom(jl_task_t *task) JL_NOTSAFEPOINT s2 ^= t; s3 = (s3 << 45) | (s3 >> 19); - task->rngState0 = s0; - task->rngState1 = s1; - task->rngState2 = s2; - task->rngState3 = s3; + rngState[0] = s0; + rngState[1] = s1; + rngState[2] = s2; + rngState[3] = s3; return res; } -void rng_split(jl_task_t *from, jl_task_t *to) JL_NOTSAFEPOINT +static void rng_split(jl_task_t *from, jl_task_t *to) JL_NOTSAFEPOINT { /* TODO: consider a less ad-hoc construction Ideally we could just use the output of the random stream to seed the initial @@ -748,10 +748,10 @@ void rng_split(jl_task_t *from, jl_task_t *to) JL_NOTSAFEPOINT 0x3688cf5d48899fa7 == hash(UInt(3))|0x01 0x867b4bb4c42e5661 == hash(UInt(4))|0x01 */ - to->rngState0 = 0x02011ce34bce797f * jl_tasklocal_genrandom(from); - to->rngState1 = 0x5a94851fb48a6e05 * jl_tasklocal_genrandom(from); - to->rngState2 = 0x3688cf5d48899fa7 * jl_tasklocal_genrandom(from); - to->rngState3 = 0x867b4bb4c42e5661 * jl_tasklocal_genrandom(from); + to->rngState[0] = 0x02011ce34bce797f * jl_genrandom(from->rngState); + to->rngState[1] = 0x5a94851fb48a6e05 * jl_genrandom(from->rngState); + to->rngState[2] = 0x3688cf5d48899fa7 * jl_genrandom(from->rngState); + to->rngState[3] = 0x867b4bb4c42e5661 * jl_genrandom(from->rngState); } JL_DLLEXPORT jl_task_t *jl_new_task(jl_function_t *start, jl_value_t *completion_future, size_t ssize) diff --git a/src/threading.c b/src/threading.c index f6e053df410c5..c8c0b7d5cfa8f 100644 --- a/src/threading.c +++ b/src/threading.c @@ -303,7 +303,7 @@ jl_ptls_t jl_init_threadtls(int16_t tid) { jl_ptls_t ptls = (jl_ptls_t)calloc(1, sizeof(jl_tls_states_t)); ptls->system_id = (jl_thread_t)(uintptr_t)uv_thread_self(); - seed_cong(&ptls->rngseed); + ptls->rngseed = jl_rand(); #ifdef _OS_WINDOWS_ if (tid == 0) { if (!DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), diff --git a/stdlib/Random/src/RNGs.jl b/stdlib/Random/src/RNGs.jl index a50f633e68a9c..8c26e5e211586 100644 --- a/stdlib/Random/src/RNGs.jl +++ b/stdlib/Random/src/RNGs.jl @@ -2,50 +2,6 @@ ## RandomDevice -if Sys.iswindows() - struct RandomDevice <: AbstractRNG - buffer::Vector{UInt128} - - RandomDevice() = new(Vector{UInt128}(undef, 1)) - end - - function rand(rd::RandomDevice, sp::SamplerBoolBitInteger) - rand!(rd, rd.buffer) - @inbounds return rd.buffer[1] % sp[] - end - - show(io::IO, ::RandomDevice) = print(io, RandomDevice, "()") - -else # !windows - struct RandomDevice <: AbstractRNG - unlimited::Bool - - RandomDevice(; unlimited::Bool=true) = new(unlimited) - end - - getfile(rd::RandomDevice) = Base._get_dev_random_fd(rd.unlimited) - - rand(rd::RandomDevice, sp::SamplerBoolBitInteger) = read(getfile(rd), sp[]) - rand(rd::RandomDevice, ::SamplerType{Bool}) = read(getfile(rd), UInt8) % Bool - - show(io::IO, rd::RandomDevice) = - print(io, RandomDevice, rd.unlimited ? "()" : "(unlimited=false)") -end # os-test - -# NOTE: this can't be put within the if-else block above -for T in (Bool, BitInteger_types...) - if Sys.iswindows() - @eval function rand!(rd::RandomDevice, A::Array{$T}, ::SamplerType{$T}) - Base.RtlGenRandom!(A) - A - end - else - @eval rand!(rd::RandomDevice, A::Array{$T}, ::SamplerType{$T}) = read!(getfile(rd), A) - end -end - -# RandomDevice produces natively UInt64 -rng_native_52(::RandomDevice) = UInt64 """ RandomDevice() @@ -54,11 +10,31 @@ Create a `RandomDevice` RNG object. Two such objects will always generate different streams of random numbers. The entropy is obtained from the operating system. """ -RandomDevice - -RandomDevice(::Nothing) = RandomDevice() +struct RandomDevice <: AbstractRNG; end +RandomDevice(seed::Nothing) = RandomDevice() seed!(rng::RandomDevice) = rng +rand(rd::RandomDevice, sp::SamplerBoolBitInteger) = Libc.getrandom!(Ref{sp[]}())[] +rand(rd::RandomDevice, ::SamplerType{Bool}) = rand(rd, UInt8) % Bool +function rand!(rd::RandomDevice, A::Array{Bool}, ::SamplerType{Bool}) + Libc.getrandom!(A) + # we need to mask the result so that only the LSB in each byte can be non-zero + GC.@preserve A begin + p = Ptr{UInt8}(pointer(A)) + for i = 1:length(A) + unsafe_store!(p, unsafe_load(p) & 0x1) + p += 1 + end + end + return A +end +for T in BitInteger_types + @eval rand!(rd::RandomDevice, A::Array{$T}, ::SamplerType{$T}) = Libc.getrandom!(A) +end + +# RandomDevice produces natively UInt64 +rng_native_52(::RandomDevice) = UInt64 + ## MersenneTwister @@ -307,11 +283,10 @@ end function make_seed() try return rand(RandomDevice(), UInt32, 4) - catch - println(stderr, - "Entropy pool not available to seed RNG; using ad-hoc entropy sources.") - Base._ad_hoc_entropy_source() - return make_seed(seed) + catch ex + ex isa IOError || rethrow() + @warn "Entropy pool not available to seed RNG; using ad-hoc entropy sources." + return make_seed(Libc.rand()) end end diff --git a/stdlib/Random/test/runtests.jl b/stdlib/Random/test/runtests.jl index c8be4c95cdaf2..6c79f531826bc 100644 --- a/stdlib/Random/test/runtests.jl +++ b/stdlib/Random/test/runtests.jl @@ -449,6 +449,7 @@ end @testset "rand(Bool) uniform distribution" begin for n in [rand(1:8), rand(9:16), rand(17:64)] a = zeros(Bool, n) + a8 = unsafe_wrap(Array, Ptr{UInt8}(pointer(a)), length(a); own=false) # unsafely observe the actual bit patterns in `a` as = zeros(Int, n) # we will test statistical properties for each position of a, # but also for 3 linear combinations of positions (for the array version) @@ -466,6 +467,7 @@ end end else as .+= rand!(rng, a) + @test all(x -> x === 0x00 || x === 0x01, a8) aslcs .+= [xor(getindex.(Ref(a), lcs[i])...) for i in 1:3] end end @@ -912,9 +914,6 @@ end @testset "RandomDevice" begin @test string(RandomDevice()) == "$RandomDevice()" - if !Sys.iswindows() - @test string(RandomDevice(unlimited=false)) == "$RandomDevice(unlimited=false)" - end end end diff --git a/test/error.jl b/test/error.jl index 913d303496e3e..1dae62fb91e58 100644 --- a/test/error.jl +++ b/test/error.jl @@ -6,11 +6,11 @@ @test maximum(ExponentialBackOff(n=10, max_delay=0.06)) == 0.06 ratio(x) = x[2:end]./x[1:end-1] @test all(x->x ≈ 10.0, ratio(collect(ExponentialBackOff(n=10, max_delay=Inf, factor=10, jitter=0.0)))) - Test.guardseed(12345) do - x = ratio(collect(ExponentialBackOff(n=100, max_delay=Inf, factor=1, jitter=0.1))) - xm = sum(x) / length(x) - @test abs(xm - 1.0) < 0.01 - end + Libc.srand(12345) + x = ratio(collect(ExponentialBackOff(n=100, max_delay=Inf, factor=1, jitter=0.1))) + xm = sum(x) / length(x) + @test abs(xm - 1.0) < 0.01 + Libc.srand() end @testset "retrying after errors" begin function foo_error(c, n) From 6a05297f202a9a9b43c43f3e7fda4397fb9aeb43 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 14 Jul 2022 15:50:29 -0400 Subject: [PATCH 06/44] give finalizers their own RNG state (#45212) fixes #42752 (cherry picked from commit 85b895bb6919ea86d9b6201108af3a66930a349b) --- src/gc.c | 16 ++++++++++++++++ src/task.c | 12 ++++++------ stdlib/Random/src/RNGs.jl | 1 + stdlib/Random/test/runtests.jl | 23 +++++++++++++++++++++++ 4 files changed, 46 insertions(+), 6 deletions(-) diff --git a/src/gc.c b/src/gc.c index 97669e0acfe61..b54f64ffa00fd 100644 --- a/src/gc.c +++ b/src/gc.c @@ -371,6 +371,15 @@ static void jl_gc_run_finalizers_in_list(jl_task_t *ct, arraylist_t *list) JL_GC_POP(); } +static uint64_t finalizer_rngState[4]; + +void jl_rng_split(uint64_t to[4], uint64_t from[4]); + +JL_DLLEXPORT void jl_gc_init_finalizer_rng_state(void) +{ + jl_rng_split(finalizer_rngState, jl_current_task->rngState); +} + static void run_finalizers(jl_task_t *ct) { // Racy fast path: @@ -392,9 +401,16 @@ static void run_finalizers(jl_task_t *ct) } jl_atomic_store_relaxed(&jl_gc_have_pending_finalizers, 0); arraylist_new(&to_finalize, 0); + + uint64_t save_rngState[4]; + memcpy(&save_rngState[0], &ct->rngState[0], sizeof(save_rngState)); + jl_rng_split(ct->rngState, finalizer_rngState); + // This releases the finalizers lock. jl_gc_run_finalizers_in_list(ct, &copied_list); arraylist_free(&copied_list); + + memcpy(&ct->rngState[0], &save_rngState[0], sizeof(save_rngState)); } JL_DLLEXPORT void jl_gc_run_pending_finalizers(jl_task_t *ct) diff --git a/src/task.c b/src/task.c index 09d6e04c77646..34e5d618e2bf1 100644 --- a/src/task.c +++ b/src/task.c @@ -730,7 +730,7 @@ uint64_t jl_genrandom(uint64_t rngState[4]) JL_NOTSAFEPOINT return res; } -static void rng_split(jl_task_t *from, jl_task_t *to) JL_NOTSAFEPOINT +void jl_rng_split(uint64_t to[4], uint64_t from[4]) JL_NOTSAFEPOINT { /* TODO: consider a less ad-hoc construction Ideally we could just use the output of the random stream to seed the initial @@ -748,10 +748,10 @@ static void rng_split(jl_task_t *from, jl_task_t *to) JL_NOTSAFEPOINT 0x3688cf5d48899fa7 == hash(UInt(3))|0x01 0x867b4bb4c42e5661 == hash(UInt(4))|0x01 */ - to->rngState[0] = 0x02011ce34bce797f * jl_genrandom(from->rngState); - to->rngState[1] = 0x5a94851fb48a6e05 * jl_genrandom(from->rngState); - to->rngState[2] = 0x3688cf5d48899fa7 * jl_genrandom(from->rngState); - to->rngState[3] = 0x867b4bb4c42e5661 * jl_genrandom(from->rngState); + to[0] = 0x02011ce34bce797f * jl_genrandom(from); + to[1] = 0x5a94851fb48a6e05 * jl_genrandom(from); + to[2] = 0x3688cf5d48899fa7 * jl_genrandom(from); + to[3] = 0x867b4bb4c42e5661 * jl_genrandom(from); } JL_DLLEXPORT jl_task_t *jl_new_task(jl_function_t *start, jl_value_t *completion_future, size_t ssize) @@ -791,7 +791,7 @@ JL_DLLEXPORT jl_task_t *jl_new_task(jl_function_t *start, jl_value_t *completion // Inherit logger state from parent task t->logstate = ct->logstate; // Fork task-local random state from parent - rng_split(ct, t); + jl_rng_split(t->rngState, ct->rngState); // there is no active exception handler available on this stack yet t->eh = NULL; t->sticky = 1; diff --git a/stdlib/Random/src/RNGs.jl b/stdlib/Random/src/RNGs.jl index 8c26e5e211586..d4dbfa648dc79 100644 --- a/stdlib/Random/src/RNGs.jl +++ b/stdlib/Random/src/RNGs.jl @@ -375,6 +375,7 @@ end function __init__() seed!(GLOBAL_RNG) + ccall(:jl_gc_init_finalizer_rng_state, Cvoid, ()) end diff --git a/stdlib/Random/test/runtests.jl b/stdlib/Random/test/runtests.jl index 6c79f531826bc..1469184c5b1b6 100644 --- a/stdlib/Random/test/runtests.jl +++ b/stdlib/Random/test/runtests.jl @@ -975,3 +975,26 @@ end @test minimum(m) >= 0.094 @test maximum(m) <= 0.106 end + +# issue #42752 +# test that running finalizers that launch tasks doesn't change RNG stream +function f42752(do_gc::Bool, cell = (()->Any[[]])()) + a = rand() + if do_gc + finalizer(cell[1]) do _ + @async nothing + end + cell[1] = nothing + GC.gc() + end + b = rand() + (a, b) +end +guardseed() do + for _ in 1:4 + Random.seed!(1) + val = f42752(false) + Random.seed!(1) + @test f42752(true) === val + end +end From 6ba1d23fca0144d937f356af65e945709a98cd8f Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Tue, 19 Jul 2022 14:23:15 +0200 Subject: [PATCH 07/44] Update LLVM to include additional patches. (#46091) --- deps/Versions.make | 8 +- deps/checksums/clang | 116 ++++---- deps/checksums/llvm | 468 ++++++++++++++++---------------- deps/llvm.version | 4 +- stdlib/libLLVM_jll/Project.toml | 2 +- 5 files changed, 299 insertions(+), 299 deletions(-) diff --git a/deps/Versions.make b/deps/Versions.make index c250dfe984671..91d5285f964c5 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -15,7 +15,7 @@ CSL_JLL_NAME := CompilerSupportLibraries # Clang (paired with LLVM, only here as a JLL download) CLANG_JLL_NAME := Clang -CLANG_JLL_VER := 13.0.1+2 +CLANG_JLL_VER := 13.0.1+3 # DSFMT DSFMT_VER := 2.2.4 @@ -45,13 +45,13 @@ LIBUV_JLL_NAME := LibUV # LLVM LLVM_VER := 13.0.1 -LLVM_ASSERT_JLL_VER := 13.0.1+2 +LLVM_ASSERT_JLL_VER := 13.0.1+3 LLVM_JLL_NAME := libLLVM # LLVM_tools (downloads LLVM_jll to get things like `lit` and `opt`) LLVM_TOOLS_JLL_NAME := LLVM -LLVM_TOOLS_JLL_VER := 13.0.1+2 -LLVM_TOOLS_ASSERT_JLL_VER := 13.0.1+2 +LLVM_TOOLS_JLL_VER := 13.0.1+3 +LLVM_TOOLS_ASSERT_JLL_VER := 13.0.1+3 # LLVM libunwind LLVMUNWIND_VER := 12.0.1 diff --git a/deps/checksums/clang b/deps/checksums/clang index 33424cdb4ac49..928ea6e91afc2 100644 --- a/deps/checksums/clang +++ b/deps/checksums/clang @@ -1,58 +1,58 @@ -Clang.v13.0.1+2.aarch64-apple-darwin.tar.gz/md5/49ca7159ca2c064ded33a7a223d6f409 -Clang.v13.0.1+2.aarch64-apple-darwin.tar.gz/sha512/354a600f210e0b6b6fa4db3315145c4eea8aa3ae2fc3d800c99c02f1a62798181dfd7b75eaf82fe0df1ddbb81e78906c5376a2fcf9f367317a08d3502bba5f80 -Clang.v13.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/md5/66bb905108af01561661d0a7d7f62ff5 -Clang.v13.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/sha512/706e5950194988ffb7c6de59442744d2613141e00c2485e369d1fbfccb816090d7043fd8de368c7c46bded1dd1d9a258491ec552fc0de1fdddb2de3ae858ccdc -Clang.v13.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/md5/f8afd07e400ba048659ccc488c26dacc -Clang.v13.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/sha512/f708eebb2b505b1841af007a5e60a5a41d09c8c01546ef5eb66c25d3b9cfbb17a58fac2cfb29d5f4522c91d36d203577611ed49cb29f8f81825db031b93d7cdc -Clang.v13.0.1+2.aarch64-linux-musl-cxx03.tar.gz/md5/d03e27c1f08a63364a15d9c479b9bebe -Clang.v13.0.1+2.aarch64-linux-musl-cxx03.tar.gz/sha512/1ba08f194abae2af4af742815edc1f73d52449065c9d515dc35ee18dc1aaf5486dfdc0e691709f78b98b191b208fa66fb6e2850f021a472b2f6e699576966a6e -Clang.v13.0.1+2.aarch64-linux-musl-cxx11.tar.gz/md5/00050161006c9ff42b6685e4784f7fc0 -Clang.v13.0.1+2.aarch64-linux-musl-cxx11.tar.gz/sha512/9502305b02bf01d96f1261f31db826374aff4c65b6ec7f043d2b80bf2693a9ef2688fddfb7d53a78254a0b18e40e2d13f035d1cadaf5d0aeec001efaf5ba12c8 -Clang.v13.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/7300c2fcbd210d201a7a3fb773f5d815 -Clang.v13.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/145b44ca3b98ee2450db5f738aaafb3d8560a2eed269d5ddb79f6730024d12d46dbb1e791617eeb2bae27b3474c344d72c22ae610651e083a00d9315d3718d7e -Clang.v13.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/3252d02cef57383411ccb906f29b062a -Clang.v13.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/cc0851d831684e8b7ebf8f43a5d159f041302c0905c2035efcf1bb45dc92073db32570fed63ac73df20271b6e3dddf5a637a99c8b687096de2fb85369f8fe8f5 -Clang.v13.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/md5/011545522e96b09e6766be3eddb7d86c -Clang.v13.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/e1c1db11dd7e408ff6d47c0d6247c2fe8aff1b85160deb0f5a8bbfb35c0faf50f12d07296e5f5b30c38c879a3c45f0dec2005e710adad5336ebf46acbde53572 -Clang.v13.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/md5/f94ba0082e8823b0bd41f15a38502718 -Clang.v13.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/492ef0d7af2e4176b43751a6f6ffd88c89404589964f7a8c9a957537e3d2ef3d0a9bf277e539589bd4b2b705b43f13ed22f7fec8a75f0400d185833537226331 -Clang.v13.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/c899ce799934067a8037a16e4347d26f -Clang.v13.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/424af8ae2d6735495751d9183c1189afe67a135cc8acd5ca1b2ee6598e6efba3efd1f45a7d1b14cf67c2aa6512a4b088581a4da879ec9e184c9125684e5ccaa3 -Clang.v13.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/66b9e334eb7a2ac5552460d51aa1b895 -Clang.v13.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/01b29f509355fd054e7ba656d7349de90a191ab4992af86f90dfb7de3631a23b3dddc43743ce1dee9e7a5d7855f3a9d6c3525ae9f6581c271139dc7796a50bd7 -Clang.v13.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/md5/5bbdc99bf639afcd1079d8c78cd483af -Clang.v13.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/250533d74c4dddc7f5a0ae16deb5d2ee53b1c6870e59e569452bc986e2bc2ccc20bdba5bd0e13124715d924beae531f51d7f9127670f0a3a29d5e4f8fdc59740 -Clang.v13.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/md5/6ecb7768b76798d3aca784649da83409 -Clang.v13.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/fb88840b95c1426406b2ea80ee9c399a4ab32157154feddc72e4de8636ebe400849eb302b7744fb8ee506c7f2613aa65bf1e886fdc4bddace1db1aea009e022c -Clang.v13.0.1+2.i686-linux-gnu-cxx03.tar.gz/md5/ebc9cefaa748a0488a2ca4e5e499dd8e -Clang.v13.0.1+2.i686-linux-gnu-cxx03.tar.gz/sha512/13c6743745416b5e67e77c0cc430bb827288311e80d48bd06e03540f7b98e1456d7c73f78fd93240832f08ba43128ac65c5d10bafe517eb0ab953304ebdb4567 -Clang.v13.0.1+2.i686-linux-gnu-cxx11.tar.gz/md5/02761e159f30691376a1874c9a795d34 -Clang.v13.0.1+2.i686-linux-gnu-cxx11.tar.gz/sha512/903a44718282a5625c445536e31576fb91e429ee1bc48b1b033f099f24b293933deac6dcd378fa49257c19f01a35b34f80af42cd355759c3acda1afd3c9ac1b7 -Clang.v13.0.1+2.i686-linux-musl-cxx03.tar.gz/md5/cf269ef3cf165dfc2c7882eaca1f0463 -Clang.v13.0.1+2.i686-linux-musl-cxx03.tar.gz/sha512/d23230838f282a3771939766ac31a2e0e93c5a4e3040b10443e9aee14125700c1cf5c9d92e46e49d9095c7a5709d1bad5178a34e1e0336135772c7f752b8fc01 -Clang.v13.0.1+2.i686-linux-musl-cxx11.tar.gz/md5/152bf5b8acefb741d6a2231945d4d43f -Clang.v13.0.1+2.i686-linux-musl-cxx11.tar.gz/sha512/ed0f9622e44be508a792bc467c87846e672ac2750598dcd416b8b4418ba0e5dbc85e99ced40dc8184db68c2e27e342ecf8609feb077cac395805ab3088f150f7 -Clang.v13.0.1+2.i686-w64-mingw32-cxx03.tar.gz/md5/d676f0e17e2d4f235a571d00f0eeb46a -Clang.v13.0.1+2.i686-w64-mingw32-cxx03.tar.gz/sha512/f2b31fef42800796fab7961508de8aa9baee4cc095af6d7eb441c63a70b3b9a0447d1926b1044190f8fb0d22b3215dfc03277178fdfe96ccd458c6ce28b71421 -Clang.v13.0.1+2.i686-w64-mingw32-cxx11.tar.gz/md5/2bd3ce011bc7da537edf0579a5e4ac68 -Clang.v13.0.1+2.i686-w64-mingw32-cxx11.tar.gz/sha512/67f8d59304f77170a6f8780a750980f946e4aa129f855c97d92039569311077aeda93ed437794752494934e46a4e09fbe42b7f85f001c522bd81e33a8b170dec -Clang.v13.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/md5/a51cce404a43140a71c146a5375ed69b -Clang.v13.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/9e45a6b2bd44c6cbcf158972c2bb0a55efbb4c0af135fa4487d9c43c36d643a29aa466666ecfb388722285cf0d20456528a6042b5b5c925f54479b84db3fbbde -Clang.v13.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/md5/f0b3becd447111213d206f33d3ceb224 -Clang.v13.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/6ace1ccb0bf924b41db73bde2fe3d987a79c94119fe1017b7fc1ca94482542a35e4a436ff201c5be16034bbdf5b2a8d52fb3bdb7dc1c4077ad2fe1dc26911610 -Clang.v13.0.1+2.x86_64-apple-darwin.tar.gz/md5/15505fa8dde3298bfbb2b9e5f13ad376 -Clang.v13.0.1+2.x86_64-apple-darwin.tar.gz/sha512/dfb2b4dafd6c2f225e6ef098c28aa9555aba798f355efd50b811bfb42d1b2c1cf8d27e67bf25dd5e624821e967aee0c68f3e708e762c4bd4ef973d0d6b05e7d9 -Clang.v13.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/md5/2297ddee8beae10360bf3e287139bd87 -Clang.v13.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/sha512/c5937a52caa13b443f7bc2e3796a9da78a917040bc74684c564f535097c88be5e8714e83d166bb1c073c4783d6783c32598edfd8e121ba640bc672b818e484f2 -Clang.v13.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/md5/f7ecda67d25d35fe3a62159b5fb32bbf -Clang.v13.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/sha512/5b38cff3629043ae4c9bfbe353afe845ff6afdcfc628e5223ca654d52b1be33af439afbf3684c9283360f4f4f4d13611c151c1591cd3e4dae45e1e91665709c6 -Clang.v13.0.1+2.x86_64-linux-musl-cxx03.tar.gz/md5/b13aa15779d1e1a3764fc4600ffb9bc3 -Clang.v13.0.1+2.x86_64-linux-musl-cxx03.tar.gz/sha512/a667b7043b19b6f6c8d9f8c264101ffe05a318bdc93e3541e0719b761422f2cbeda01b9337777b6b327292637fc96a811827978b318564d44b5cb53eed3c2e83 -Clang.v13.0.1+2.x86_64-linux-musl-cxx11.tar.gz/md5/aaba70ed189ccd9723577d9fe3ff918b -Clang.v13.0.1+2.x86_64-linux-musl-cxx11.tar.gz/sha512/4b9fefa074bdf1d98dbde4c3a6394151e0c368228297b876b1fbd3bc64934204cdeae40e4f1d1cac31cde2a2a290a1ed86ea543a43862c4f36fe0f865752dad1 -Clang.v13.0.1+2.x86_64-unknown-freebsd.tar.gz/md5/46dbfa6898be4df10993cdc714193c82 -Clang.v13.0.1+2.x86_64-unknown-freebsd.tar.gz/sha512/d44619dd528bd1ed7e16c96b119fc9bb0b39e761641380b9dec67147f42131572a5e467a86cdad79fb61d10a26ed211e9752f7fad513259188cf7b6402715a9d -Clang.v13.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/md5/68e1fb6d07e89cc4b7d4b29fef74181d -Clang.v13.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/sha512/8dae7e50872d83758f89aba5d8bd240916bf21f16ccee747ce1a9f01d05bc06cc706e05f62a1667393af6570aa8057e008321dbdfc5235e066150258be3dc220 -Clang.v13.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/md5/b4a562ec746df756eaec1ef6b2edf81f -Clang.v13.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/sha512/d75c40b84069885f21ad4f6a2a30a7714df8f0f978329a112c92917b74974259421551b58494337846d8f3a476927dcbe3fc2f15c11b0abff69778e8cff15777 +Clang.v13.0.1+3.aarch64-apple-darwin.tar.gz/md5/29b104ecbe47b27bdca76e2bfac4e7ba +Clang.v13.0.1+3.aarch64-apple-darwin.tar.gz/sha512/b5b6a524e6f8b9ac3983b00bc2e3672c0439be63f137b234d012d922fae806f029aedc0dd81e8ff78331bea7bfb41b0abc094360d47316caa82204fca7c78389 +Clang.v13.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/md5/745d6aa1ce7570d0a47a56f2e8a77ad4 +Clang.v13.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/sha512/048df0ece3677687d599b3a6d4eefabce01e03cee01588a79e8bf9e1549207a8395f662132cd9b2c918a7aa385fdd8a49e575d67f6825be9722424b27cce9f4f +Clang.v13.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/md5/7c4869c06f6a6bc9889fba5a8c80af6a +Clang.v13.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/sha512/2635ec078e08c654c5339af78552488fa84574379e7d3d0c528dc952393b96e95400a8aef57424461c0394e869572569d7279bf236234128007975e18e590e20 +Clang.v13.0.1+3.aarch64-linux-musl-cxx03.tar.gz/md5/30426e58f03d596e1de78d2627cbc754 +Clang.v13.0.1+3.aarch64-linux-musl-cxx03.tar.gz/sha512/63a090018d00303df1b479ba0bbdc6eb1d654c399a2298340ef8b7c367bb5d75f14eac59eb863f1a7519d6c760ddb40cdddd1776b97b52fa758f1d2c6f548908 +Clang.v13.0.1+3.aarch64-linux-musl-cxx11.tar.gz/md5/9cfd407ed52761a31b5dc076792d1e8d +Clang.v13.0.1+3.aarch64-linux-musl-cxx11.tar.gz/sha512/37be75d49eac83f226e0cd9fdfe6225c03964a60066d5b772604521a99d9710dca5d18f5bd52dc44cbc009d7b0c5fb9cc761ae955a464b41da5f2ec9ba7a886a +Clang.v13.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/33c9677012e496dd93c6f16810060006 +Clang.v13.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/03b7467c7b89cebce8c10231a186e467f875a8992139f897737de5395fa384f6c95eb527172dd6a23fceddeb707ec99b27426cecb5444b54e09ba6b3e4b84611 +Clang.v13.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/b7149a881a72b1cb96386144746eb9a1 +Clang.v13.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/beddd5173e2cd7377505b97b7504346936223323e0c4af50993c450d26b7596f579419dbdf3c0104b8a18a354207788ad5dfd4b1e9f44d00fc3c6ab0dd9431e7 +Clang.v13.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/md5/40bae6cdb747b1f56c5737650e1ca242 +Clang.v13.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/a7a7036956a73d905a6a4fed997b7f8284f790112a958fb6b2d9d57f06d20087dfc89f8bd7a3627e2d9d55353ed90ac5d077ff7c46933852a7402c4d7279f041 +Clang.v13.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/md5/2246f9cdec4dd5453c27fe92c2aa2da6 +Clang.v13.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/575eb98dd389acd189e52ead20619b5147f73eeda9cc815734d4664a01913971879eda142b68656c48b7a75a220bf6114d28e0bdf699ea2f23112eb715f7f2b7 +Clang.v13.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/3ab681a3e9cfa5fb7e8199b6ad9e0711 +Clang.v13.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/5f8f993eeab9e2b19975c84a8e77ade7e11b5c3755bab5e9a0c0b8a01e4fe8dc3f6d0847ed2be16f93b42c9256310cb7ecb9f3d2d537024d0e6b4eb46a246408 +Clang.v13.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/5062d7d70313878706de86c1448bb70e +Clang.v13.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/156b84392f19afcc5efb6ff1c6cdd6e62f957038d175a36655431ebcc1e4f59754068a2d7146890351fcc1b6ff74741b328a8e1281d22bc21af25a53d1c8a9fd +Clang.v13.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/md5/10f4a6fed7c664f3342186175b22804c +Clang.v13.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/354ec1bb2bfe13917a51cd172e12ae2ec675f271881fa728ffd4630846322c7bfb07ef0b1cd957221863ce75c03e4fb9363ab8e4405049134e8cc2eece5914ed +Clang.v13.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/md5/91433c50a111b4a4e64f89bc926cf7ad +Clang.v13.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/1abf06235564eacc19f5bb678d3519b98e63f5f727b9fd98de657fe5aa947a71763aa49b106ad3ae5376d2026a12b7afe24325af69d848fc59e3e0aa14be1e9d +Clang.v13.0.1+3.i686-linux-gnu-cxx03.tar.gz/md5/2709c6871b2cb9a4882dcac5346ea867 +Clang.v13.0.1+3.i686-linux-gnu-cxx03.tar.gz/sha512/f0b84e9ca2d39db23ef6f5d9d6104582f0803102718fa576a2f422bb48f246352b981fdd3e780eb74e0f112ca1dcd63c6f49c13eeba7d8ab39cd1aeb1aeeb9a4 +Clang.v13.0.1+3.i686-linux-gnu-cxx11.tar.gz/md5/3e32b2bb40ec94ad8f4c8fe577286e02 +Clang.v13.0.1+3.i686-linux-gnu-cxx11.tar.gz/sha512/6d614d4c1ddba0fe78d549bf6a2a882567308321fad85b5747b9db3f9e2176ef28b5f7b32ebb003f19d036e755b1e8c72a19de689dcd3cbf9fe89a1a88bf15a5 +Clang.v13.0.1+3.i686-linux-musl-cxx03.tar.gz/md5/06ea1f4d33203c3915d64ab6b5f1ed01 +Clang.v13.0.1+3.i686-linux-musl-cxx03.tar.gz/sha512/9da8092e5ff1cd15428175d09e5ac2e815391d7dc80138baee9276225d5ace24734c66e383c8ed6360657474df0be43ee68f029eb3e6a6a879a72d0f5da0b572 +Clang.v13.0.1+3.i686-linux-musl-cxx11.tar.gz/md5/1eb9bc45aee0589e1d5d781b7743c823 +Clang.v13.0.1+3.i686-linux-musl-cxx11.tar.gz/sha512/b8e5a0dc0e3216b419175c1ae030e1edacc44704b04f83d41f4b555ee903dc6e2ac8d0568ce7c24e379c416852f1ca507ef0cff9d4abeed3395b21ebafe4aad6 +Clang.v13.0.1+3.i686-w64-mingw32-cxx03.tar.gz/md5/437cc45276d3bee1233308db766968cf +Clang.v13.0.1+3.i686-w64-mingw32-cxx03.tar.gz/sha512/488a6a4d6bc222f6f1f6254a7c19eafbe99751954dd8f4ba9c7a425fc4b3b49a2d48d6bd5aa3d703f71a59d662bc667950b76bbc865aa130bacda90d584f63a5 +Clang.v13.0.1+3.i686-w64-mingw32-cxx11.tar.gz/md5/6a88c0716a99b016339e28dc22d30bec +Clang.v13.0.1+3.i686-w64-mingw32-cxx11.tar.gz/sha512/ccdba53efb9743a7d41d3f27bddbd0970853ade094ebbdae1c35c42a27b488b97f9b2610256e36f433f0a17c3f8574ebed7d2d5430bc42657fb09a186154bc48 +Clang.v13.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/md5/ed6bcaf4915cc827492320b96ee510e7 +Clang.v13.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/e65d787e0cfe3bb36fd816a4f16b74dbb99f30c96cc7bcba53ebea2fcc1f647bdce252df856cc783451e3c96dd93669fb5ba5ded27e65c6123e5d6709de40503 +Clang.v13.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/md5/6af5ec7b71e0b5851d76954bf730c45c +Clang.v13.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/25352739f23767168660c752e6834ea9607a860d07e6a4ac2f985c0a4a7552e44804024b5abe185c2b0fd6dd4b35132923ba0f190aad8abb0f17f0a48691db34 +Clang.v13.0.1+3.x86_64-apple-darwin.tar.gz/md5/1dc57f6914486f548e431a66dcc1e9f4 +Clang.v13.0.1+3.x86_64-apple-darwin.tar.gz/sha512/199d2248287bdd3dd9074b40f3c468fb00b1e117215260c59f9ad2c80f6a20d1cac5a77822e4dade6181139451f9d4d309db0abda4ee09dbff2cd917eabb9b56 +Clang.v13.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/md5/a2c0c38cbcc160906abe46e5acc6fb9c +Clang.v13.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/sha512/84f2fa261244a03b9ed59c657aa477f075ebb98cc3d0bc0f765ee2de8982a1c0b71fdac0eb15aaef2b5852176074917d7ba3760918d622ca247870ffaa3aafc9 +Clang.v13.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/md5/ee724a7ab8333f31226ba76850c9a94c +Clang.v13.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/sha512/f1b5f1f412ebd7767ba25c5347fd6bb982b0db0f30f604591582716605dd96eeae1a306d7b956b594582095dd2a2a9ce44c94086b5f17fa0aece85d598f8fec2 +Clang.v13.0.1+3.x86_64-linux-musl-cxx03.tar.gz/md5/965f47dc273c3e00a6d25ace35e74867 +Clang.v13.0.1+3.x86_64-linux-musl-cxx03.tar.gz/sha512/e9c5e20a2fc046eaa522676b6a25bb943fc7721cfee2e00be7f63d9c43e1a635b1ed8692de56a55f0269c8baa8b94f52d0c9095b90337cc62c56809e543a29cc +Clang.v13.0.1+3.x86_64-linux-musl-cxx11.tar.gz/md5/035d3be1bb3aeb439010fe109953836b +Clang.v13.0.1+3.x86_64-linux-musl-cxx11.tar.gz/sha512/f08013b9d843bf0f7f88898d37729778512bda54ead64cb4360cc4edf1a0b43b4504c99dbe5caa99427c6b5ffe194dd98f361bee2799d41243264f0f40dd88c9 +Clang.v13.0.1+3.x86_64-unknown-freebsd.tar.gz/md5/724ccae9319c81f1ef23796e82aaef5e +Clang.v13.0.1+3.x86_64-unknown-freebsd.tar.gz/sha512/7340ac0014c731cacf9b576ab4e0897f5dbc74b82aded291fecf3e6a4885652edd544598801565ec2c5bffe53e3ff61513827a0faea7a314dc80b8bf55e11dd5 +Clang.v13.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/md5/0ad85f1a244c18e3aa50bd9e207638a8 +Clang.v13.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/sha512/49691db5dd493f1b91d84c0fe00857f0b31d1cb0bf398f5bd393afdfb1a5a9bfab083dedd6403a492fcabb87867b9bff1352ac52a516d0885bbf9c3d85b46e54 +Clang.v13.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/md5/8c80f1d91f7161dfd8e409e9897047f7 +Clang.v13.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/sha512/d282f9cfc3336af5d9ccdefed2dfbf188d22b05617c86f98fe41afcfb28bcd0b919aa4fe51bdfb4f1bda9a099490d00e97c4c5972eff0be4a0b20cb68b143dc9 diff --git a/deps/checksums/llvm b/deps/checksums/llvm index d1dfdc0d7f2a5..b1791ca666311 100644 --- a/deps/checksums/llvm +++ b/deps/checksums/llvm @@ -1,61 +1,61 @@ -LLVM.v13.0.1+2.aarch64-apple-darwin.tar.gz/md5/6815ee15551aa80f13f9eb61605c5e22 -LLVM.v13.0.1+2.aarch64-apple-darwin.tar.gz/sha512/a8fa0e03574965227b764c05bc4c8621e691d94515c3d07d47ec5f01c0559f98ff8aba7ef6f40e38cf4870de45f39ad070a80b4c1be8b70eed6916d6a4060323 -LLVM.v13.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/md5/b728279d46118d1956e0cadb4baddbcc -LLVM.v13.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/sha512/01975b8759cbbc10dfac452aab57e1d64b71930812854c6875895d32456400548327940c2fa17d3ddec6671bced60fa81c9080fda1179e213b1f3e2ce621546f -LLVM.v13.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/md5/9baa16cdbb3d061d011495d169181dd9 -LLVM.v13.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/sha512/28dd7d67609cdf3d28464eda565a28c893d13e3019ec2d8969fe118cd90a4caea3b5c5ade8215b14bb2db96ca704e94893e800d4130d85aea1a757eecd6d325a -LLVM.v13.0.1+2.aarch64-linux-musl-cxx03.tar.gz/md5/6dbbabf22fac39bf2ae0b457ecf7b33a -LLVM.v13.0.1+2.aarch64-linux-musl-cxx03.tar.gz/sha512/460355189f72a47afca677c119d34dc58897612121219c482decb447272409a1558904346692cdc05fd83571d8af71ec058c2cf48a30473c16665e46d83b236c -LLVM.v13.0.1+2.aarch64-linux-musl-cxx11.tar.gz/md5/d590608235f692f974168702490963ac -LLVM.v13.0.1+2.aarch64-linux-musl-cxx11.tar.gz/sha512/56a89ac86b9d1a28baf1d2f246c9353e7d51931189c02a96aeaea23e3094fe48785085efa986ab01b7ac4118f42c3fac0f1844907ed0f2fa0375ff4d789f4c60 -LLVM.v13.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/341b2814710a2d012f2ea47e0ecb9a33 -LLVM.v13.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/9af49ea105a90199163f34ef4f6cc480a125e7d637d3ed26122476d8facba3d2beabd70b12239ec00c123ddbdcd8332cbe79476ea2a0d507fe169270cfdf57bc -LLVM.v13.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/c20bf6b9e83179745451ad077a66d789 -LLVM.v13.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/15a1be3aa4791036bd30d39a541ffe131ecf5e2b8636b7617aac82dd4ab8aadae937d526de35c5aaeed3c9ff2598a2f4da07b7601b549d047b07c01979dc49c3 -LLVM.v13.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/md5/366ea65aab6eff78d311d4e68ee4f008 -LLVM.v13.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/665556314ff0a9faaf8813f691c9f4d0fcb9f01878543c30113259233d22652ec3750cde8deca3e9d08eed7930568d68d71fc7913299a065f90e0c2db15b01d7 -LLVM.v13.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/md5/386a521b3bd07787ae39d1bdd04749c6 -LLVM.v13.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/fae5cadf82a25c32df40744d831ff499f7a38b3e67622fe6bad25735bda921b42cdf46ae97476eba34097070625e2d389c13658d33383d9c30434ec6fb0c86a7 -LLVM.v13.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/a8f5a44968b76c3b9ffc9f167b8d7019 -LLVM.v13.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/1194766a8b9e8383ce9571b118800b5dd8638bc6bd81b70f0748bff2904155b1d3dc12b04a2cd49b569cbabbe5838e1aca80fb932159d4f6131a3b301fcc25d8 -LLVM.v13.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/929e2cb09e3ee879d079c756ed45e807 -LLVM.v13.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/05076dd00ead60efe0565e2429f28b7c8db8e18b375ddff9839924d0edd2fb8c5de75c3e8096c8b4425a85e3d79bfc9e3f05c8e445ed185d4024a2101bd98324 -LLVM.v13.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/md5/2cab2db22a48a03e58e37371cb60fb95 -LLVM.v13.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/a8420c326d21b975cd2be24809b523722dfcb44f3721a10fa9ff9e37b20d28a9ecf868cef84fa8ab01fac14fd321487fe555c06427aa1776cca4712a22dc2008 -LLVM.v13.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/md5/ce5efd7e8646572719f2faf39df99f0e -LLVM.v13.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/752c66ed76d25970c796e92900a371e42e1812cb5aad5440a5f769f7bdbea8d9984ac0822b15dcf6bb59209bada33427cafba57abf2100c27bf97db603f6032e -LLVM.v13.0.1+2.i686-linux-gnu-cxx03.tar.gz/md5/477bf71f1757565fac29bfcf25a89ebd -LLVM.v13.0.1+2.i686-linux-gnu-cxx03.tar.gz/sha512/56114bf02a2d84a2e3c875c486b8186c07b6300fc4433b277010c0931365e582dfc820a357af4a23c831ef5ca84d7214764d4787c53f543f75f5b57c2569ad72 -LLVM.v13.0.1+2.i686-linux-gnu-cxx11.tar.gz/md5/e21d6ac180e25cd60e10beeb32702152 -LLVM.v13.0.1+2.i686-linux-gnu-cxx11.tar.gz/sha512/1baf767b024d5d0ffd5040c7cddf8f31f66f47819aa924bfb3545dcf63eeaf611518b802d29957b8009b03df553d6b3f018e4090885cc0cf7d9d79385e8f4bf3 -LLVM.v13.0.1+2.i686-linux-musl-cxx03.tar.gz/md5/ff449600df86f6ded0798ced95e7db36 -LLVM.v13.0.1+2.i686-linux-musl-cxx03.tar.gz/sha512/eb379ce9f84f36665a17002c86b0f59733e23809267736b628123f82482ac5af17ce649f7bd77751921db58a7a79a82ccb95e27a5214ad0abe6ac465f66da995 -LLVM.v13.0.1+2.i686-linux-musl-cxx11.tar.gz/md5/087a933781b85de3729d5db84fa20cd7 -LLVM.v13.0.1+2.i686-linux-musl-cxx11.tar.gz/sha512/7a52633e487273d82637e3a24c7efd788fcfc01be424505fb34aed4665cfe60b6ae04953c808476bfecf4f2022bccf01ee245b99f759baa9de9cd1f163faf12b -LLVM.v13.0.1+2.i686-w64-mingw32-cxx03.tar.gz/md5/b4ecd35d0e0dc5e675e62169f217f191 -LLVM.v13.0.1+2.i686-w64-mingw32-cxx03.tar.gz/sha512/8bc51431c5852df4c6145f7a5518fbb2bc4b5a8710aab8d8a5af4f0a128356fb259f9eff477abd0c91506c22e480af496fd9c05728b6b45993c26688eebb3b50 -LLVM.v13.0.1+2.i686-w64-mingw32-cxx11.tar.gz/md5/fec011e6f4eabde8123402aa8f1c35ae -LLVM.v13.0.1+2.i686-w64-mingw32-cxx11.tar.gz/sha512/a3f5d8849cf35cb27aec8241187fb60c1de7c4bc6248b7e777c18407c005f57e5a2e843886f1a514419f4abbf8c5df2ff2cbbc7a973b1620630ee8c8794f02e0 -LLVM.v13.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/md5/26f7fc57f435a103511f2808b14abe3e -LLVM.v13.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/2364470348b727771919bfc5dc92d2e81532c8021e7a7c47df3595f546cd0e155a8dcce5a899ff593de46ffdee1bc574e5b5591941648593057ad118c8d3904f -LLVM.v13.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/md5/c9acc3d5378866db53f51e4347e59f37 -LLVM.v13.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/b6d1db7096bbf831619990e8e4307b8ae6483ab004649412346afdff64ba14d355ae829dd993a10d418396b001754f40030ad1ea7f3bc89acf7ff044671f7a0d -LLVM.v13.0.1+2.x86_64-apple-darwin.tar.gz/md5/c9d2b7b516d61602ae26bf6e3de02a5f -LLVM.v13.0.1+2.x86_64-apple-darwin.tar.gz/sha512/2ae15491e51828f60d35a6c16b63ca3ccc5089f84418fbc317834439a4160d95370139cbde0e62010e64020067eafafbcea28bbaf05fde19dd407f497eae6b4f -LLVM.v13.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/md5/5fcd6aaaa858b1540a84dc766147289f -LLVM.v13.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/sha512/7bb91cb89fd50afee9613d117cbad32b53dd101d6b58d6f8e134dba5462129e856837dafd9faa745f5c5412d6a3b8de237e691cb70189c90bee04f4308669c59 -LLVM.v13.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/md5/a021bf040adc51fcebc64da3c4b6a84c -LLVM.v13.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/sha512/0b6dff3addf1cf48f384738a83b99aaeb540d28089f86196532e2b103b2671f440ab469599c261f9a3644361766e3f397bc4f834e0718a75db12beea0c81cd1a -LLVM.v13.0.1+2.x86_64-linux-musl-cxx03.tar.gz/md5/d1387495bd3fa2aa4418cf589670d473 -LLVM.v13.0.1+2.x86_64-linux-musl-cxx03.tar.gz/sha512/37c19f25ddbf44ede9a6942a6118ea38b54368e97b0d7c12d23498623c5bd6cacc7c784a85df491c682d34d6a96e3aa6063bb9fbc4f4828bfa440c4e49b93390 -LLVM.v13.0.1+2.x86_64-linux-musl-cxx11.tar.gz/md5/5240bb7c39a0a91893d5aea6064c1364 -LLVM.v13.0.1+2.x86_64-linux-musl-cxx11.tar.gz/sha512/60898ab7e662f5eb86ddda86debb6dff1a6b86732c2eda1dccd89b7782edaaa554af2e8a2e29e5d4dd5a7d1407d8ca7a94e4db93f1c8e7cf7468d79b4cda9a85 -LLVM.v13.0.1+2.x86_64-unknown-freebsd.tar.gz/md5/b086062730235e7669ed3df473be9a41 -LLVM.v13.0.1+2.x86_64-unknown-freebsd.tar.gz/sha512/8ebe5230c59ebd9066d339878dca2c0fb7f9e505ca5f00c87cedc6a2b3b9b621a3a33da077611f7fcfdd940a8268790b9fdde3bf5339137a7a958a9c8a01d81d -LLVM.v13.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/md5/ecc17eefa6e0f6e329b248a734d1836d -LLVM.v13.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/sha512/337a47ebf8740e63caeb342756107d6cbf2fda2af298ed948790b8aedc0f68d56dd930130958d2bbb42cdd54e94d647c0b954f324399a407b6326e2f6cf93c60 -LLVM.v13.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/md5/8be5b54888fa98967a73268842d5cfcf -LLVM.v13.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/sha512/0fcb7ed50d27cf8a830f62c53ffee0a95f79934f302b92c660a6955b26439b794b036a7958ab4597fe28001955f9fb02ded533104b9932bed310f19ce0cfe681 +LLVM.v13.0.1+3.aarch64-apple-darwin.tar.gz/md5/7e54f07bd943ac6e38d9939e04352aca +LLVM.v13.0.1+3.aarch64-apple-darwin.tar.gz/sha512/80895cab8fdca2c6136bd3205a7a77845bb6d5005dfc1505e241976849ed3fdee749f43d5d4c3ebf155c438765ce0d76fcbc03f206afa3ddd2e5dc38852b8d8f +LLVM.v13.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/md5/c5f1ecaa98eb67227fc0282987e9151f +LLVM.v13.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/sha512/fa96f48d8b9ca3bf8a951c8359069ed75f0e1efee4d8d790ce3a0b8d94466a8c6900b0a07328b8fb44c03c02c0a0138601f110f766362b87c96bbfa62b866778 +LLVM.v13.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/md5/027de943c11d982de077bf0f88f24fa8 +LLVM.v13.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/sha512/1a5e1ea812959e11d2ec9b520c09207c74510b1f547b7c44e13b85692b36db65f7c49db807cffda7ddfabf9bcae66b9c1ff84b25f3b482064ac31cf4b20adf07 +LLVM.v13.0.1+3.aarch64-linux-musl-cxx03.tar.gz/md5/5d488ba42737890f91fcd9e0cc0813ad +LLVM.v13.0.1+3.aarch64-linux-musl-cxx03.tar.gz/sha512/f52f1099b74c3beccaf3f2d8b1fa40ba0bdbf2e141edd1d904f4fccf1cf70f7c66655a8a2b2eca62eddbaa2956eea191e3e8c9f57fb184a4185d42341937755e +LLVM.v13.0.1+3.aarch64-linux-musl-cxx11.tar.gz/md5/a8da56138949f51b906db422b54920a5 +LLVM.v13.0.1+3.aarch64-linux-musl-cxx11.tar.gz/sha512/ce4adb7a3f0e57e1e5c0585741ca20f02b77ec763bfed2b6ed243bedda91691b0797786ba2c69d357192e71df5ad396f7f6981e5bd6215075d8dae9c520008b5 +LLVM.v13.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/2fb082473ed69815efcf2cb7a619594c +LLVM.v13.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/8c8ae5e19f08cba9cb163880ed5dabc5465ef8302285e3e1b428418c91c8f37f469c66476bdb2ede0f619e7d00ba6bd15cb43bd9f7b0c725669e32f0b3ef9004 +LLVM.v13.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/eb294526c9fe3b83644a2a1ae4165371 +LLVM.v13.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/59d665c0a47fdcacc978fb67d5cf43ddefa0c5fe526915387f7207a68b39bc66e27718865468885f1c8adf673ab61d9ac63cceac9a87f3fdb88a22b81b3b6521 +LLVM.v13.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/md5/00125dfb5ac98ec5f04cae4ee3ca42f4 +LLVM.v13.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/933d5c4b0a7753388f0aff98cf6fb542f5985558baad3601416e20aac97c31ec7d893aa11001b128487d31c5fcf4406d7e56ec92c71bad5d6662f0e3bf52ab74 +LLVM.v13.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/md5/e2343894fa4ef39d9ab084c532978f45 +LLVM.v13.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/bc030ba9d1064208cbc84090cb635d5f46810214f7c990117c3d28ea85d1e45e1b827b313b50d5e452f3f9667dddd974dfa70911a55dfb7db66d37c87fd7ac7f +LLVM.v13.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/67e03b303bce634cd51b8e9bdacb04a4 +LLVM.v13.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/f37e26e00b01bba76824b71751e912f895b28d2793fd0b37ab6f220fc6224d40db2c456eacf574eef2e42f365223427ddcb38f77afe489a575913907c611872b +LLVM.v13.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/be091b1864250f1c0dfdc46f315047e4 +LLVM.v13.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/6a9313e8774c0262a6bffa067f6c621d035f93851837b248ec60a187d431064139c1c5a9126d27056d30b6c3c97d7a6125d7bcccc3fc21b85cdf84df2887cf3d +LLVM.v13.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/md5/a55ef08ae7f1fd0f415cd42ff2475c2d +LLVM.v13.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/35240b891fc4d3c2941191a52d371a9dd26a483018ec1c9d1ea1d05793161928479fad612d53da104becad0e6a70aef9bcbe5feb8e5248c5a20c374fa0034be4 +LLVM.v13.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/md5/6401e7c969852977315dbe8d33c93dc4 +LLVM.v13.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/0da5f372f6147dd7c61b1be3275e279e71d0754e80096b22cbac06bc89535218614c78b82b1efcaae0bb89d252b0e47a9115c65fd0f22975fa4a0b84b5ff3632 +LLVM.v13.0.1+3.i686-linux-gnu-cxx03.tar.gz/md5/6d201680c49908b358757dd70b32f55c +LLVM.v13.0.1+3.i686-linux-gnu-cxx03.tar.gz/sha512/e5d6bf52f3c40ec631b35336bd64e0002bdc224d22572cce069583d14ac5d6134055d5a849ecd6013e9250318f0ab1a022c96c2ea0c02e8ab1b88bc109ac451a +LLVM.v13.0.1+3.i686-linux-gnu-cxx11.tar.gz/md5/02f5dab2de74cbb5d3d024e606e09f2b +LLVM.v13.0.1+3.i686-linux-gnu-cxx11.tar.gz/sha512/544a27a7d8ffcaf202df4f812e595d37382c2c498c8e181d020cd2cf8dc2cbda5b767eab382e41fd2819aa8df45010a9601a8b830de91ce4c9428c8a7eaf8c04 +LLVM.v13.0.1+3.i686-linux-musl-cxx03.tar.gz/md5/5dc8d990bcd629d32f300b9b86cc9d62 +LLVM.v13.0.1+3.i686-linux-musl-cxx03.tar.gz/sha512/add858bc54e94c93aaccc11f67d26d3aba1d30198059903d42244ba5bc7eadd3edb7a60d446b3b8ceb576addd7ab255960f633ff3da0d7ce82d46a8903f125eb +LLVM.v13.0.1+3.i686-linux-musl-cxx11.tar.gz/md5/4049845df139ccd2bffbede82c204869 +LLVM.v13.0.1+3.i686-linux-musl-cxx11.tar.gz/sha512/e5178f3f0dfd0626049145db232c729a3c322fff7672b0c06d1a2e73cb17572ac114242cf7d2e9bec502fb49a12f26015f2efd720a5c23cf1ddf105c4640121c +LLVM.v13.0.1+3.i686-w64-mingw32-cxx03.tar.gz/md5/b75c3382567956fb06bd5efd60963055 +LLVM.v13.0.1+3.i686-w64-mingw32-cxx03.tar.gz/sha512/143d3171ee87e65cd1547532e8b95884a936f3a107f2d8ae33407c90f7364e3a5f6e01c477341018eeb87a2ffe3cb75170d458df5605615192fb788b4315cfee +LLVM.v13.0.1+3.i686-w64-mingw32-cxx11.tar.gz/md5/ca1415e2f032404687a341af97183224 +LLVM.v13.0.1+3.i686-w64-mingw32-cxx11.tar.gz/sha512/d87f47ec51bfb532515f27c0b2322de45c78797921215429bdd4e7eea14b2b0a1baff435f8d03186eb9d742991c0609174d748ac4dd7130cf1b71556fe27db44 +LLVM.v13.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/md5/fb4cf2380b1ac91a1d3ee3c3847dbb08 +LLVM.v13.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/bbe75d62e034257244fceb984ebfae3d64e81b3197150e3eaddc2a5ec9a26d7ad73260d0a6a693d160c2a5fb91eb050aaea180287debf930438c10dcd4c849ff +LLVM.v13.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/md5/c720870d6d5e3e8c4cb316c9ad287dc9 +LLVM.v13.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/c824e1feadecce7616b69b02b67be9bc54eb071ea65f5f0c4c8f7e9477f1aba73f3e41939aa4676619139a19a6391a670db11b29eb2a9ec93a813857156bfa31 +LLVM.v13.0.1+3.x86_64-apple-darwin.tar.gz/md5/0b36eb64ea8b95e82d277593a9cd3191 +LLVM.v13.0.1+3.x86_64-apple-darwin.tar.gz/sha512/cdc942ac779e706bd7aa55d0c9309e83c34d36f1e7a05647b2db1fde81fbbe1a1aba77ab233f7c95285886a0058cdefd46f7fd385fc59d711e2a3cbde2e1d42c +LLVM.v13.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/md5/0e30dc3de41b111d4cd5b53262a33e89 +LLVM.v13.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/sha512/7c1609a7c161ca085a31e4176bb8faa4312a00fa7a53fd4f4a8c18f04dab971f36cda7f8d39982b1630402cd20b9af66cb5b78a2fdd6634b1ce46689f1033e11 +LLVM.v13.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/md5/6e5bd025600bf274f13dad34f918c53c +LLVM.v13.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/sha512/dc1760d1b61c3852fcde0692d8ed798de695178834b13d68723ad07c5224c79786af0749b72876a777197a432f2b717240450106cfa31ad504b4841380f8b3ac +LLVM.v13.0.1+3.x86_64-linux-musl-cxx03.tar.gz/md5/1927e9d011b42710139ebe63abc62f00 +LLVM.v13.0.1+3.x86_64-linux-musl-cxx03.tar.gz/sha512/c7bb01d99f18ee4b41ae5363df5789ce314fec35f70710924cfbc99e559a1d4560cda2ccd5d01889f839a11c68bf3a4105b53593cd5383425fbea4a2e9096a3e +LLVM.v13.0.1+3.x86_64-linux-musl-cxx11.tar.gz/md5/d0f5d9dc987afe93475ff9775cb9cceb +LLVM.v13.0.1+3.x86_64-linux-musl-cxx11.tar.gz/sha512/067b4be79d0b7a3cbe00011b6b1f7b424f45dc37d5288406bc7618684db37a7f0289a5f26efb6aeb8f858be60beb6515b3a36188285e680757e8253e26e27e3e +LLVM.v13.0.1+3.x86_64-unknown-freebsd.tar.gz/md5/ec222de607f1c3a3e446a3eb3ec57f14 +LLVM.v13.0.1+3.x86_64-unknown-freebsd.tar.gz/sha512/bc643903b7b60cdd0be38035985d628e8b9be3fa07f5d11d5bf40b71087bb352f8bb853b1eb2678ba47379b43aecfde8177128c2aa9583e1e1139aa634e20507 +LLVM.v13.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/md5/f76aa08ab8cbccabb4ac4100218bb2b5 +LLVM.v13.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/sha512/115e683bae15be4aa78423416b703f8d4f2b92949d6430810ea5fedc42137d06bb96215fa296af22f6fca7504ea6ae15666573c0ab900b5f1d9671b3ac1b9095 +LLVM.v13.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/md5/7da1b840c39b6369d8e60527f9b965f9 +LLVM.v13.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/sha512/0ccc6eb5842eb668e7e8cc23c25e180832f3de0c93e8534338c49949a7378f195d118ae38e0262ccfb9f708ee5cb0dfb530fefa7e2b4e24aaa7252ac224a75e5 LLVMLibUnwind.v12.0.1+0.aarch64-apple-darwin.tar.gz/md5/b95ad4844e649bf46db43683b55b9f4f LLVMLibUnwind.v12.0.1+0.aarch64-apple-darwin.tar.gz/sha512/15e0996aebe6db91fe58121001aa7ea4b23685ead3c26b5d89afae34b535e34b4e801a971f4854d8e1a1fbc805cece06272470622eef863e225358113a127913 LLVMLibUnwind.v12.0.1+0.aarch64-linux-gnu.tar.gz/md5/6d8783dc9b86c9884e0877f0d8ac4167 @@ -88,181 +88,181 @@ LLVMLibUnwind.v12.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/54ac594b4c8e7f261034a8 LLVMLibUnwind.v12.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/a43756afd92081e6dd7244d162862fc318b41ca110a5e8be6e4ee2d8fdfd8fb0f79961ae55e48913e055779791bd1c0ecd34fd59281fb66b3c4f24a1f44128f0 LLVMLibUnwind.v12.0.1+0.x86_64-w64-mingw32.tar.gz/md5/83cf8fc2a085a73b8af4245a82b7d32f LLVMLibUnwind.v12.0.1+0.x86_64-w64-mingw32.tar.gz/sha512/297a5c7b33bd3f57878871eccb3b9879ea5549639523a1b9db356b710cafb232906a74d668315340d60ba0c5087d3400f14ab92c3704e32e062e6b546abf7df6 -LLVM_assert.v13.0.1+2.aarch64-apple-darwin.tar.gz/md5/e474b6580bd1347d9342b648d69d52b4 -LLVM_assert.v13.0.1+2.aarch64-apple-darwin.tar.gz/sha512/3c5b4b623e6c47e63eb1297988aa9070adf8cb587cb6b2f7a02bffca1d1c8a6cb56423df0072d7af028f4caece652af57f695ac3ffae8c53075be39014b2af54 -LLVM_assert.v13.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/md5/0e2c5c7a0e8929294bd757e5d6e94ab5 -LLVM_assert.v13.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/sha512/c486dc9181d23c2f97d2405100ed9b8eebff83c3b1db82486d3c60643523bd2a27ea8b4825a1a918f4a5e44ec5da25d791b1751f1c4b84d896dd3df8e7cda759 -LLVM_assert.v13.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/md5/2b1d4d10434d57925ac3d60312b40522 -LLVM_assert.v13.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/sha512/1fae1e2a5d0713961d465bbfaff758d360df11bf5aa62b8f400e6604024adff081c378a79c32c954cf6918ac92115a9b8e18201b14f303883772609ce87ba9a2 -LLVM_assert.v13.0.1+2.aarch64-linux-musl-cxx03.tar.gz/md5/e9af424fa0186fbf7a7a40dd300a41e6 -LLVM_assert.v13.0.1+2.aarch64-linux-musl-cxx03.tar.gz/sha512/ef21ca4f7b3ab2a2e58b031254fecc740c63c770a3634b5f47a2a8cf6d84f1cc16e22b84d643916902831a6bbbe743622e3a8cf4ff6a4ca793975331500560da -LLVM_assert.v13.0.1+2.aarch64-linux-musl-cxx11.tar.gz/md5/3f97399e3965a1cc0d6460933e0a9aea -LLVM_assert.v13.0.1+2.aarch64-linux-musl-cxx11.tar.gz/sha512/49a7141b3c94fb7112974d378dfa61740971d80aab4fbd4454f47177d90413aa324e70bdf39de0ccd2c91f5698a12af77b8b71bd848c0b7036da52578a7f15b0 -LLVM_assert.v13.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/b170cec3c1fddce17990ea922b7817ff -LLVM_assert.v13.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/93a89ca141392831a4eed79d0634e8bb0607bf9bfb45e6e8b91883c57991da4f244eeb8debde510697de09d19b527218c50a47d960387aa81149f4d22c37a73e -LLVM_assert.v13.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/a0bcae6c39c024f7a0601a82fe89532e -LLVM_assert.v13.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/5a2f7b34c9b30b21635567603e34c0bd0c1705788f5e44e549fb5387a0122ac6d481702daf90738fc5aa8447cb74b941a93e6ee17a231031f3f0727029d27d9e -LLVM_assert.v13.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/md5/76c423b23300174364fababd773ffbe6 -LLVM_assert.v13.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/be0c48f6f634a8e95dc68d4f134570ace8190afa58640e5fa49cd07eeeec047f64b9e9a27e7503773fc3264fd97d979175a7ab6608a92cc4dfba6e9ee28d0557 -LLVM_assert.v13.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/md5/0b68aedeacc9edd33e9cfa9f0fcdfaf2 -LLVM_assert.v13.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/14ef3bc186ff354a16e4282b8658726d77c4c70e7907218647e5ee240a2693783c9db1507a6ec2b6a40645e21f257f764ba5d8b6423a8ed4c3b3a3c4a3c2728a -LLVM_assert.v13.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/0aed5cc59441335062cda8b07688c913 -LLVM_assert.v13.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/a898a4ed9b53c6089665f4c0c9bf6645ef78a11ca05d1ea7435eca0c074c95d8de50b722d2b0e2d01b43def5007e08e87dac44276ba8050d95ca230cb799070e -LLVM_assert.v13.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/773f3b5191e14e67750e74597a4dd441 -LLVM_assert.v13.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/f9ec71d14b2db4ebe7c9a859e299e33fdc16a0e36b41e02e58a25682c5aa16a68000bc47991ab93013aa09806f6deb1e5f6f0a0f92c1c035b977ee6ef32c09a1 -LLVM_assert.v13.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/md5/c779f1595078e720f80263a93626498c -LLVM_assert.v13.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/d5ce18e405d304607c28fbd1a3f8d4bf12d70eb26fc987214ab631297c0e977fa6408a7f282562ad4fc32387edadbe13a8a4d78e00e4e6d6749f04e1babd32df -LLVM_assert.v13.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/md5/e8a9fa7f10b552e4734e6136a2067f75 -LLVM_assert.v13.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/ccc278d988f59349db4998cab399f0610a9c6daff1e3e2ba0d3c5c66febe2228cc42022040b505e1e6298a0495293a7d8a37359a5cc33050ea574050f6ca675c -LLVM_assert.v13.0.1+2.i686-linux-gnu-cxx03.tar.gz/md5/790620f4cd621c78b898c843222b2bbb -LLVM_assert.v13.0.1+2.i686-linux-gnu-cxx03.tar.gz/sha512/ef3b4390701a5ad4f449c77052466183af824762d3ac050afb0c5154a72c6256c31dc642c2fbb9f024121125a06f74aed522483de0e3c05805dd90f79721a836 -LLVM_assert.v13.0.1+2.i686-linux-gnu-cxx11.tar.gz/md5/85d2cb6f80252d8421f489400ef775bd -LLVM_assert.v13.0.1+2.i686-linux-gnu-cxx11.tar.gz/sha512/00dc218b38d0400a80ab6f4a657d57db663a8f3ef43e2adbd01a563d8c4640086c644eb248a2fce82e48718300ac03517ec9592956275bb173bf9f520f7eb359 -LLVM_assert.v13.0.1+2.i686-linux-musl-cxx03.tar.gz/md5/736ce38ce38e817768366cd0d0e6d97d -LLVM_assert.v13.0.1+2.i686-linux-musl-cxx03.tar.gz/sha512/15e1ba329e0d938ad80ef729e2b10f12f95ec85aea28a072847caef15b53afe6a6679d666027cc83f18affed67228fa9e18e3ca02f297b283c44c155ddb5077f -LLVM_assert.v13.0.1+2.i686-linux-musl-cxx11.tar.gz/md5/c6ed71b0915b6bae9f215129a20b47df -LLVM_assert.v13.0.1+2.i686-linux-musl-cxx11.tar.gz/sha512/f34851f8796d92b6be16f055b2fbc447ad937e9b6f2b3c4e1fed82780863a433d8c60802fdc95fb321e15713736db4b745f6218078b88dbc5272bb6ce348e567 -LLVM_assert.v13.0.1+2.i686-w64-mingw32-cxx03.tar.gz/md5/83e20f2c5756e4aa8930c5bfda1cda61 -LLVM_assert.v13.0.1+2.i686-w64-mingw32-cxx03.tar.gz/sha512/5c69109d543ea4bf10a2e2031ae3bd5f3a049344144dcf6897ce7d7b1c76025ecf4dc86fa4ac77093993141286bc63e762894f4f064383cd2dccc60734988064 -LLVM_assert.v13.0.1+2.i686-w64-mingw32-cxx11.tar.gz/md5/bae6a74bc87765e25e8bd36beb664acd -LLVM_assert.v13.0.1+2.i686-w64-mingw32-cxx11.tar.gz/sha512/8787e0c6afd4bbe430c41bd624afb665ad1900957c0a86bdc670c745b187085c210fbb17f5fad34626d59da1b21dfa5055ac0101db3f020fd1fd8f9bcd727b30 -LLVM_assert.v13.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/md5/da4418b577f3ae2300629454620f1d28 -LLVM_assert.v13.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/dff6844546dcd7da8c3c0f1857ca8a91a283e65b16143502c0f3f1791f66faf7ec78ef9e7e9753f931984883c777d75b7e73b917ae10765dca29e4730a2151e8 -LLVM_assert.v13.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/md5/7bd0dac8b19f07d4abb0eb58c42b021d -LLVM_assert.v13.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/17feb6913fe13f85c2373171e4fb2ad1064ed57439993db3f01af8464647615dc4486fac76cec665460f8f6bcca392dc2762f550cc3382b2fce3e9950d90d051 -LLVM_assert.v13.0.1+2.x86_64-apple-darwin.tar.gz/md5/9c8143eb5281f6d8661ccac98587c181 -LLVM_assert.v13.0.1+2.x86_64-apple-darwin.tar.gz/sha512/4ace34db86319706cf3b7fde5af326b03dad6b0e615fd3ce8f0fa0598b2d9e8c527ca030444f3e9a15bd6ffe6b0081af2dd9aea1934c699846dadae681cb39cf -LLVM_assert.v13.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/md5/0f495b3e6ab2142723e939445fa15a9d -LLVM_assert.v13.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/sha512/2d27a8bdcd3c64f858ea4cc0b5d5856b00fd93b31027d9cc928f90ad4b344b64696b80b5e238f59f99d400186c359b97894a4e32c2cf514da626db848d75ab10 -LLVM_assert.v13.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/md5/6d68a06c05e13591753331c909dc6d83 -LLVM_assert.v13.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/sha512/4685898829542b686012fc2d3114cc5d11fa2ada310562847b598f72b1549f2e1b00b6f6806f6205422af6a24339d52a6d53c597e6e9a657029b8bac0c43ef10 -LLVM_assert.v13.0.1+2.x86_64-linux-musl-cxx03.tar.gz/md5/da06328307b31df461875cf5ec2488b3 -LLVM_assert.v13.0.1+2.x86_64-linux-musl-cxx03.tar.gz/sha512/ed74c3bbcefef5495b006cfcfd848af36a7faca78d8b6d4ee84b515413ff061e002b942d91b8d25dde87b09bf50f4ae187126d018eeda1eedaa77eea1bb0b805 -LLVM_assert.v13.0.1+2.x86_64-linux-musl-cxx11.tar.gz/md5/97f7b2df4ebe26168bf8aba8d7a433e7 -LLVM_assert.v13.0.1+2.x86_64-linux-musl-cxx11.tar.gz/sha512/5f3b1930593d28b8445c77b20f9e064ea5fee0e1cd9c327a2d59ced38349a0425c9f4e07ed745789270a5906a4e64631b801a0088886784e34e8db501ec52b17 -LLVM_assert.v13.0.1+2.x86_64-unknown-freebsd.tar.gz/md5/8cdb3adcbb93769ee87c52d81f68a25c -LLVM_assert.v13.0.1+2.x86_64-unknown-freebsd.tar.gz/sha512/fb39e79f39af14cecd4cda84ffdeadc9b2a80aab1f755d484571336e8a55dc69e6eb07774de614ed715767e1ed127ad9d6ffd63a011d4f72ff0ece212ca703ad -LLVM_assert.v13.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/md5/00101e6a75b72d7facb88204c42c43a0 -LLVM_assert.v13.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/sha512/9d6da10934a375c5ae58688c6133d99683a2b04c64d4ecfcc515146344f163b99e054f33afaccefe051ca403b63d7a65e05c56b2c695cf2a5fc32f41fe59efaf -LLVM_assert.v13.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/md5/a5608dff32644cde660d453f051999a9 -LLVM_assert.v13.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/sha512/18ed54aeec018219975baa610b3851dfdb4504e0e4a42ae403d90c936bc27ef233a6d86a9e3f7e2018010056a494ae686d2c05db276a047368cfd5932ba32265 -libLLVM.v13.0.1+2.aarch64-apple-darwin.tar.gz/md5/db865124e4808e1d9d3bf673fd413fe7 -libLLVM.v13.0.1+2.aarch64-apple-darwin.tar.gz/sha512/63d9b2bd2274949e8b3184e788790fd2c7976eb41bda63a765cd5090bdad78dd2554108a040f55da7914737f82d6f62037cfc033c121a52a09b414d4386f01bd -libLLVM.v13.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/md5/12896808215cd92bcccf1862d21bdf3a -libLLVM.v13.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/sha512/4e776f1e2f8010f90602b5f2939e6d5f5cff6d2fbdd4ec4278170387cef4734b95f4d63e83849b6a7136978db1e8af37139321350d13cc4c62186641d7e94217 -libLLVM.v13.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/md5/0899638d95c01e5694134095c37cf7b6 -libLLVM.v13.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/sha512/17c7d7303a29e6d9eeadde8293b5c0e32bf7cb11f40ad99853ab97499598bb153dd9ed99e0c3f974f578f21075d3608a4479b359c8e1a870f43a0b4e96a85233 -libLLVM.v13.0.1+2.aarch64-linux-musl-cxx03.tar.gz/md5/28a87ce1a49b04162ffcb9a1c69f3d08 -libLLVM.v13.0.1+2.aarch64-linux-musl-cxx03.tar.gz/sha512/1bfeea1dd10b1d3c743544ecefa4e3b5e7eea36d9f053fa68e3d12067b39648cb2bfa224ce2adb674250015b26724b5bb1e363e43332e0b1a62699fb2acb0b33 -libLLVM.v13.0.1+2.aarch64-linux-musl-cxx11.tar.gz/md5/179933143843b8d02800afa6247224a2 -libLLVM.v13.0.1+2.aarch64-linux-musl-cxx11.tar.gz/sha512/4f590f21355374ccfa4d83e15f50e05dec44187ef47c4cc3b8ef18189763df2a29f0f314dfb2486d03b15e4dbb1f75707d83656b7c711ea7923fc8dbf2ab8530 -libLLVM.v13.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/74743252af0303c21d45be20564b301d -libLLVM.v13.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/e93922b32a8558f3dc5261d8e8f226f02106c3d6c1d54251318b70a91f1192c78de589dabd50778af40e8c38825b5d772d6ec0cbf64374ac23e7e6175a87bb1f -libLLVM.v13.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/6da3d1ad82396c57b670316199a849cc -libLLVM.v13.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/699c710160e0c5914669f842c055bc98e9ed96bc0f4825258ecc9649cbbfdb65a32edd6bf53f8a087183adbca486460a9ebdfc4987d8a8333980327402323707 -libLLVM.v13.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/md5/9f6eb18ac80047e7ac8970196355aa10 -libLLVM.v13.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/8f7b78c4faca36cdedcbf8f9f35175092571ac1782cfe22e2f35c72f20d2737d573acf2c964c97a809d646550262567f8579f61b247b5d4eb041c02342795b51 -libLLVM.v13.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/md5/b7e2234f55b932a11f8d1d79e045fa90 -libLLVM.v13.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/f513840d7abbf85dd1f2506d7d51c0d203bddda152750fde88fa2328d7a1b9efa872f11bdd828b4a04f14d630a3f009d7230cb7b9ada49e6a16682049a893233 -libLLVM.v13.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/2b9aa510d139a231e10eb6c5620c35d1 -libLLVM.v13.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/37a0230ea751d198a2996832ff9bbf751e7d1906648de982f796393cc25a8ffbda081484075ab8d7c16e9ce26dd9325f3f448f16108a3c4968b15c0a80366b70 -libLLVM.v13.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/d2e7262c367908e43e25579a7f0893a7 -libLLVM.v13.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/8f3f24e7e653bec2d5269d4875deadad4592e1c76ed491b17c528f853a2d233d7bdb2d3182a2aea9a2d1aa24c02d967c17a38b160b97f2ffd3d46eaae7a749e0 -libLLVM.v13.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/md5/9c1d38c2c54fae44143caa2dba78bb64 -libLLVM.v13.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/0e50dae8e3bd4372b16fd96418241c99e46278f8f2fb8191d1cacf136cd0d429bd74a6472ad0edaab6a17bb03ee576e11778d3569ad4b20184ebf82b6359de62 -libLLVM.v13.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/md5/cc58770ca889bd4c4a68236ee7aca8ce -libLLVM.v13.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/c1211ea7e8317b96dff0276c69301029658d3c3c2d88f69b56527205a72f75eac5941eca6f518a184b5ffbab6865656b9fc27a88433c88f2a701eff6de170d03 -libLLVM.v13.0.1+2.i686-linux-gnu-cxx03.tar.gz/md5/c4af3f5036fff0a110dc16b6226fce3c -libLLVM.v13.0.1+2.i686-linux-gnu-cxx03.tar.gz/sha512/e5a9e017efada516e4f902a2ad98a63a99b52052d66dea9b4c20f2a8f8f6ecebf765022d9761b89b759571364065ba712686f3b417c34e46447ff4f7119b7ed3 -libLLVM.v13.0.1+2.i686-linux-gnu-cxx11.tar.gz/md5/91f397cc9dd9594977a46da558e8d310 -libLLVM.v13.0.1+2.i686-linux-gnu-cxx11.tar.gz/sha512/32e570b4845a65c2cb5526164ceb377845d73698a542a324dce343200b4f8509df37cac805890de45bf9475cb0007dc9d7daac029e736a623ccab05133e8eb52 -libLLVM.v13.0.1+2.i686-linux-musl-cxx03.tar.gz/md5/5eb6f2aac0a48a799cee5c0b42213689 -libLLVM.v13.0.1+2.i686-linux-musl-cxx03.tar.gz/sha512/6a0e6574931c68703fe5b638799e238f0bc105683d4c7ced0d7e8c25b4eb9617770a4dbb5b9c5f65f8d8e2b63a4fcc594b386afee8ed723e937bbc49b153ad2f -libLLVM.v13.0.1+2.i686-linux-musl-cxx11.tar.gz/md5/f650178dc0dc04babd2fcabaa3ffc35a -libLLVM.v13.0.1+2.i686-linux-musl-cxx11.tar.gz/sha512/32d48203c6d4c2b2ca2a8bf3927b2dff84cf264d3607f3215456baac2109e7710d53685c8572718d74f614e867f5a911ac62466815c28c5ad0ddc8761bec8437 -libLLVM.v13.0.1+2.i686-w64-mingw32-cxx03.tar.gz/md5/edb299dfe330144360ae0348ff241682 -libLLVM.v13.0.1+2.i686-w64-mingw32-cxx03.tar.gz/sha512/613af75a89930091bd2e6938463a97aafcef7a9bac4d38618979d98dedb8e95180b065e079214e88709700dd28f6a18cd465eda9440e77cac5a232d9a733febf -libLLVM.v13.0.1+2.i686-w64-mingw32-cxx11.tar.gz/md5/32372fe46245d0e93dcbd73e48303692 -libLLVM.v13.0.1+2.i686-w64-mingw32-cxx11.tar.gz/sha512/53da82205f30e2d7e5f1053ac8f254b7cf84f33e1952c6b96e0f4562b164827818ce507ac4c36364c6b34499c08d4f7392866f4075f031e1de91b464b282ba61 -libLLVM.v13.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/md5/cd4323bbcfc6af0047d43561d395cc7a -libLLVM.v13.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/e6d6ce334515d46f9400f999de4a3af28791c362e48fd17ee7a1135d88dff87caaf86292c4ef2f05d78c6bfa8b0248bc9a50687b4c3094a1e83bf7da9d44f80d -libLLVM.v13.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/md5/ec85afc77c883a45d342e11c0a3fe5c4 -libLLVM.v13.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/fa0e44b8e5efcb770b1ed7c0fa47b03c2fef0b6c1a0c992d35119aa5860f6f1fa039296fc477e6f78c8b9a904ab78394ea962bbd34548a697c7e06891ff37b05 -libLLVM.v13.0.1+2.x86_64-apple-darwin.tar.gz/md5/d8fb6e02698b7be3383df9bf979a7b5f -libLLVM.v13.0.1+2.x86_64-apple-darwin.tar.gz/sha512/a248f58e3e692f8fe2c3a10a513dc0ec25d8e771d0433d80845eff2ecddc46a7cee54c34235603de07daa5345eab279c3ba492df336f23e408d094f0669de7ac -libLLVM.v13.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/md5/e0870d923fac327918a634b327b9761c -libLLVM.v13.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/sha512/60185760fdf65066bec0c9065f2e3553d3ffd9baf2cdf40674b966d04c3b1eadc98670ffc858c49506427999c5527d85fba335d5e82fa879e0a9bd15b1f79780 -libLLVM.v13.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/md5/53a958655d9e0f44babd05ce1e74c8a2 -libLLVM.v13.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/sha512/afd4a7f78b17cf9aad9021613bf2c1fa904835e0d8f473e9abec1d6ebd40b75d1d529fac579cc4f5dc8fff68d2bab8a141f0558dd149294e7fe30b21f4093e8d -libLLVM.v13.0.1+2.x86_64-linux-musl-cxx03.tar.gz/md5/94e731b4f67e99be5c35b1a389e80bb8 -libLLVM.v13.0.1+2.x86_64-linux-musl-cxx03.tar.gz/sha512/f46ffe8ea2b71c4a46976403bcf7fcf97c127d5e69100cc0e52d7ae21a7cf2ba88fc5988ae022c3e42f856d08b3b53a7f6c0e5feed1bed832c74b9363b8b49c9 -libLLVM.v13.0.1+2.x86_64-linux-musl-cxx11.tar.gz/md5/52076835b1d0e41353090923f56651c3 -libLLVM.v13.0.1+2.x86_64-linux-musl-cxx11.tar.gz/sha512/accac4f426f3831b846a1fd4a97344854f5d07e891f1c8d7e458108c7155dc835457225830aa43cc30784fa310729f06c50928816a095e2122280ae2f4fa9512 -libLLVM.v13.0.1+2.x86_64-unknown-freebsd.tar.gz/md5/b19dd47acb743dcf2d42e126d42bd3a8 -libLLVM.v13.0.1+2.x86_64-unknown-freebsd.tar.gz/sha512/38d846acdd788926f6f7cec7ccd2cde13dc55155cb2817ba6eab92f52b4a8583ea753ff879441241949eb3d4c06dfed2dc17703cc37ca77044cb40080520fd3d -libLLVM.v13.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/md5/7c63d16ebddd4b64f925badc70e81342 -libLLVM.v13.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/sha512/356ab0a607d034abdf36c955cd704bd6a130bb6f68cc9bf675b9cd1920034fa221103038855ef0735e0a8663965017a2e6138bb379288f31f6c6a4a5bad5ef43 -libLLVM.v13.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/md5/003ac94ddc23551ed3ecd633825b2c1b -libLLVM.v13.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/sha512/6c6d8e76c0ac4ac8a37324de60b1ed4a3965556e31f5a14138b880c4f1ad66a4d9621aacd1e35fbd312e720eeee48de1ac30ad66ad70814180cdeff550600710 -libLLVM_assert.v13.0.1+2.aarch64-apple-darwin.tar.gz/md5/6db0cfb11b96d461ead66743f0a49e29 -libLLVM_assert.v13.0.1+2.aarch64-apple-darwin.tar.gz/sha512/10fa8e2725d297d6bd29e98e0c6547e2f870c99f6db5eb31636a7d13d2894b513db0379dbd94979c1adfae5d947d873d2c7debede791c7a7a6baf9428277fda6 -libLLVM_assert.v13.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/md5/d8265030dbcc311ca51b2f7c193d4a89 -libLLVM_assert.v13.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/sha512/7d1096d83cef13590af442383f70e5e5684b7fc1425bfa61855b4a4185b4540f5a3ceb7411e71234b072318b146bf308c38da88d4df29008fdcb409da9d86d04 -libLLVM_assert.v13.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/md5/a96add0e10401d642b56257b9fce2b62 -libLLVM_assert.v13.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/sha512/b8e96c03ddbff403a2576a5429d9798207ded44322d78cda2087ede37615fce8c11cbcbe0d39923878a963a7f7b8c99d891b6531faf4f201ec8bb12684ce462b -libLLVM_assert.v13.0.1+2.aarch64-linux-musl-cxx03.tar.gz/md5/db846ddc21e550abaf84d9298f8a126e -libLLVM_assert.v13.0.1+2.aarch64-linux-musl-cxx03.tar.gz/sha512/3e81700354800d714a87fc280f07098f95638e561f97efdab6287ac78e056771cfca61372c72f010ff7c60ccf90221c2aecfdfa4dfcb068fff9eec9bbec99580 -libLLVM_assert.v13.0.1+2.aarch64-linux-musl-cxx11.tar.gz/md5/b96153a15db02d2068a42cb49c181a6d -libLLVM_assert.v13.0.1+2.aarch64-linux-musl-cxx11.tar.gz/sha512/4250e16b1efafc2466261faab9b1db6426caaea37d169ebe2c14066df0f270550825996355315bacb0d29fd65add71873cbbe05db7462f14939baa0b94348000 -libLLVM_assert.v13.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/f26da04aaaae16d09f9934b5135cc4ae -libLLVM_assert.v13.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/87d5f4b6a6e9b4930b8247a2230e68d177c9ff0c2e148cc523f0c9a585882970a30c0383f3a22730fa363d3b8eb467a00dd678908e30eea9b876f3f296ca7ee0 -libLLVM_assert.v13.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/0dc7603dc37f55f06bd685ab1e76151c -libLLVM_assert.v13.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/89ef75f0ccb845836afd530dd5976ff7ac3a68f6abec830c5baddfe0116a1e9321cd2c899c663ac5e3b816346d26f9f3831d7185d5958e1c66560a4bc972d587 -libLLVM_assert.v13.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/md5/048b75ef0762ee79902ba0601e6e6054 -libLLVM_assert.v13.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/921cb24d6035afc48a8f6f59c034850448b89f8e38bcbd1e238470a1901e1b917f0a479895a44dfd17e1ceeefb5d2b17c038a18f4051bd42ec811d1c8a8f21b4 -libLLVM_assert.v13.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/md5/4f7da2eb48a580a56e7a888a8553c7de -libLLVM_assert.v13.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/d7ced8375c4a931294f3f103b9139ca44777744926c8e259bba7d5dd199284888752fecc6dda376eaf5cd4ff4933e1982933468024cefbe1a0469f7c03c54fde -libLLVM_assert.v13.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/e0b0e376d56c0d59691b8514522abce7 -libLLVM_assert.v13.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/f48652ed9a186729b2de70d6cfe782a2778c50520dcde234e31d67bd9043aeeefb2f2f5497400d25507a44fa2a8be50f6f0a65c54ba89b34b3b341132fea3e0f -libLLVM_assert.v13.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/a8e910783f176a4e74845bcf792895b1 -libLLVM_assert.v13.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/c2bd2b2d4bb38f248ed69eee64269ad17505a3ac7ba64320aab5b10069e120dcc3d06beee8355514e6140e43fd8614d61f9d5c484195a2d0e3c25145ca391968 -libLLVM_assert.v13.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/md5/c49214e76b086459357d90f242834245 -libLLVM_assert.v13.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/4c70bfed6c12e7ea53749ebbba434870637271211ffbbeeaa3f136337cbb9c65f02fbd6d7a1fc6f441de68df3099b2c30790494b9e2dd3bc4dbc45d687c41a5b -libLLVM_assert.v13.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/md5/7dfa45c315adf488855cd501c565c99e -libLLVM_assert.v13.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/56b6743a756cffea541f64e38444d3e1788e2a59404840d3852f26f175d2564973a8faa278446819a4e63fc8b789506f8c356132dacbe5045a9b1e13f34e86bb -libLLVM_assert.v13.0.1+2.i686-linux-gnu-cxx03.tar.gz/md5/e0a91a1099a93f332d8af332f3162d33 -libLLVM_assert.v13.0.1+2.i686-linux-gnu-cxx03.tar.gz/sha512/a36c73fad0968a0702f4bc946d4bbc2d221d61e5ada21a6fef6c1ec93bfc4737995b059a8769c8f728c434459fd311506b27459419fc068e472fe2f7387d97bb -libLLVM_assert.v13.0.1+2.i686-linux-gnu-cxx11.tar.gz/md5/bf896902f6ec4fb758ae57e0eb76f163 -libLLVM_assert.v13.0.1+2.i686-linux-gnu-cxx11.tar.gz/sha512/d653cc299ba864ee247648c3cdf67b9946c14b9a557e2c57b71c356d25d5b2ec8de93d406dbd783bcf19f245e08152bc54bca84eac26f51be100bf09bbec8776 -libLLVM_assert.v13.0.1+2.i686-linux-musl-cxx03.tar.gz/md5/74b85af091b0adad05393c0e791321d3 -libLLVM_assert.v13.0.1+2.i686-linux-musl-cxx03.tar.gz/sha512/c48f8c181e3c8a36fab4ce2075f1ecdaaca5c6e73c09cca49f7d7bf7f60752478020eb9de1fc74c0a4746200ff59ad4828558023ec43047e9719b705e153de30 -libLLVM_assert.v13.0.1+2.i686-linux-musl-cxx11.tar.gz/md5/77425352387848e8ac76018e0d74edb4 -libLLVM_assert.v13.0.1+2.i686-linux-musl-cxx11.tar.gz/sha512/1cea3a6fe8c49b732677d7e313691cda2165a0a6d4dca44f01c8d7ab048329433e77758ba5291e580791f8b3b84ed8125575a4fec37bf5b6cff817b87f8528f4 -libLLVM_assert.v13.0.1+2.i686-w64-mingw32-cxx03.tar.gz/md5/9d388d44c619d2cb0a9824778f1bd164 -libLLVM_assert.v13.0.1+2.i686-w64-mingw32-cxx03.tar.gz/sha512/a8629e54c166b4748a891592d9f2b8e015d008570f49eca09c70489c1e0b50a19556e60f34717f868b9767f2a10578e48010c0686c50f0771cfbd06e3446e219 -libLLVM_assert.v13.0.1+2.i686-w64-mingw32-cxx11.tar.gz/md5/f7f59e413e7dc94135920df1b234eab5 -libLLVM_assert.v13.0.1+2.i686-w64-mingw32-cxx11.tar.gz/sha512/85c1d61c0546c1c679e0b2edf56230c63aa60a4ef31df73e6e797ac873dc8d4b0eaa084e1610435903e5e279186c54e679da7b635750e9ecd61695170fe4d5d3 -libLLVM_assert.v13.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/md5/9e22f7f6b2a22b1926a0f68a84f20b00 -libLLVM_assert.v13.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/49ac6e7fe4dd9e61b848ba953082a6149945ad3c733b7d42a89a0b7cc05d0af4a37610cd6dc729c10540d9a7134abf6e5a65d69d072df7056ca17fc48251d951 -libLLVM_assert.v13.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/md5/f80e5e501f879e214feeed6cc971a5e9 -libLLVM_assert.v13.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/e75e26dfb6fd42ce1305acd65701468eee6da7721dfa37c959f2aab0921eaf95fa0d94b1f4c97c59df5858539c7b1cc2949a732be98d36b44845beecc7c1bf0c -libLLVM_assert.v13.0.1+2.x86_64-apple-darwin.tar.gz/md5/a53b7fcbd8149fd5211b7c887711607b -libLLVM_assert.v13.0.1+2.x86_64-apple-darwin.tar.gz/sha512/1b0ad43d312420c5da5cd6bc88138f0e38b65f9e5d36d1dbeb7d4aeac7e472e66b326261c4065565e4dbb81d720f8d6370178bd97ce85ef8502abb462ec2fb57 -libLLVM_assert.v13.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/md5/c1c290bcb3b5fc2268a29ceed211245f -libLLVM_assert.v13.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/sha512/1ac3c8b5ea9e1232c8820481364be61184e9fa8c9da7fc66707c965b283f56b8e1a590b40aaad518f152a3bb14903967392d0c77673c324664292263815a1ba2 -libLLVM_assert.v13.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/md5/9bcb827c673cb07f316a752707c3144e -libLLVM_assert.v13.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/sha512/cb4559d5b6f68c4754ee4aa1238f9c2e5f91131d2e93f34ef0037512886ef4ca9795243f4556838511024c3c7c9f511c07e64cd773bb98f9e7b653c76f194e57 -libLLVM_assert.v13.0.1+2.x86_64-linux-musl-cxx03.tar.gz/md5/6b400208db2fc0cce2871ec881d3ec2c -libLLVM_assert.v13.0.1+2.x86_64-linux-musl-cxx03.tar.gz/sha512/2e7405516e973610d090d6966a25293bc252c883e5886fcff59de60d2d1324db9507ba27ebcdcc4565f7f2d6066149b4190513cf26d634fc4260c02b6bf1fb9f -libLLVM_assert.v13.0.1+2.x86_64-linux-musl-cxx11.tar.gz/md5/e1f9fe84eab47bb2670a1ac4424a71df -libLLVM_assert.v13.0.1+2.x86_64-linux-musl-cxx11.tar.gz/sha512/80487d4e1cd60cf117e735e78631b3c2095cb4bc98f193077f499d22db9000715738ff1b929dd4bce4f1bbbfa6fb417bd704a034cf0d8996e6a8872eb4a3d84b -libLLVM_assert.v13.0.1+2.x86_64-unknown-freebsd.tar.gz/md5/3c1d3bce109eb88d8a1a20ae655a384b -libLLVM_assert.v13.0.1+2.x86_64-unknown-freebsd.tar.gz/sha512/f1ca50d1f135d7b82da71145ad6d4c11d781044c74f705c362885d2becfb17f585ff7e167dd279f4898d92496ded9af9082afc1a5e3b7c271f262647383edf08 -libLLVM_assert.v13.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/md5/83399cb1b8201cc5991c895e54fdbc2c -libLLVM_assert.v13.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/sha512/449ba8cf0d3ace07f426c27dafdb24f1dfa9b56fdd4bc31d118aef6dba357fb5788a3bc7a62d860f41287a4bdee82851c1da7d6a6817104af5225bd3c6ec4e2b -libLLVM_assert.v13.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/md5/3493be4fc51854d5c3a6e848a99be415 -libLLVM_assert.v13.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/sha512/262c0f26b542ae9e97846f83257084a1344fad4ad81ce8ef1f20b6ea2741a737674dc018b3b8e1493685ff10eecb35f137cf82c4603e0d28f32f62101621201e -llvm-julia-13.0.1-2.tar.gz/md5/ecf89f679a0114cdd52eea79dd3c28ae -llvm-julia-13.0.1-2.tar.gz/sha512/3e93cbb4878d2e0890d6c91a6101ab76d89d8d11110a95731fc041d5300ecee5b03e8f8c26bddb58cbf177799c4656c7d54e23ed6d90fc402a5941e39c4ae508 +LLVM_assert.v13.0.1+3.aarch64-apple-darwin.tar.gz/md5/4238209fd5dbd7bd9a91f0f262bbdc5c +LLVM_assert.v13.0.1+3.aarch64-apple-darwin.tar.gz/sha512/c8b9d57af32c5cf93577f3a5e24a4bb1e656f5741c9927992c9195ab9ad41a983afb405aefe70a6644e1f4663b09b685766a69ef5398d2c5da15d6ab9d18277e +LLVM_assert.v13.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/md5/40cf170d280bc9c09266fe1f73a39b26 +LLVM_assert.v13.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/sha512/576c2fe5f7d8f4c898247d4813538956b05a5f8d31d173b7a685057d515dddf2365c94eb7d2b168fd2fa0d032ac15773e5141069885161cb8b5bda3a4d4c7281 +LLVM_assert.v13.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/md5/3d65040e45fb4867589d3daaa1a030da +LLVM_assert.v13.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/sha512/c058a322cdc2bd7ad4977acd00dff8091b470736a1599ecfecef5d3e508ff4657fb1bb02e95da1b89fefb7603c8b2c1a7b8c541c09e115fd472690f75f428f57 +LLVM_assert.v13.0.1+3.aarch64-linux-musl-cxx03.tar.gz/md5/2b1300da2d1bd07698d3bd75941b6977 +LLVM_assert.v13.0.1+3.aarch64-linux-musl-cxx03.tar.gz/sha512/3622aa0327f9e28ab792151eb7b0a8edf6a98fe2107e7ed43322b07bba9fa584e58305e3c8516c4555cdf6808f86b03ea0baf6297b87cdba3c93b546959bba42 +LLVM_assert.v13.0.1+3.aarch64-linux-musl-cxx11.tar.gz/md5/a49324adc6b6b1d30e63473a1a473463 +LLVM_assert.v13.0.1+3.aarch64-linux-musl-cxx11.tar.gz/sha512/f541ebc736b576bddc1b95509c71b2d8f162378ef8686ef68a2cdcad89f3e05bf1988bd49486dbd0607138a4cf51d240b53ef5fc962eee96152ad8fe7f4fd08c +LLVM_assert.v13.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/b96c309b0f3ab2999648efc7c96eb713 +LLVM_assert.v13.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/0927a9f6483d676414cf7e6a32eea08f90678ea1df35ce32c3527d265adb062b7a8a8ca590bf7a3421062ffca123b9bea16e491d64e1e344321af704d05592fd +LLVM_assert.v13.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/be710a0305351ea35d6d17380a79bde9 +LLVM_assert.v13.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/60537a9b6fc1d6d2747b3782eecc9b551385e2f6bb09feaeaed7e1a9461ed11b291b162239624f078823fbb584986b426aee4a688c441122afdf4ba614bcf9e4 +LLVM_assert.v13.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/md5/e2c6a84424d8e29cf6eae7e6633f88d7 +LLVM_assert.v13.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/f62ef18cbca2551d60eb292b86c4d7cc0cb2d990c84237c4c1127a1b12fe0158d68991a01173dfd136c241ad95529edb7174cc85463d97b343579273f69f12ea +LLVM_assert.v13.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/md5/fecab7a2d89d15921c129ca9cfa58745 +LLVM_assert.v13.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/98de746870af5d4d746e71ac69e93c224fffbfda4ec422ebdbffbda72148c9144993003238cfe9d657b7eefb81f3c682abbe255a9d43a171f167144ed86d23c2 +LLVM_assert.v13.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/6049c4b4782c2da8a2b237fedcc9d5e2 +LLVM_assert.v13.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/e3f0b21374b71325a25aadcd79a07a29f56fb839b3c4520e3c5df204a393f24ae1224d81a8658b3fdacc5a3242ba382a2a7da949d31ca7f1ebfac1ade0d942e3 +LLVM_assert.v13.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/f14bc3e481eb90e421d229a8ab00e8cf +LLVM_assert.v13.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/305ef648d8178e7de11943f4bfc209b49ca833b0638512d31b7fb8e485ff53ed2c57aacc6dd9bddedd81a99ce4a0340fb723877f8f93c340ae88139ce53e6a1a +LLVM_assert.v13.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/md5/8002ce77e74582e6936581a29167551c +LLVM_assert.v13.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/8bd604d952b7b14b590b21005156f7084f40ed302b249410c46ae83a9accff5f7627ff0a91f83d2ccc91c13eae59b5f01e0aab2418429498a5ef5348d09dfd8b +LLVM_assert.v13.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/md5/61a1e29875fb4c61d9fbe4b88acd3522 +LLVM_assert.v13.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/8fb0747b10b90a14470d5fdc2c13472df9d42ec976af75a5a538771f34238da090280f62feb6789cb49ff9b2cb296b178f20cfbf0d4a2a3272e20b92d2fdaf97 +LLVM_assert.v13.0.1+3.i686-linux-gnu-cxx03.tar.gz/md5/9833f50be2a26c0f677b3ba9ba3826d7 +LLVM_assert.v13.0.1+3.i686-linux-gnu-cxx03.tar.gz/sha512/3d747f05fbe4b9a2f2cb63f0efd25c0e31ad6b08985553299545b6723fa30595db813b370036af9dab008710fc68679f53d653eeb4b3c6b34cf44500ca0fb604 +LLVM_assert.v13.0.1+3.i686-linux-gnu-cxx11.tar.gz/md5/13e3e5a25ce57ad37a9311ac7d7e0708 +LLVM_assert.v13.0.1+3.i686-linux-gnu-cxx11.tar.gz/sha512/26abdd0c6030f61014d5b1caabae6be21240c2f298a6081c56e2cbb6c63ec8d56e753fa1a1b9a9f92efecf5199060f6cea5ea562c21f218a85b8ff032c68b5c6 +LLVM_assert.v13.0.1+3.i686-linux-musl-cxx03.tar.gz/md5/fa987d61bc041186b2706b3b1b8c9e3d +LLVM_assert.v13.0.1+3.i686-linux-musl-cxx03.tar.gz/sha512/0c1ca9f55664d1dc1bbc0ebcd826182e6aa590d3447133088430d2cc3901abfde4ec385a2d2134d05f833ba1ca813eba54b9f6b9fefce4463e3cda32c02eedc9 +LLVM_assert.v13.0.1+3.i686-linux-musl-cxx11.tar.gz/md5/a0b074d6b68cd1eb6385604bcf5d8755 +LLVM_assert.v13.0.1+3.i686-linux-musl-cxx11.tar.gz/sha512/207ed3118853b44dc86f2bac218156410e85d341c1ef2bdef0a244ea249e9186c96e90a85ec4a0c884fc5bae9884fccfc5525ecb829da955177197e2438a0469 +LLVM_assert.v13.0.1+3.i686-w64-mingw32-cxx03.tar.gz/md5/055dcf4e056240a00d98f8aceb9e93a3 +LLVM_assert.v13.0.1+3.i686-w64-mingw32-cxx03.tar.gz/sha512/785e8f8610f72560c533c1ebfafbd9dded6206e493ef64c0a8b02227cc9d46df98d5938f16e11eb4eb3d91616c4feee9865283d5671220dd1cac7880e48ad0f8 +LLVM_assert.v13.0.1+3.i686-w64-mingw32-cxx11.tar.gz/md5/b8acf21ae21e88fd946522298980ec96 +LLVM_assert.v13.0.1+3.i686-w64-mingw32-cxx11.tar.gz/sha512/cf26f621f4d48bf911af8cb0dda9648e7455755c55b8bd207f58e759d9eb6e710fe81bd4ed8732e6785168c0a68269761c3d3f573909a5ab33923301399b0a91 +LLVM_assert.v13.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/md5/db3be34417bd11f054b2a62d8bd10498 +LLVM_assert.v13.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/98116ec343d17ae723e071c4214fa2443723a3a2ef232ed89875981536a79834647f9c11b4a5bc22ddfa000a1f88a0f01f6407f6c100b38ba051ee2c13a5e788 +LLVM_assert.v13.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/md5/d5f2c6adefc09660f86d9e235614eb0c +LLVM_assert.v13.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/5ca0c6a5a909139f30ce136ea9f325cc15c0eb13abfc2b8dd30b74f05fb9a1e49b519bddf010f0b70345cfee32100d83317bdf27e87fe7d5b1b047aaf465de5b +LLVM_assert.v13.0.1+3.x86_64-apple-darwin.tar.gz/md5/04c5a264ae50d2558f42687f868abf21 +LLVM_assert.v13.0.1+3.x86_64-apple-darwin.tar.gz/sha512/3e97f7a3207ecbb8c4eb9189df263719ff5068aa7b087d4bf52e2227aa9aa7fc9a16d8c3cf8ecb918211e4783256be57e31832d57d6ebc78fecd89c34b89bf5b +LLVM_assert.v13.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/md5/6667ed5bd1226f889470fcc14f431583 +LLVM_assert.v13.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/sha512/fea2f4a9c6f2df097763d9885a68b3aac91bc500c1b69f5216b194516e026343cf4d3cf842b963f1c0dba80a7d61482f0a8f3f627f5a109c6677450a2b854a2d +LLVM_assert.v13.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/md5/299ee88f23697006b882afb06c672b36 +LLVM_assert.v13.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/sha512/7dd5f83d7bc5047710b378ba5441faf3c539574970f23502b537ad5746db5feb7785aadc0143a8b778fd01638ff8d4e2123c5e2d11c60375e209751e4b086c1b +LLVM_assert.v13.0.1+3.x86_64-linux-musl-cxx03.tar.gz/md5/c46054b995ab150f18f47d6040a5fddb +LLVM_assert.v13.0.1+3.x86_64-linux-musl-cxx03.tar.gz/sha512/bbbfeb43f90240a1b531e3aaa557aa1bf714d0bafa873dde6ffe3a44f4d94ad9cec66c61bc310ebf218f5a4ac24fbf02b0dd380f7100e4e2fd3911bca7964036 +LLVM_assert.v13.0.1+3.x86_64-linux-musl-cxx11.tar.gz/md5/335213de9ea1ad6d3783158e226c8674 +LLVM_assert.v13.0.1+3.x86_64-linux-musl-cxx11.tar.gz/sha512/2a60efc697cb42531f2fe559518f73a5ffb9278de1cd6cd0fd502c1f1ffa8bc1ed4efac1ac0a2c5dedd972fbd6f409008c65383733d2d69aebddaed2b4af6743 +LLVM_assert.v13.0.1+3.x86_64-unknown-freebsd.tar.gz/md5/3ecbf33f06795a0b9fc010d284f3ee67 +LLVM_assert.v13.0.1+3.x86_64-unknown-freebsd.tar.gz/sha512/9a0d4c20f40caa39fc31e2d6ea363a403938558cbbe88845f444e516da7d56151cfdce88c7d4ff765b07a42361b5092a3a631b38148a3983c6e34383310e5f1d +LLVM_assert.v13.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/md5/7aa7e19bf2e89718047b91efb8556c8c +LLVM_assert.v13.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/sha512/86f05d14c1fb8ff1f689972cf3f52e1d46209a2e57e86d3cd1b2db74e5791f4afd008203b55a1c6a76fa67822ba7a71ac62b4e15a9598f923075224df26a2699 +LLVM_assert.v13.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/md5/b1a88cf4caa01a556436e36dec8ea7d6 +LLVM_assert.v13.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/sha512/5f711f489d95e705a8873769baad99fad3a5b3572fbdca754d1b96add6f2d1274172ef6a0509833fa825489f514214f1b6bc03d5961c7b3e102dd5d26e3299d5 +libLLVM.v13.0.1+3.aarch64-apple-darwin.tar.gz/md5/9f639b46576af60e2fb6683331b820ea +libLLVM.v13.0.1+3.aarch64-apple-darwin.tar.gz/sha512/9f250d1bfd33f6d6bbdeaa6d45db94fa54ce1ee82e81dad620911fa78773336aa5ed2d0f48a517a7503a4dca59ca5118971b96b762bfc0642740e9154bf1a37f +libLLVM.v13.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/md5/02bcb07db1bdf5debc88ab3c4cba6ec4 +libLLVM.v13.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/sha512/43f0abe520a731c08cbbb2d74969d72f4254db2d4fe680ed5846106e359adda95f3df63336aad2cccf74ed004a45bca0e27593472ecf3f70f003bcd7d11565b7 +libLLVM.v13.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/md5/b848f6304e5c33e5e8dda66a11f77549 +libLLVM.v13.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/sha512/9bb1811a05506a88ee6a25f883999546d0079eb7e7b7c725ee6adb74302ec56f53339936e72ee20f927e030f5e41225254c1cc11ec8d68dd896cd728a4fe60f0 +libLLVM.v13.0.1+3.aarch64-linux-musl-cxx03.tar.gz/md5/43a12603d01c66837917fb2e5cf560e6 +libLLVM.v13.0.1+3.aarch64-linux-musl-cxx03.tar.gz/sha512/e64e5daa31b6ab85c39a33f4045cbe9af39b423bb85e18a33954d378cdd1b66ecb778b63c1b6d8fd552c1c25685729b5cd9d0d583eeb084885df260266c1ce85 +libLLVM.v13.0.1+3.aarch64-linux-musl-cxx11.tar.gz/md5/f29fcd99763d1ca14fc85664f7ff16d4 +libLLVM.v13.0.1+3.aarch64-linux-musl-cxx11.tar.gz/sha512/69b8ae0381d4487049b0ef8f76b885e5a7a2cc575df2764408bf1c51b63bb0340936cb7acc2c8edd105d39b63193c5b3cea0a507f75f369f7a8668633808d8b7 +libLLVM.v13.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/48c227d2b2a708296360cefd686786e0 +libLLVM.v13.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/13d262fb15ed23b9d9a77635584eaeb94461db940eaee59bc573b5ccb11e010ced4cc5ab1e055c0100fece8cd606af6c9416c8b5149eac664424b71d797af899 +libLLVM.v13.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/17214d9b9abbc83339dfc24f41afbd8c +libLLVM.v13.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/a31687bc40830064779e892b13c1751a6dd43810a0ba5cfebad0bf13372d2f095ce772fa3513dfa9c777f383051741fb4987e966de1f714ef5573b2e12ef06d9 +libLLVM.v13.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/md5/2a8a83a00fe8124f4757e272df63b6cf +libLLVM.v13.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/f6d8a0493b13761f7663960355da47263507b98f898438042bb0e59e05ff669d77c6664f0d54bb44c5f7a95b29e3b405ba8db561fcd3b9410eef2fb54a7bc5e3 +libLLVM.v13.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/md5/e5c66ed86daab1d4dbc35c7888c3ff00 +libLLVM.v13.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/93426e669de1b330429f8ef79aed80f09183c2e31b334fb9b8795c6b140621432f56aadadd24615a3f0352cacbb3cf2bb49a3ca8d839facafa9ec7f29e938055 +libLLVM.v13.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/3c582361a2381cd8f54990e923738194 +libLLVM.v13.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/9941c99dd681542a1d1be91eb3517fcd46f89383993c9560bab438e29e8c7ab59f7b242f70df2c8fbba953a90548ec2322f2870cb33d127fad6f19280ea36419 +libLLVM.v13.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/fa6d470b8eeea99ac27f8a793f1ef836 +libLLVM.v13.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/08eab24eb95d4b2e340dfbbaacd1fe3ec8effcac744b3375e9398606dfa86ff56c0ad7704c3db74a96bbdf58ad109e30eb10782c9dca2cb87a55472e764c73c4 +libLLVM.v13.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/md5/8744333ae16500b8f8cf7df1b648a876 +libLLVM.v13.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/b01afeca35eae9deb19fb54dfc440d3e27dbc2b95d293d1c6617de91a2002d4018a20f9bfbb3691e84284ca3cb65eab308f90e175d6b0dd828cd33ca0a4e783b +libLLVM.v13.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/md5/3489e6a1f8d6f1450391d1e29f0ec2be +libLLVM.v13.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/997b9b0ccd3dd45c09221a2f9b19ba20bf55fec1c99073f95a29cbae565844608cc4e0bad5dc31ed11a024562a2ed5d05815cf566f9d184296563049979937d2 +libLLVM.v13.0.1+3.i686-linux-gnu-cxx03.tar.gz/md5/aed4f76e23909b9c754fc76bb8c198f9 +libLLVM.v13.0.1+3.i686-linux-gnu-cxx03.tar.gz/sha512/1e69161199eed23b252bf4ae3e7ca896f3a9f8d66d7c5310e39acc42a8d19bb60530378f9f75ab23c5894c9525ac2092a28ae016bc9618eafd19f39160eedb2e +libLLVM.v13.0.1+3.i686-linux-gnu-cxx11.tar.gz/md5/de7651793e730ebc2716483fc76313c1 +libLLVM.v13.0.1+3.i686-linux-gnu-cxx11.tar.gz/sha512/392d7008e1119aa8acc65815a883086d810674634053c258382bba573054defbecbb717ab938b5942847c6e8cd2c6121f11c2afcaa494e105fd9def77e052261 +libLLVM.v13.0.1+3.i686-linux-musl-cxx03.tar.gz/md5/dd67afbbffff403aad38c8fd502003bf +libLLVM.v13.0.1+3.i686-linux-musl-cxx03.tar.gz/sha512/a2f4bd0e4aec8775edfdb2e47932762714f4adcaf5c84f3da2924fcfce5801562ab478656b6480c446ddc29fbdb0929e70a93e2a3fa8500c0b16ea6ddf456024 +libLLVM.v13.0.1+3.i686-linux-musl-cxx11.tar.gz/md5/9e7abad42d1ac954d8da668369ec33fb +libLLVM.v13.0.1+3.i686-linux-musl-cxx11.tar.gz/sha512/142363729bfe4ff0abb9641f06fa69a2d6b728ca3898c2561999bd26764f6f8be8b47455d6dab4d0d8d75e4b3f68e014cdafb3b80d000c0450ca0a532ba05ecf +libLLVM.v13.0.1+3.i686-w64-mingw32-cxx03.tar.gz/md5/7b1de9a77dbfeb0edad627c3c6885ca0 +libLLVM.v13.0.1+3.i686-w64-mingw32-cxx03.tar.gz/sha512/b7de578b419a605e049b9d81a84276aadb56538415fa064b6abd2a184ebdc3f858d6eae3f22d14568f9601d22c2257a129347e0328bde2adc7d9f77cad708a4a +libLLVM.v13.0.1+3.i686-w64-mingw32-cxx11.tar.gz/md5/725838263b3b938ac4cc269f54ef950c +libLLVM.v13.0.1+3.i686-w64-mingw32-cxx11.tar.gz/sha512/6ff1f3940b921297b01afe4eb03020f682466141f6d4b633f4ec8dbfa051a8e68bbd53cc3e73d4cbde7a446fd19edd3ca93607d09db705105a95dd5a5ba2b51e +libLLVM.v13.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/md5/3a8923c00e5dc38e9fd34f2540e10a6e +libLLVM.v13.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/5e6bfa4cd850eaaa22a450a716917f0e918b0cfa15894236b0ff07ba48f0fa67c874805ff3e604e2d77076a4259c52e646341ca5c966b16505266c6eb009feca +libLLVM.v13.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/md5/1cd1bd7a9b5fc1acfc3ea5333bbac3c1 +libLLVM.v13.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/b0b1928a4ef0a22ec3d22ada322dadc75ea608b7544de851c98e488b75ee12fbd477d3cab1d565a5694f55123388a519d7d3a938a5a77ee51925f9d1ad84c806 +libLLVM.v13.0.1+3.x86_64-apple-darwin.tar.gz/md5/bd660aa548a155aad9aa5c4588fabe29 +libLLVM.v13.0.1+3.x86_64-apple-darwin.tar.gz/sha512/5408cd0752d2c9e7f3bc1845e4ffd6a429ad4b3695f4a8955fbf35d2d899349aa16ea639f048f9e0facfbc92639e2e7946c9b3cd1a0a68b4b5000358a57b4c7e +libLLVM.v13.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/md5/2e49b05ced2cbbf78e1445a96fd45fdc +libLLVM.v13.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/sha512/15392a7a02e234f4a39a6eace44bff2d660bc18c3c05e6d9ece0400bc5adad238a92df9c34ffa6bfdaf9643c199c5c896ff81b61f26962d19d2b4ddb5a83280f +libLLVM.v13.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/md5/8772e63621d3c706765889299e5d314e +libLLVM.v13.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/sha512/3f7f632f1a8ec007302de945a4320d27f4cb1803db3338b1cbcdd57091807d9182700df854c4e4b71ece2c4190ede55a559fdaa721d6cd0f167d801b3344ad16 +libLLVM.v13.0.1+3.x86_64-linux-musl-cxx03.tar.gz/md5/86213783a3fb8a6129b7f239d4b2e99e +libLLVM.v13.0.1+3.x86_64-linux-musl-cxx03.tar.gz/sha512/2942497a3f212e57c31e7a98fd13418f027480c85894a0a960eac2f1a6aa78dd0c08b792f45e44b8721c2c0b35290c1db569f3517c9f9de3797e04e446b10e41 +libLLVM.v13.0.1+3.x86_64-linux-musl-cxx11.tar.gz/md5/db4b5aa3cd4c596d60143e1cf348b8a5 +libLLVM.v13.0.1+3.x86_64-linux-musl-cxx11.tar.gz/sha512/c5942e29bb3be051ffcefe94539e59942cdd3e629b94914210d8bcd2c8d16bbe377cd323b9fc1c534251bd79b61c879e27358d2a61fd28e09829967b6c7cfc98 +libLLVM.v13.0.1+3.x86_64-unknown-freebsd.tar.gz/md5/a0f4dc0423ad627e659ed1765c9c5471 +libLLVM.v13.0.1+3.x86_64-unknown-freebsd.tar.gz/sha512/0dd5ff7f1262099e9d07e588545d239abc8d145a357f259aa527836e88ad65265db6231ad91e9edb17edbe823c4581f0f17588f78f1262c5823d153975049786 +libLLVM.v13.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/md5/a8c706306da173757582068b2a17d408 +libLLVM.v13.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/sha512/ba9322c578512c43513b0bb168bcfa5c2ada4c8f15a12b540c26cf73e290aa9e4024f58ed5ee64bd02d0ffa61bf9a1311066c5208facbb83e5364923d03ced50 +libLLVM.v13.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/md5/a808061161c37d447e78265b1f6c6b02 +libLLVM.v13.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/sha512/069669ca2d63d92c8ef13c87b2e19b9b2f9d380f44b7111093798610b87f5c7c4778567792a120f40861d31538aa69d606f8cd778e3125f1087b8bbe35d9eafa +libLLVM_assert.v13.0.1+3.aarch64-apple-darwin.tar.gz/md5/cecdcc4a66d77e38cfb25332b9c2998c +libLLVM_assert.v13.0.1+3.aarch64-apple-darwin.tar.gz/sha512/e99fa7ab6e099b9b8e370963d0fb887f2f6907697038fc58b9730062b49761366161e6fdff2a77c507729c141fa694230d0bf072368ca9e02539de324dce6d62 +libLLVM_assert.v13.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/md5/5456909e24b043cb90323f6ac4186f7e +libLLVM_assert.v13.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/sha512/752055aa561ea42bdd78dd59745e7f32c68e46349e01abeca252e2306dca0109656a37ccf7577daad11ab082ba919a10616573d1235a5078090264b0364094ed +libLLVM_assert.v13.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/md5/06dfa17a470fd0808b77b35abdcfe5f5 +libLLVM_assert.v13.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/sha512/f8cd8e0629aa46c4b659cf717a95614a82baf9a78bf8b24b9c212c2f9c0828b3b42b095cf276b9f7e6ff191728f1958fd1a671655556a52007bb10faf96a6a08 +libLLVM_assert.v13.0.1+3.aarch64-linux-musl-cxx03.tar.gz/md5/27bb7687ec6096066d629ff572afd643 +libLLVM_assert.v13.0.1+3.aarch64-linux-musl-cxx03.tar.gz/sha512/30d4e2af85b30b86628051e791045b1bd0fa9771b0afd323b8f7d6ef886889b629944cdcf3d747f4d3d24944b8d8138b893e7b1c6595778e04d211cd900ba53a +libLLVM_assert.v13.0.1+3.aarch64-linux-musl-cxx11.tar.gz/md5/c64fb515e68de2f4537213c72c7eeee1 +libLLVM_assert.v13.0.1+3.aarch64-linux-musl-cxx11.tar.gz/sha512/6835b61ef3e3e4f0e59477d7475d369f4305921cca16a78580c9d2ffa729c18b4d28fc91b70a4f52af30cb7f5e463bfd96925cedae207605974862736df83d35 +libLLVM_assert.v13.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/7575d53041ca19ab5d6c382762bfdb09 +libLLVM_assert.v13.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/b8fa3145fe500da65129c06c697cc89ab3726d7493014f6d59972811de39413b286e1ccd88ef10aa6cdbc32f933a103e2609817443d03a1ac297d094ac214dde +libLLVM_assert.v13.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/77aaa82a76c58d598074532b25ff5650 +libLLVM_assert.v13.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/0d3eb16f966510eb8e1b604a08eee0feddbcafc23ebc11a3f7eb84ea8035fe28d352d6971b49cc4ec463ba6c606134aa42252fa87132aa3bbafc90630b07ede3 +libLLVM_assert.v13.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/md5/04ea3be9581f51f78a9627fa15776e9c +libLLVM_assert.v13.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/72bf6bedb01d9be4dfdcd68ac699a46ec0dc1f96f15da380fd87a3f9a2c998937499f435a969210a6551dfdcc6f62b4c27ceb06533890f2e6919a2bf8a5d0b12 +libLLVM_assert.v13.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/md5/98c3e6dd8f8d11c3ab4654944ee1e897 +libLLVM_assert.v13.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/e81335b0a27393fdfe31512f3f034975a4907019818cd9033a136b1f5893be12a36a87367b1a7643823edbf15564173dd106ae6a1f9328ffe632c599182c19cb +libLLVM_assert.v13.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/2673ec467214d14d3e2029db5c236746 +libLLVM_assert.v13.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/556f0aecff72c84ca269d9ac5261002eed323c27b3bfc0c1c971bcf126474f42b2d1350fc0abb611bec24dbab99ce0662359d5431dd1970c4a57a9f186e25714 +libLLVM_assert.v13.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/b809891f64ed17a66f98996f69d67ba7 +libLLVM_assert.v13.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/39da829ac04fa74de6c707b2be6de831dd488c6cb2dd2a736c6422ae2ddd9183f5ba33eac01937231febde18f44fcb1ea59be88a6a95c08d6dcee451f8bb4d8a +libLLVM_assert.v13.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/md5/925cc3c7796bff0b9c96694295a6b88d +libLLVM_assert.v13.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/c29dc5b2c548d1f3098be5ccddde5c1cdd5c89a496891d2f55e4f164658f65b149f44fd7bdad056f52aa6564e85539305ce869a509e2ada576555b26168d609e +libLLVM_assert.v13.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/md5/3057d2c9a2d21a82c3b9dbabdd865910 +libLLVM_assert.v13.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/32395ec4fe275851b5bff84c7f3dbd306ca49f782dd85947b018a2227dd37c9b18da6557b9f2d797dc1347b7b102a130dc44b879a2e19d82635f454871868869 +libLLVM_assert.v13.0.1+3.i686-linux-gnu-cxx03.tar.gz/md5/a64e80ed42db9a8307879dddcff01b3f +libLLVM_assert.v13.0.1+3.i686-linux-gnu-cxx03.tar.gz/sha512/bfca007bc6701692b5f7725d47f1d4fc2cad6185e433b6b485ca0226352a57a023f3d1310ec649c236f9cea6468ce267d00c05fb7a4b2f5172a47f1872fd8e25 +libLLVM_assert.v13.0.1+3.i686-linux-gnu-cxx11.tar.gz/md5/5263d390f40980415d3b418642f1637e +libLLVM_assert.v13.0.1+3.i686-linux-gnu-cxx11.tar.gz/sha512/698863bc1e93eb7c9870b304ac80bc79d754422d6f22bfc32885439f84607131d1898778cd1b6e91a19a77b1e158c31ad01297389bed38cf11d2f2e41599e158 +libLLVM_assert.v13.0.1+3.i686-linux-musl-cxx03.tar.gz/md5/d406c113c172b6cfdf39b1593c2548fb +libLLVM_assert.v13.0.1+3.i686-linux-musl-cxx03.tar.gz/sha512/9f2a14fb40b106f12146768aaf6f9f3bea2f7500a6f004aaf98bac93e9e1d5997890872ec88c18e77512e7fc0e78e834268d3bc078cd9fd69381fd5fda1e900b +libLLVM_assert.v13.0.1+3.i686-linux-musl-cxx11.tar.gz/md5/fbbccbf6c1d18a3a312cada88b65cbb7 +libLLVM_assert.v13.0.1+3.i686-linux-musl-cxx11.tar.gz/sha512/40a16568616b85fc2e180dcea5c52ec3a501148ea58312a9b200c43f6113973eee7221cc8c5221dd00aadc3816eb82e15bd18de51e73fe3b727fe52801cc4b56 +libLLVM_assert.v13.0.1+3.i686-w64-mingw32-cxx03.tar.gz/md5/7a1f274ba7b0f50e877725d653c92cd0 +libLLVM_assert.v13.0.1+3.i686-w64-mingw32-cxx03.tar.gz/sha512/a016dde21bc3d41fa995b977d360014b84075e532f8c988b5e1157fc059af4f7a0c4b77694f0b486a47361485eca298a188eb5cea531126ff5330a180d514d40 +libLLVM_assert.v13.0.1+3.i686-w64-mingw32-cxx11.tar.gz/md5/693ca23c86c1d119b18f4022e8304be0 +libLLVM_assert.v13.0.1+3.i686-w64-mingw32-cxx11.tar.gz/sha512/abbce3b1ac395b3e1eff6bd522e0852efa2cb64be9b72cf3cbb31b7f00bc7dfe142c1ec1f99b163906792b2119f5b76e613dbc75cfb66eee8825180ae85089cf +libLLVM_assert.v13.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/md5/2e3441179e71840d5fbe43e844dc0e8f +libLLVM_assert.v13.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/2ef466de5f3a6bf17b1b39efed34bef99693d1edfc0a7f6a5462b9f1b01ec13d6283ce4be96d5f91489d0652f2b8c628f5aa0c4e605e7b5cd07a32cab90e98c2 +libLLVM_assert.v13.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/md5/b26dd0b96e5abba39104402c1771df2c +libLLVM_assert.v13.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/6cc05d72a75f9d4f465d0ab52f9a70738d66e065f985bd0aa5b08252f9ae5a640a27b338108add6ee5f37b9c82c65bb8dc22a26fbb384859a6afe7c6945c51ce +libLLVM_assert.v13.0.1+3.x86_64-apple-darwin.tar.gz/md5/edd575c3cfdfe7a92b07291741aa0fab +libLLVM_assert.v13.0.1+3.x86_64-apple-darwin.tar.gz/sha512/4f4f16ffe46288e8a917b41cae03fbbd7167fe4504b301b6f736016f8c50be36773a2d8ddf7517c1bf8ccf0353007a1b251a1685462874c9e3aead5f5b047322 +libLLVM_assert.v13.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/md5/51135f72aca8df13389d0cdc7d510ab3 +libLLVM_assert.v13.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/sha512/edc8bd63dcf0d397a781c899e8777a59b62889681d77cf12bbeb0425c9f70a693770e1e6e53b89f84e8bc6d48110156cc97096dc07c7e7ea922d8434060f720d +libLLVM_assert.v13.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/md5/988764309b61c77ae5b896d90933fd5b +libLLVM_assert.v13.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/sha512/2e3a38830419351b4edfacc8747ffbf2fd34abf4b029a1ccb225df7ea0afb27dd7a7404a1824a03477b536ca775ca91a88f0eb64c246c2d25d8e5d96de32fbac +libLLVM_assert.v13.0.1+3.x86_64-linux-musl-cxx03.tar.gz/md5/83411cf8609daeaaadb50dd77e76faea +libLLVM_assert.v13.0.1+3.x86_64-linux-musl-cxx03.tar.gz/sha512/0dddae0698edf5030394dbb8e386a60309443f7a1eea6bc09f7e49cdb82b0e45c8bfde4bc0cad816f2d007270c0cb65007401944dc86b467c466852e5d2c9e90 +libLLVM_assert.v13.0.1+3.x86_64-linux-musl-cxx11.tar.gz/md5/a076618da1e24ae6001fcdff431da5d8 +libLLVM_assert.v13.0.1+3.x86_64-linux-musl-cxx11.tar.gz/sha512/233b362bbedb375182a4da81de63c581d1027b829c171e176c0f1128d7982a7298d117dcafd74d98bc81da6a4df16832d53e5eb20898ad9a396cb1ae0b330307 +libLLVM_assert.v13.0.1+3.x86_64-unknown-freebsd.tar.gz/md5/9aae3e1a64a4ef948edb2798b0cfddd1 +libLLVM_assert.v13.0.1+3.x86_64-unknown-freebsd.tar.gz/sha512/0b9bfd0019cf23b4dca035aa7dc31bf683c78cc4ad503a150dfeb237c8ac9e3ff4605e8988263b2eb0aabd945a8bf38c068d043cd3c64a17cf47208a8eb799eb +libLLVM_assert.v13.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/md5/4871e44b013700baa99e9bd1dbf75e78 +libLLVM_assert.v13.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/sha512/0f9823969d5c535740616d4fe3f084125f15fac7ee3839266c2bcdeae3ee0e256e7f0e4b81a0b842f7cbc676ad178661f1f771a336cf0f03f37355a96e7f99ba +libLLVM_assert.v13.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/md5/49c7085cc5d7f65ba78ba190c006d87a +libLLVM_assert.v13.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/sha512/18fd4cfdc7c50197a9a53dbb784dcd1a4181739fb5c078d01a5c1a29b71f571c3d85bb5df2705f84ec9e9c6a56635c3934e67be4f2f9738b7a42f36723889c96 +llvm-julia-13.0.1-3.tar.gz/md5/aafdb10632eb982a9ff2a62a339a1220 +llvm-julia-13.0.1-3.tar.gz/sha512/6ce8deb400efd5ec8ca0fc0c7b72a9ad8b1d07ba0059b53db837b0721bd6122abaf13a96d00006661cb39006c40046f134bada6807657c12735b24fd500dea87 llvmunwind-12.0.1.tar.xz/md5/4ec327cee517fdb1f6a20e83748e2c7b llvmunwind-12.0.1.tar.xz/sha512/847b6ba03010a43f4fdbfdc49bf16d18fd18474d01584712e651b11191814bf7c1cf53475021d9ee447ed78413202b4ed97973d7bdd851d3e49f8d06f55a7af4 diff --git a/deps/llvm.version b/deps/llvm.version index 68b68b56a4926..e55705dc61da4 100644 --- a/deps/llvm.version +++ b/deps/llvm.version @@ -1,2 +1,2 @@ -LLVM_BRANCH=julia-13.0.1-2 -LLVM_SHA1=julia-13.0.1-2 +LLVM_BRANCH=julia-13.0.1-3 +LLVM_SHA1=julia-13.0.1-3 diff --git a/stdlib/libLLVM_jll/Project.toml b/stdlib/libLLVM_jll/Project.toml index cda68e4352d06..e934fa7aeb2fe 100644 --- a/stdlib/libLLVM_jll/Project.toml +++ b/stdlib/libLLVM_jll/Project.toml @@ -1,6 +1,6 @@ name = "libLLVM_jll" uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" -version = "13.0.1+2" +version = "13.0.1+3" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" From 2bb4aeccf88116682ee8f1bf833f32b858307efd Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 9 Jun 2022 23:12:55 +0200 Subject: [PATCH 08/44] Unset NDEBUG in analyzers (cherry picked from commit 2ad2e85b5f7a3cc44155a5507d9bd985b274b8e2) --- src/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Makefile b/src/Makefile index 57dd4482a1a34..475f2eb949d6e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -442,6 +442,8 @@ clangsa: $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) clangsa: $(build_shlibdir)/libImplicitAtomicsPlugin.$(SHLIB_EXT) # TODO: clangsa: $(build_shlibdir)/libImplicitAtomics2Plugin.$(SHLIB_EXT) +# make sure LLVM's invariant information is not discarded with -DNDEBUG +clang-sagc-%: JL_CXXFLAGS += -UNDEBUG clang-sagc-%: $(SRCDIR)/%.c $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) .FORCE | analyzegc-deps-check @$(call PRINT_ANALYZE, $(build_depsbindir)/clang -D__clang_gcanalyzer__ --analyze -Xanalyzer -analyzer-werror -Xanalyzer -analyzer-output=text --analyzer-no-default-checks \ -Xclang -load -Xclang $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) -Xclang -analyzer-checker=core$(COMMA)julia.GCChecker \ @@ -458,6 +460,7 @@ SA_EXCEPTIONS-subtype.c := -Xanalyzer -analyzer-disable-chec # these need to be annotated (and possibly fixed) SKIP_IMPLICIT_ATOMICS := dump.c gf.c jitlayers.cpp module.c precompile.c rtutils.c staticdata.c toplevel.c codegen.cpp +clang-sa-%: JL_CXXFLAGS += -UNDEBUG clang-sa-%: $(SRCDIR)/%.c $(build_shlibdir)/libImplicitAtomicsPlugin.$(SHLIB_EXT) .FORCE | analyzegc-deps-check @$(call PRINT_ANALYZE, $(build_depsbindir)/clang --analyze -Xanalyzer -analyzer-werror -Xanalyzer -analyzer-output=text \ $(if $(findstring $(notdir $<),$(SKIP_IMPLICIT_ATOMICS)),,-Xclang -load -Xclang $(build_shlibdir)/libImplicitAtomicsPlugin.$(SHLIB_EXT) -Xclang -analyzer-checker=julia.ImplicitAtomics) \ From dcd915b8532ff4b174c7ff6295bb78abdd0dab1d Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Mon, 20 Jun 2022 14:46:52 -0400 Subject: [PATCH 09/44] Don't segfault when running atexit before jl_threads_init (cherry picked from commit 3b77febf62c2491fd4f2415e1718d32b8b2f2108) --- src/gc.c | 4 +++- test/cmdlineargs.jl | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gc.c b/src/gc.c index b54f64ffa00fd..90db3dea5eabd 100644 --- a/src/gc.c +++ b/src/gc.c @@ -493,9 +493,11 @@ static void schedule_all_finalizers(arraylist_t *flist) JL_NOTSAFEPOINT void jl_gc_run_all_finalizers(jl_task_t *ct) { schedule_all_finalizers(&finalizer_list_marked); + // This could be run before we had a chance to setup all threads for (int i = 0;i < jl_n_threads;i++) { jl_ptls_t ptls2 = jl_all_tls_states[i]; - schedule_all_finalizers(&ptls2->finalizers); + if (ptls2) + schedule_all_finalizers(&ptls2->finalizers); } run_finalizers(ct); } diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index 8d58672d30f09..59e9251e1e827 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -249,6 +249,9 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` @test read(`$exename -p2 -t2 -e $code`, String) == "6" end + # Combining --threads and invalid -C should yield a decent error + @test !success(`$exename -t 2 -C invalidtarget`) + # --procs @test readchomp(`$exename -q -p 2 -e "println(nworkers())"`) == "2" @test !success(`$exename -p 0`) From 47cd899fbee0b53f1d566b2361ea74f360bc520c Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Mon, 20 Jun 2022 11:54:04 -0700 Subject: [PATCH 10/44] Explicitly test for a failing exit code, do not include signals We accidentally ignored some test failures because we only tested for `!success(p)`, which passes even if `p` segfaulted. (cherry picked from commit 67a43c52fcb24fca14af6b545df24974ae2b3409) --- test/cmdlineargs.jl | 73 +++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 32 deletions(-) diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index 59e9251e1e827..bf6b696948fff 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -31,6 +31,16 @@ function format_filename(s) return r end +# Returns true if the given command errors, but doesn't signal +function errors_not_signals(cmd::Cmd) + p = run(pipeline(ignorestatus(cmd); stdout=devnull, stderr=devnull)) + return errors_not_signals(p) +end +function errors_not_signals(p::Base.Process) + wait(p) + return process_exited(p) && !Base.process_signaled(p) && !success(p) +end + let fn = format_filename("a%d %p %i %L %l %u z") hd = withenv("HOME" => nothing) do @@ -161,22 +171,22 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` # --eval @test success(`$exename -e "exit(0)"`) - @test !success(`$exename -e "exit(1)"`) + @test errors_not_signals(`$exename -e "exit(1)"`) @test success(`$exename --eval="exit(0)"`) - @test !success(`$exename --eval="exit(1)"`) - @test !success(`$exename -e`) - @test !success(`$exename --eval`) + @test errors_not_signals(`$exename --eval="exit(1)"`) + @test errors_not_signals(`$exename -e`) + @test errors_not_signals(`$exename --eval`) # --eval --interactive (replaced --post-boot) @test success(`$exename -i -e "exit(0)"`) - @test !success(`$exename -i -e "exit(1)"`) + @test errors_not_signals(`$exename -i -e "exit(1)"`) # issue #34924 @test success(`$exename -e 'const LOAD_PATH=1'`) # --print @test read(`$exename -E "1+1"`, String) == "2\n" @test read(`$exename --print="1+1"`, String) == "2\n" - @test !success(`$exename -E`) - @test !success(`$exename --print`) + @test errors_not_signals(`$exename -E`) + @test errors_not_signals(`$exename --print`) # --load let testfile = tempname() @@ -209,12 +219,13 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` end end # -L, --load requires an argument - @test !success(`$exename -L`) - @test !success(`$exename --load`) + @test errors_not_signals(`$exename -L`) + @test errors_not_signals(`$exename --load`) # --cpu-target (requires LLVM enabled) - @test !success(`$exename -C invalidtarget`) - @test !success(`$exename --cpu-target=invalidtarget`) + # Strictly test for failed error, not a segfault, since we had a false positive with just `success()` before. + @test errors_not_signals(`$exename -C invalidtarget`) + @test errors_not_signals(`$exename --cpu-target=invalidtarget`) # -t, --threads code = "print(Threads.nthreads())" @@ -240,8 +251,8 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` withenv("JULIA_NUM_THREADS" => string(cpu_threads)) do @test read(`$exename -e $code`, String) == string(cpu_threads) end - @test !success(`$exename -t 0`) - @test !success(`$exename -t -1`) + @test errors_not_signals(`$exename -t 0`) + @test errors_not_signals(`$exename -t -1`) # Combining --threads and --procs: --threads does propagate withenv("JULIA_NUM_THREADS" => nothing) do @@ -250,11 +261,11 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` end # Combining --threads and invalid -C should yield a decent error - @test !success(`$exename -t 2 -C invalidtarget`) + @test errors_not_signals(`$exename -t 2 -C invalidtarget`) # --procs @test readchomp(`$exename -q -p 2 -e "println(nworkers())"`) == "2" - @test !success(`$exename -p 0`) + @test errors_not_signals(`$exename -p 0`) let p = run(`$exename --procs=1.0`, wait=false) wait(p) @test p.exitcode == 1 && p.termsignal == 0 @@ -281,14 +292,14 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` # --color @test readchomp(`$exename --color=yes -E "Base.have_color"`) == "true" @test readchomp(`$exename --color=no -E "Base.have_color"`) == "false" - @test !success(`$exename --color=false`) + @test errors_not_signals(`$exename --color=false`) # --history-file @test readchomp(`$exename -E "Bool(Base.JLOptions().historyfile)" --history-file=yes`) == "true" @test readchomp(`$exename -E "Bool(Base.JLOptions().historyfile)" --history-file=no`) == "false" - @test !success(`$exename --history-file=false`) + @test errors_not_signals(`$exename --history-file=false`) # --code-coverage mktempdir() do dir @@ -452,16 +463,16 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` --check-bounds=no`)) == JL_OPTIONS_CHECK_BOUNDS_OFF end # check-bounds takes yes/no as argument - @test !success(`$exename -E "exit(0)" --check-bounds=false`) + @test errors_not_signals(`$exename -E "exit(0)" --check-bounds=false`) # --depwarn @test readchomp(`$exename --depwarn=no -E "Base.JLOptions().depwarn"`) == "0" @test readchomp(`$exename --depwarn=yes -E "Base.JLOptions().depwarn"`) == "1" - @test !success(`$exename --depwarn=false`) + @test errors_not_signals(`$exename --depwarn=false`) # test deprecated syntax - @test !success(`$exename -e "foo (x::Int) = x * x" --depwarn=error`) + @test errors_not_signals(`$exename -e "foo (x::Int) = x * x" --depwarn=error`) # test deprecated method - @test !success(`$exename -e " + @test errors_not_signals(`$exename -e " foo() = :foo; bar() = :bar @deprecate foo() bar() foo() @@ -479,7 +490,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` Foo.Deprecated """ - @test !success(`$exename -E "$code" --depwarn=error`) + @test errors_not_signals(`$exename -E "$code" --depwarn=error`) @test readchomperrors(`$exename -E "$code" --depwarn=yes`) == (true, "true", "WARNING: Foo.Deprecated is deprecated, use NotDeprecated instead.\n likely near none:8") @@ -493,14 +504,14 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` @test readchomp(`$exename --inline=yes -E "Bool(Base.JLOptions().can_inline)"`) == "true" @test readchomp(`$exename --inline=no -E "Bool(Base.JLOptions().can_inline)"`) == "false" # --inline takes yes/no as argument - @test !success(`$exename --inline=false`) + @test errors_not_signals(`$exename --inline=false`) # --polly @test readchomp(`$exename -E "Bool(Base.JLOptions().polly)"`) == "true" @test readchomp(`$exename --polly=yes -E "Bool(Base.JLOptions().polly)"`) == "true" @test readchomp(`$exename --polly=no -E "Bool(Base.JLOptions().polly)"`) == "false" # --polly takes yes/no as argument - @test !success(`$exename --polly=false`) + @test errors_not_signals(`$exename --polly=false`) # --fast-math let JL_OPTIONS_FAST_MATH_DEFAULT = 0, @@ -518,7 +529,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` # --worker takes default / custom as argument (default/custom arguments # tested in test/parallel.jl) - @test !success(`$exename --worker=true`) + @test errors_not_signals(`$exename --worker=true`) # test passing arguments mktempdir() do dir @@ -544,7 +555,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` @test readchomp(`$exename -L $testfile $testfile`) == output @test readchomp(`$exename --startup-file=yes $testfile`) == output - @test !success(`$exename --foo $testfile`) + @test errors_not_signals(`$exename --foo $testfile`) @test readchomp(`$exename -L $testfile -e 'exit(0)' -- foo -bar -- baz`) == "[\"foo\", \"-bar\", \"--\", \"baz\"]" end @@ -615,7 +626,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` "Bool(Base.JLOptions().use_compiled_modules)"`) == "true" @test readchomp(`$exename --compiled-modules=no -E "Bool(Base.JLOptions().use_compiled_modules)"`) == "false" - @test !success(`$exename --compiled-modules=foo -e "exit(0)"`) + @test errors_not_signals(`$exename --compiled-modules=foo -e "exit(0)"`) # issue #12671, starting from a non-directory # rm(dir) fails on windows with Permission denied @@ -661,8 +672,7 @@ let exename = `$(Base.julia_cmd().exec[1]) -t 1` @test !occursin("Segmentation fault", s) @test !occursin("EXCEPTION_ACCESS_VIOLATION", s) end - @test !success(p) - @test !Base.process_signaled(p) + @test errors_not_signals(p) @test p.exitcode == 1 end end @@ -672,8 +682,7 @@ let exename = `$(Base.julia_cmd().exec[1]) -t 1` let s = read(err, String) @test s == "ERROR: System image file failed consistency check: maybe opened the wrong version?\n" end - @test !success(p) - @test !Base.process_signaled(p) + @test errors_not_signals(p) @test p.exitcode == 1 end end @@ -691,7 +700,7 @@ let exename = Base.julia_cmd() @test parse(Int,readchomp(`$exename -E "Base.JLOptions().startupfile" --startup-file=no`)) == JL_OPTIONS_STARTUPFILE_OFF end - @test !success(`$exename --startup-file=false`) + @test errors_not_signals(`$exename --startup-file=false`) end # Make sure `julia --lisp` doesn't break From 9bb96253156f19462847cae95acd7f2757077a4d Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Sat, 25 Jun 2022 16:08:00 +0000 Subject: [PATCH 11/44] Don't call `jl_errorf()` when we're early in bringup When calling `jl_error()` or `jl_errorf()`, we must check to see if we are so early in the bringup process that it is dangerous to attempt to construct a backtrace because the data structures used to provide line information are not properly setup. This can be easily triggered by running: ``` julia -C invalid ``` On an `i686-linux-gnu` build, this will hit the "Invalid CPU Name" branch in `jitlayers.cpp`, which calls `jl_errorf()`. This in turn calls `jl_throw()`, which will eventually call `jl_DI_for_fptr` as part of the backtrace printing process, which fails as the object maps are not fully initialized. See the below `gdb` stacktrace for details: ``` $ gdb -batch -ex 'r' -ex 'bt' --args ./julia -C invalid ... fatal: error thrown and no exception handler available. ErrorException("Invalid CPU name "invalid".") Thread 1 "julia" received signal SIGSEGV, Segmentation fault. 0xf75bd665 in std::_Rb_tree, std::_Select1st >, std::greater, std::allocator > >::lower_bound (__k=, this=0x248) at /usr/local/i686-linux-gnu/include/c++/9.1.0/bits/stl_tree.h:1277 1277 /usr/local/i686-linux-gnu/include/c++/9.1.0/bits/stl_tree.h: No such file or directory. #0 0xf75bd665 in std::_Rb_tree, std::_Select1st >, std::greater, std::allocator > >::lower_bound (__k=, this=0x248) at /usr/local/i686-linux-gnu/include/c++/9.1.0/bits/stl_tree.h:1277 #1 std::map, std::allocator > >::lower_bound (__x=, this=0x248) at /usr/local/i686-linux-gnu/include/c++/9.1.0/bits/stl_map.h:1258 #2 jl_DI_for_fptr (fptr=4155049385, symsize=symsize@entry=0xffffcfa8, slide=slide@entry=0xffffcfa0, Section=Section@entry=0xffffcfb8, context=context@entry=0xffffcf94) at /cache/build/default-amdci5-4/julialang/julia-master/src/debuginfo.cpp:1181 #3 0xf75c056a in jl_getFunctionInfo_impl (frames_out=0xffffd03c, pointer=4155049385, skipC=0, noInline=0) at /cache/build/default-amdci5-4/julialang/julia-master/src/debuginfo.cpp:1210 #4 0xf7a6ca98 in jl_print_native_codeloc (ip=4155049385) at /cache/build/default-amdci5-4/julialang/julia-master/src/stackwalk.c:636 #5 0xf7a6cd54 in jl_print_bt_entry_codeloc (bt_entry=0xf0798018) at /cache/build/default-amdci5-4/julialang/julia-master/src/stackwalk.c:657 #6 jlbacktrace () at /cache/build/default-amdci5-4/julialang/julia-master/src/stackwalk.c:1090 #7 0xf7a3cd2b in ijl_no_exc_handler (e=0xf0794010) at /cache/build/default-amdci5-4/julialang/julia-master/src/task.c:605 #8 0xf7a3d10a in throw_internal (ct=ct@entry=0xf070c010, exception=, exception@entry=0xf0794010) at /cache/build/default-amdci5-4/julialang/julia-master/src/task.c:638 #9 0xf7a3d330 in ijl_throw (e=0xf0794010) at /cache/build/default-amdci5-4/julialang/julia-master/src/task.c:654 #10 0xf7a905aa in ijl_errorf (fmt=fmt@entry=0xf7647cd4 "Invalid CPU name \"%s\".") at /cache/build/default-amdci5-4/julialang/julia-master/src/rtutils.c:77 #11 0xf75a4b22 in (anonymous namespace)::createTargetMachine () at /cache/build/default-amdci5-4/julialang/julia-master/src/jitlayers.cpp:823 #12 JuliaOJIT::JuliaOJIT (this=) at /cache/build/default-amdci5-4/julialang/julia-master/src/jitlayers.cpp:1044 #13 0xf7531793 in jl_init_llvm () at /cache/build/default-amdci5-4/julialang/julia-master/src/codegen.cpp:8585 #14 0xf75318a8 in jl_init_codegen_impl () at /cache/build/default-amdci5-4/julialang/julia-master/src/codegen.cpp:8648 #15 0xf7a51a52 in jl_restore_system_image_from_stream (f=) at /cache/build/default-amdci5-4/julialang/julia-master/src/staticdata.c:2131 #16 0xf7a55c03 in ijl_restore_system_image_data (buf=0xe859c1c0 "8'\031\003", len=125161105) at /cache/build/default-amdci5-4/julialang/julia-master/src/staticdata.c:2184 #17 0xf7a55cf9 in jl_load_sysimg_so () at /cache/build/default-amdci5-4/julialang/julia-master/src/staticdata.c:424 #18 ijl_restore_system_image (fname=0x80a0900 "/build/bk_download/julia-d78fdad601/lib/julia/sys.so") at /cache/build/default-amdci5-4/julialang/julia-master/src/staticdata.c:2157 #19 0xf7a3bdfc in _finish_julia_init (rel=rel@entry=JL_IMAGE_JULIA_HOME, ct=, ptls=) at /cache/build/default-amdci5-4/julialang/julia-master/src/init.c:741 #20 0xf7a3c8ac in julia_init (rel=) at /cache/build/default-amdci5-4/julialang/julia-master/src/init.c:728 #21 0xf7a7f61d in jl_repl_entrypoint (argc=, argv=0xffffddf4) at /cache/build/default-amdci5-4/julialang/julia-master/src/jlapi.c:705 #22 0x080490a7 in main (argc=3, argv=0xffffddf4) at /cache/build/default-amdci5-4/julialang/julia-master/cli/loader_exe.c:59 ``` To prevent this, we simply avoid calling `jl_errorf` this early in the process, punting the problem to a later PR that can update guard conditions within `jl_error*`. (cherry picked from commit 21ab24eeca1220aab049c6da21566e4f8d96d1ad) --- src/codegen.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 517577df0f324..cfd0e7154ce68 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -8258,13 +8258,20 @@ extern "C" void jl_init_llvm(void) SmallVector targetFeatures(target.second.begin(), target.second.end()); std::string errorstr; const Target *TheTarget = TargetRegistry::lookupTarget("", TheTriple, errorstr); - if (!TheTarget) - jl_errorf("%s", errorstr.c_str()); + if (!TheTarget) { + // Note we are explicitly not using `jl_errorf()` here, as it will attempt to + // collect a backtrace, but we're too early in LLVM initialization for that. + jl_printf(JL_STDERR, "ERROR: %s", errorstr.c_str()); + exit(1); + } if (jl_processor_print_help || (target_flags & JL_TARGET_UNKNOWN_NAME)) { std::unique_ptr MSTI( TheTarget->createMCSubtargetInfo(TheTriple.str(), "", "")); - if (!MSTI->isCPUStringValid(TheCPU)) - jl_errorf("Invalid CPU name \"%s\".", TheCPU.c_str()); + if (!MSTI->isCPUStringValid(TheCPU)) { + // Same as above, we are too early to use `jl_errorf()` here. + jl_printf(JL_STDERR, "ERROR: Invalid CPU name \"%s\".", TheCPU.c_str()); + exit(1); + } if (jl_processor_print_help) { // This is the only way I can find to print the help message once. // It'll be nice if we can iterate through the features and print our own help From 6d7539ba8c47a724de6c8cf521d5f32f6b9440b4 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Fri, 15 Apr 2022 11:43:52 -0400 Subject: [PATCH 12/44] more friendly/useful error for stack overflow in type inference (#44971) fixes #44852 (cherry picked from commit 401d578214514a85590adcc21033861f46c8e922) --- src/gf.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/gf.c b/src/gf.c index a37883251e9c2..ad84c1c523be8 100644 --- a/src/gf.c +++ b/src/gf.c @@ -319,10 +319,19 @@ jl_code_info_t *jl_type_infer(jl_method_instance_t *mi, size_t world, int force) src = (jl_code_info_t*)jl_apply(fargs, 3); } JL_CATCH { - jl_printf((JL_STREAM*)STDERR_FILENO, "Internal error: encountered unexpected error in runtime:\n"); - jl_static_show((JL_STREAM*)STDERR_FILENO, jl_current_exception()); - jl_printf((JL_STREAM*)STDERR_FILENO, "\n"); - jlbacktrace(); // written to STDERR_FILENO + jl_value_t *e = jl_current_exception(); + if (e == jl_stackovf_exception) { + jl_printf((JL_STREAM*)STDERR_FILENO, "Internal error: stack overflow in type inference of "); + jl_static_show_func_sig((JL_STREAM*)STDERR_FILENO, (jl_value_t*)mi->specTypes); + jl_printf((JL_STREAM*)STDERR_FILENO, ".\n"); + jl_printf((JL_STREAM*)STDERR_FILENO, "This might be caused by recursion over very long tuples or argument lists.\n"); + } + else { + jl_printf((JL_STREAM*)STDERR_FILENO, "Internal error: encountered unexpected error in runtime:\n"); + jl_static_show((JL_STREAM*)STDERR_FILENO, e); + jl_printf((JL_STREAM*)STDERR_FILENO, "\n"); + jlbacktrace(); // written to STDERR_FILENO + } src = NULL; } ct->world_age = last_age; From d6e8e5dc7fc60521b8e3ba0a0efc448631655fa2 Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Thu, 14 Jul 2022 21:39:32 -0700 Subject: [PATCH 13/44] mark two_mul as consistent (#46022) should let the compiler prove that float64^int always gives the same result. (cherry picked from commit fd70eabc1dd6c79149edb82da9e9c37d89e249d9) --- base/math.jl | 4 ++-- test/math.jl | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/base/math.jl b/base/math.jl index a8ec2a97f0f61..47f9512d4efff 100644 --- a/base/math.jl +++ b/base/math.jl @@ -42,7 +42,7 @@ end # non-type specific math functions -@inline function two_mul(x::Float64, y::Float64) +@assume_effects :consistent @inline function two_mul(x::Float64, y::Float64) if Core.Intrinsics.have_fma(Float64) xy = x*y return xy, fma(x, y, -xy) @@ -50,7 +50,7 @@ end return Base.twomul(x,y) end -@inline function two_mul(x::T, y::T) where T<: Union{Float16, Float32} +@assume_effects :consistent @inline function two_mul(x::T, y::T) where T<: Union{Float16, Float32} if Core.Intrinsics.have_fma(T) xy = x*y return xy, fma(x, y, -xy) diff --git a/test/math.jl b/test/math.jl index e93ad225d3111..55d0a3b6c5ed4 100644 --- a/test/math.jl +++ b/test/math.jl @@ -1421,3 +1421,7 @@ end # the compiler ever gets good enough to figure # that out by itself, move this to inference). @test code_typed(x->Val{x^0.0}(), Tuple{Float64})[1][2] == Val{1.0} + +for T in (Float32, Float64) + @test Core.Compiler.is_foldable(Base.infer_effects(^, (T,Int))) +end From ef18da71bb9575346ddb19a20a1530e2be5682fd Mon Sep 17 00:00:00 2001 From: KristofferC Date: Wed, 20 Jul 2022 09:57:17 +0200 Subject: [PATCH 14/44] Export jl_is_foreign_type --- src/jl_exported_funcs.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jl_exported_funcs.inc b/src/jl_exported_funcs.inc index 4e3849477a5ac..b81e0ef5b6489 100644 --- a/src/jl_exported_funcs.inc +++ b/src/jl_exported_funcs.inc @@ -285,6 +285,7 @@ XX(jl_is_char_signed) \ XX(jl_is_const) \ XX(jl_is_debugbuild) \ + XX(jl_is_foreign_type) \ XX(jl_is_identifier) \ XX(jl_is_imported) \ XX(jl_is_initialized) \ @@ -567,4 +568,3 @@ YY(LLVMExtraAddGCInvariantVerifierPass) \ YY(LLVMExtraAddDemoteFloat16Pass) \ YY(LLVMExtraAddCPUFeaturesPass) \ - From 54a6806d01cbdd2a6c95d0ef94150b13a80caf1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sun, 17 Jul 2022 19:14:07 +0100 Subject: [PATCH 15/44] [nghttp2_jll] Upgrade to v1.48.0 (#45980) * [nghttp2_jll] Upgrade to v1.48.0 * [nghttp2_jll] Fix test (cherry picked from commit 707f59b980b54541af8362a9aa94d9690d72df8f) --- deps/Versions.make | 2 +- deps/checksums/nghttp2 | 68 ++++++++++++++--------------- stdlib/nghttp2_jll/Project.toml | 2 +- stdlib/nghttp2_jll/test/runtests.jl | 2 +- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/deps/Versions.make b/deps/Versions.make index 91d5285f964c5..f507b3c9fba32 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -66,7 +66,7 @@ MPFR_VER := 4.1.0 MPFR_JLL_NAME := MPFR # nghttp2 -NGHTTP2_VER := 1.47.0 +NGHTTP2_VER := 1.48.0 NGHTTP2_JLL_NAME := nghttp2 # Objconv (we don't ship this, so no need for a fake JLL; therefore we specify the JLL_VER here) diff --git a/deps/checksums/nghttp2 b/deps/checksums/nghttp2 index 5aadf03f2bea7..5cc0b22d2d778 100644 --- a/deps/checksums/nghttp2 +++ b/deps/checksums/nghttp2 @@ -1,34 +1,34 @@ -nghttp2-1.47.0.tar.bz2/md5/2bca98caef4b5c27d5bdc4732f36a5d6 -nghttp2-1.47.0.tar.bz2/sha512/4dbd0fe10f5c68d363ee0fff2aceb97f58a755a276796f16b078cd3bec3a17cd5e0dadf1e5027347d3342daa3572332b14df230a4d9675a9b57fff67f8f9e5a3 -nghttp2.v1.47.0+0.aarch64-apple-darwin.tar.gz/md5/76abe33c6e81346a133c3e26593db1b2 -nghttp2.v1.47.0+0.aarch64-apple-darwin.tar.gz/sha512/72a1302134ab4715f4c0b8f702a566498d4595aa7a3fd762e43d7e0ca5987506a9b1dc53318763595ad652d8c4a633c3c5e0500a8f4e3007cb6cf9e30341d9ff -nghttp2.v1.47.0+0.aarch64-linux-gnu.tar.gz/md5/1e5ad3ad31290e017c930c2d1dbda38d -nghttp2.v1.47.0+0.aarch64-linux-gnu.tar.gz/sha512/c8a2543f079751bcaf7165661f5f4053fd1b733cde0f82078736c898503c796fdd7ce587f0da2d1bb3d35a74a644fed6e8cc30a3520e577593d19700e822cc55 -nghttp2.v1.47.0+0.aarch64-linux-musl.tar.gz/md5/7079c203ec5e6fcf45d01bfa1ca0b1b8 -nghttp2.v1.47.0+0.aarch64-linux-musl.tar.gz/sha512/152f34f1e9a5f741d69d62587762a96fd290ecb41ec8eeff46fae39b5e606ff054755b88abe3bcaa07db640526fc12546769da4a3761a18240eb3d2699de8886 -nghttp2.v1.47.0+0.armv6l-linux-gnueabihf.tar.gz/md5/918f3e549998e34f2aa292a2ff7945be -nghttp2.v1.47.0+0.armv6l-linux-gnueabihf.tar.gz/sha512/545c5674a6492dbd5f109303383b920b0b011e37e8a4abfb329b22cab50a6a977d9f74aac6f4aaa833064fbaae4b5ebc019e83d2edb8b4af2515f36f4530937f -nghttp2.v1.47.0+0.armv6l-linux-musleabihf.tar.gz/md5/1345980d4822c6e9c1934378e365e343 -nghttp2.v1.47.0+0.armv6l-linux-musleabihf.tar.gz/sha512/470c66205d257ba3b23b0db8ea93fe40bc71c219d50cd88a6b57abf8c105218bd9912b9a605da12903793893f37803b0e3357566e20035a079ed2b4bcc6d7b78 -nghttp2.v1.47.0+0.armv7l-linux-gnueabihf.tar.gz/md5/e831c03eeb810a48fbd34df2017c20be -nghttp2.v1.47.0+0.armv7l-linux-gnueabihf.tar.gz/sha512/e90270b1f6ae7c90ce746f60c2f451f2271ec6f682003f3a0ee8eb97e9054932495fff22b2ca1f40e3711f847c520fa605c49c7ae671db7f282f78f8d745a0db -nghttp2.v1.47.0+0.armv7l-linux-musleabihf.tar.gz/md5/38d95842aa0d9e9ac9e77e468d18893d -nghttp2.v1.47.0+0.armv7l-linux-musleabihf.tar.gz/sha512/5e595d143248fadd5cfffa1f15b09698f1793c04422b12d5f8e22c52e4ebc5d947845fe3ef7539845ad731d4457c8a7a6e6e2bc1dbb5b32fd3cd374963aa9833 -nghttp2.v1.47.0+0.i686-linux-gnu.tar.gz/md5/a3c54ab31e835ecbc12425b00a201bbf -nghttp2.v1.47.0+0.i686-linux-gnu.tar.gz/sha512/375354d57b14b73d7e4cf751b69872b19e6806b7a110c104c0dc25794a33dd89642f9911216c2c1a2698d45878c12b7d735402e44b9b4ba60a5a9751a522c19b -nghttp2.v1.47.0+0.i686-linux-musl.tar.gz/md5/2cdfc4b177bc88685e629362ac754cab -nghttp2.v1.47.0+0.i686-linux-musl.tar.gz/sha512/cb741c7d6dbfe5815e1691c98fac46c2559b419cb3bc882b925779d9699e7b37332ab197bdb3b7cb944de45ea0cc3c6f6e5f8df04b7556dac25f796e992d7dc5 -nghttp2.v1.47.0+0.i686-w64-mingw32.tar.gz/md5/ec5f305e52c205a246db0e4ded79f6c8 -nghttp2.v1.47.0+0.i686-w64-mingw32.tar.gz/sha512/4bd5f81bd1502bbc04973f0721099a230248b2be907f66f044fd1111326bf05804aae4df123eda65e7e90445157bc07e87d9e837dfd2393038e4e042254c16df -nghttp2.v1.47.0+0.powerpc64le-linux-gnu.tar.gz/md5/01431aaf0c383e2ab1460f41e3c64446 -nghttp2.v1.47.0+0.powerpc64le-linux-gnu.tar.gz/sha512/ef3ed6eb1c77a81f46f7c06e4748d766144231ab3cc4875fb3502c6a553ce04937ee6dcb1516532c91043921b76779c1ea1ca20070907d3639d2f0fb036d0d56 -nghttp2.v1.47.0+0.x86_64-apple-darwin.tar.gz/md5/12650859c3ba16131a35b63510816267 -nghttp2.v1.47.0+0.x86_64-apple-darwin.tar.gz/sha512/a91d6b572ed830bdcd5822d8d0dbca70ce45f0c2706a1fb83aeccacad1a72391ea09683169ae9d8ed6e84a1f28d55d2ee26e49a68cca405dd032e9c128e54858 -nghttp2.v1.47.0+0.x86_64-linux-gnu.tar.gz/md5/62fb16238af3cf50721b0a671d28dc8c -nghttp2.v1.47.0+0.x86_64-linux-gnu.tar.gz/sha512/f662f30ad7057bc9c724fd48e15a2894aa0a345a24d35acaa0f3cb25d73b329772942d3499647ba7563c110d2186e96d4a3b12e8721d28d2cd6491d93df24e05 -nghttp2.v1.47.0+0.x86_64-linux-musl.tar.gz/md5/3224892e3e5c7d7ae24c2380fd731ab8 -nghttp2.v1.47.0+0.x86_64-linux-musl.tar.gz/sha512/35d18c52dee94846a85d5a7a19bff95ce2b05e5290096d532c7f3d144ee809a2ba9072dd24372905c485ee0dfa03309be8cebead2b62292518ab5d63d80c9e4a -nghttp2.v1.47.0+0.x86_64-unknown-freebsd.tar.gz/md5/4b3c9032b11ba078d7a91a30d3cabc6a -nghttp2.v1.47.0+0.x86_64-unknown-freebsd.tar.gz/sha512/21c9d1c95e26bf33a0cedc63ac6e81dcc670d6bc3fefc9a8efbf7faff718875cf6fc51dfdb192afb00acf86257104de7a0dfcaaf29119ba055b69885c31a4dd4 -nghttp2.v1.47.0+0.x86_64-w64-mingw32.tar.gz/md5/7d41384443541bf30b6165381b1c5305 -nghttp2.v1.47.0+0.x86_64-w64-mingw32.tar.gz/sha512/2febfcc452bd4f2a3200e6edb8127f678749a358a4beb219b7b29294ade66bb817e1fbdce665f0e3e20d923ab3bc68598f3c769bd4f09871866e452b6aab52d0 +nghttp2-1.48.0.tar.bz2/md5/887336a68dbf6e2fa78dd4fc2a515e01 +nghttp2-1.48.0.tar.bz2/sha512/319b8c4f5f276e699fb04cf2a9aadd07bb0a26b78d8b37eb84e6dab603718b3d2c9bf6dca54816d4644cd6833177d842d7f7d3a1438a1c723d2b73e4ec2fb344 +nghttp2.v1.48.0+0.aarch64-apple-darwin.tar.gz/md5/362b35eecbb86a49b956fa57168ec61c +nghttp2.v1.48.0+0.aarch64-apple-darwin.tar.gz/sha512/d8c35686ac6baf4ba6038355f1d3a275f2c3a9696d1b751a54c6e671cbd96c38b4600c6ac00d77e43efc4fbb01c7672d917142530efb0360c38a4159703b9156 +nghttp2.v1.48.0+0.aarch64-linux-gnu.tar.gz/md5/2eb064be49b1990250a7c8ebffcc4a1e +nghttp2.v1.48.0+0.aarch64-linux-gnu.tar.gz/sha512/0fcef4bfa0cea2d7727241961551b0ff73337aefbe8f29a6ca06f856b142681e251af57795ba26edc25784a1845040a0a3865dd0ba26ea65c43478a02ea02080 +nghttp2.v1.48.0+0.aarch64-linux-musl.tar.gz/md5/80f505a5b1f092e9a2e4609ff4b16b9f +nghttp2.v1.48.0+0.aarch64-linux-musl.tar.gz/sha512/3e260d9bb34058c7c841034d874dec2141e71f40c0e75fb751740dc46fe1cd5668c713e7efc154f1e7c964ed41b8fed9a08b780370e4a4fb44eb564eff1a2c72 +nghttp2.v1.48.0+0.armv6l-linux-gnueabihf.tar.gz/md5/6b167502a95dac6f55cf2d312af09b91 +nghttp2.v1.48.0+0.armv6l-linux-gnueabihf.tar.gz/sha512/da620c8e50ce4ca2fd150c7b83b0d1d40d3d9e184cb5dfff6883723b574e8c68ffd121a74154a0544e5beb7991740634c19916bb66b1349f46d772ddff3ceddf +nghttp2.v1.48.0+0.armv6l-linux-musleabihf.tar.gz/md5/b9079b10a7f0e190232426cbed35f8e9 +nghttp2.v1.48.0+0.armv6l-linux-musleabihf.tar.gz/sha512/dd0afaa8eed6df8c0b4f78c3408e6a0b881957d183b5dfa4e6d9aa131d92a7485198da316dfbb28280b6e5e281432ee1dc1bbff5906a29cc29afa77390d83e09 +nghttp2.v1.48.0+0.armv7l-linux-gnueabihf.tar.gz/md5/cfacf5fcb143757b6fa64081011807d6 +nghttp2.v1.48.0+0.armv7l-linux-gnueabihf.tar.gz/sha512/5b9acc860474722c07f73b3d049c5d131c86212264a49270253861b897b165e4a8cd608ac3735ee72c90cdd36ea9342208e1eee48e9e2407b3b10ca2cf23f2d1 +nghttp2.v1.48.0+0.armv7l-linux-musleabihf.tar.gz/md5/76dfdc217fb52e74955b6dd95bace880 +nghttp2.v1.48.0+0.armv7l-linux-musleabihf.tar.gz/sha512/05b7b6ae7cee062409eb941147e45e0b1b68a0ddcd8a022bd008a2f04a1249051a6e69dba511398b3e98e1144004bf0e6580fb4417f5500746f5b4b3eb65179f +nghttp2.v1.48.0+0.i686-linux-gnu.tar.gz/md5/8ec510d34f87830be0cea46378474a0c +nghttp2.v1.48.0+0.i686-linux-gnu.tar.gz/sha512/c3262180298ebfe1aee5fa3b25a491f4fc6122d0936c0fcfdd1d3f7f884dbcdbc9cbca05df986782e200334c4d97bd5ed5b75a9286910d04b00eac9efa43d67a +nghttp2.v1.48.0+0.i686-linux-musl.tar.gz/md5/90fa7935261e782dbd14aa858ae2d511 +nghttp2.v1.48.0+0.i686-linux-musl.tar.gz/sha512/790bcac85995a2e5caddaf19023c90a5b9566d166da48b98581de2e12d84c7beaa74e7ef9ae55bcf4a68c91e1e873204328c8672634e5ed3fc79721a9939b480 +nghttp2.v1.48.0+0.i686-w64-mingw32.tar.gz/md5/b7654776af03333caf4ba1517ffd2636 +nghttp2.v1.48.0+0.i686-w64-mingw32.tar.gz/sha512/b8f82c7a8f3ca6cb3cd8ab760d8299b0dcc6a03c7e51be965168c01de07b900891e48e13fbcee67856afddb10c41b402a4b384a06d3fbee41c4d5f3b6e352c53 +nghttp2.v1.48.0+0.powerpc64le-linux-gnu.tar.gz/md5/eaee75e48bb77137c09abc5abccc6db1 +nghttp2.v1.48.0+0.powerpc64le-linux-gnu.tar.gz/sha512/4b99d91a7f751c05835c73bb6b0f49c851ca36ead41c5137aedf5e96bd48d894768b9fdb65f83560ea86e0c3f854e52bf66f8859dcd920446db1a121c7a5e0f2 +nghttp2.v1.48.0+0.x86_64-apple-darwin.tar.gz/md5/1720e70d0e72afbf36900ed75cba45d0 +nghttp2.v1.48.0+0.x86_64-apple-darwin.tar.gz/sha512/4c07a7d78bb1366a913321d8258d0cbd0d0b7d85f43b5980617fd1451dc39e7859134e86ec59b06b3b6dc8b62b71f9890eecf2737f8cf4e441bf08c2e61cefc6 +nghttp2.v1.48.0+0.x86_64-linux-gnu.tar.gz/md5/a94aab74d021578fcda21836c8030c9b +nghttp2.v1.48.0+0.x86_64-linux-gnu.tar.gz/sha512/c1c31e32e60087fe7facbfea4bd4897649c8eeef92101093df4897f41847461851497e436c4a4e1c847c9bf5ac678934aba1eca0d8a6e17302d9474ca3064fb5 +nghttp2.v1.48.0+0.x86_64-linux-musl.tar.gz/md5/677ad574f615b2d77fecdac0c75111db +nghttp2.v1.48.0+0.x86_64-linux-musl.tar.gz/sha512/737637a68364096ea6c507e37c9305df875c8830d58a05404ceb2e76d69bd6e44c82483e0f8228cdc7a64b0419de75d2d99151fac369bacd42fc06a71b35ec54 +nghttp2.v1.48.0+0.x86_64-unknown-freebsd.tar.gz/md5/b65cf09003912eb4201db80253fc5b04 +nghttp2.v1.48.0+0.x86_64-unknown-freebsd.tar.gz/sha512/fdf7c733f4247f66733dd36e314cf6772abfecb82ec99c613db66910eb956849851587d74b9e940e1f0d743142555ccf96bf7b990b3502e17028cbdd8bc504d8 +nghttp2.v1.48.0+0.x86_64-w64-mingw32.tar.gz/md5/cfb494369553277c10a7b1eaf1c116fd +nghttp2.v1.48.0+0.x86_64-w64-mingw32.tar.gz/sha512/066b8a9cbf3fe710704b56af2917279f32cd3cef69808bb56872d367061402832dc1cbb01988b35652751e66c937d29a0190b98bfcd846a50fd80392b5a7e1bd diff --git a/stdlib/nghttp2_jll/Project.toml b/stdlib/nghttp2_jll/Project.toml index e768d6fc84b96..32ea7d0f34134 100644 --- a/stdlib/nghttp2_jll/Project.toml +++ b/stdlib/nghttp2_jll/Project.toml @@ -1,6 +1,6 @@ name = "nghttp2_jll" uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.47.0+0" +version = "1.48.0+0" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" diff --git a/stdlib/nghttp2_jll/test/runtests.jl b/stdlib/nghttp2_jll/test/runtests.jl index 9a1dcd1c91cc2..d752251f98ebc 100644 --- a/stdlib/nghttp2_jll/test/runtests.jl +++ b/stdlib/nghttp2_jll/test/runtests.jl @@ -11,5 +11,5 @@ end @testset "nghttp2_jll" begin info = unsafe_load(ccall((:nghttp2_version,libnghttp2), Ptr{nghttp2_info}, (Cint,), 0)) - @test VersionNumber(unsafe_string(info.version_str)) == v"1.47.0" + @test VersionNumber(unsafe_string(info.version_str)) == v"1.48.0" end From 9fa6b7f2deed51561919fe847312fa70363daf4b Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Mon, 18 Jul 2022 15:02:46 -0400 Subject: [PATCH 16/44] fix #45825, BitArray methods assuming 1-indexing of AbstractArray (#45835) (cherry picked from commit 820c08b896e408d9ed1e064ada8f9138dd6a3a6b) --- base/abstractarray.jl | 10 +++++--- base/bitarray.jl | 53 +++++++++++++++++++++++-------------------- test/bitarray.jl | 37 +++++++++++++++++++++++++++++- 3 files changed, 71 insertions(+), 29 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 3922552668e24..49aec27cb0a58 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -1011,6 +1011,10 @@ julia> y """ function copyto!(dest::AbstractArray, src::AbstractArray) isempty(src) && return dest + if dest isa BitArray + # avoid ambiguities with other copyto!(::AbstractArray, ::SourceArray) methods + return _copyto_bitarray!(dest, src) + end src′ = unalias(dest, src) copyto_unaliased!(IndexStyle(dest), dest, IndexStyle(src′), src′) end @@ -1115,10 +1119,10 @@ function copyto!(B::AbstractVecOrMat{R}, ir_dest::AbstractRange{Int}, jr_dest::A return B end -function copyto_axcheck!(dest, src) - @noinline checkaxs(axd, axs) = axd == axs || throw(DimensionMismatch("axes must agree, got $axd and $axs")) +@noinline _checkaxs(axd, axs) = axd == axs || throw(DimensionMismatch("axes must agree, got $axd and $axs")) - checkaxs(axes(dest), axes(src)) +function copyto_axcheck!(dest, src) + _checkaxs(axes(dest), axes(src)) copyto!(dest, src) end diff --git a/base/bitarray.jl b/base/bitarray.jl index 33e2715572018..7dd337c15867f 100644 --- a/base/bitarray.jl +++ b/base/bitarray.jl @@ -501,40 +501,42 @@ function Array{T,N}(B::BitArray{N}) where {T,N} end BitArray(A::AbstractArray{<:Any,N}) where {N} = BitArray{N}(A) + function BitArray{N}(A::AbstractArray{T,N}) where N where T B = BitArray(undef, convert(Dims{N}, size(A)::Dims{N})) - Bc = B.chunks - l = length(B) + _checkaxs(axes(B), axes(A)) + _copyto_bitarray!(B, A) + return B::BitArray{N} +end + +function _copyto_bitarray!(B::BitArray, A::AbstractArray) + l = length(A) l == 0 && return B - ind = 1 + l > length(B) && throw(BoundsError(B, length(B)+1)) + Bc = B.chunks + nc = num_bit_chunks(l) + Ai = first(eachindex(A)) @inbounds begin - for i = 1:length(Bc)-1 + for i = 1:nc-1 c = UInt64(0) for j = 0:63 - c |= (UInt64(convert(Bool, A[ind])::Bool) << j) - ind += 1 + c |= (UInt64(convert(Bool, A[Ai])::Bool) << j) + Ai = nextind(A, Ai) end Bc[i] = c end c = UInt64(0) - for j = 0:_mod64(l-1) - c |= (UInt64(convert(Bool, A[ind])::Bool) << j) - ind += 1 + tail = _mod64(l - 1) + 1 + for j = 0:tail-1 + c |= (UInt64(convert(Bool, A[Ai])::Bool) << j) + Ai = nextind(A, Ai) end - Bc[end] = c + msk = _msk_end(tail) + Bc[nc] = (c & msk) | (Bc[nc] & ~msk) end return B end -function BitArray{N}(A::Array{Bool,N}) where N - B = BitArray(undef, size(A)) - Bc = B.chunks - l = length(B) - l == 0 && return B - copy_to_bitarray_chunks!(Bc, 1, A, 1, l) - return B::BitArray{N} -end - reinterpret(::Type{Bool}, B::BitArray, dims::NTuple{N,Int}) where {N} = reinterpret(B, dims) reinterpret(B::BitArray, dims::NTuple{N,Int}) where {N} = reshape(B, dims) @@ -721,24 +723,25 @@ function _unsafe_setindex!(B::BitArray, X::AbstractArray, I::BitArray) lx = length(X) last_chunk_len = _mod64(length(B)-1)+1 - c = 1 + Xi = first(eachindex(X)) + lastXi = last(eachindex(X)) for i = 1:lc @inbounds Imsk = Ic[i] @inbounds C = Bc[i] u = UInt64(1) for j = 1:(i < lc ? 64 : last_chunk_len) if Imsk & u != 0 - lx < c && throw_setindex_mismatch(X, c) - @inbounds x = convert(Bool, X[c]) + Xi > lastXi && throw_setindex_mismatch(X, count(I)) + @inbounds x = convert(Bool, X[Xi]) C = ifelse(x, C | u, C & ~u) - c += 1 + Xi = nextind(X, Xi) end u <<= 1 end @inbounds Bc[i] = C end - if length(X) != c-1 - throw_setindex_mismatch(X, c-1) + if Xi != nextind(X, lastXi) + throw_setindex_mismatch(X, count(I)) end return B end diff --git a/test/bitarray.jl b/test/bitarray.jl index 75a6389815336..2add644cb1caa 100644 --- a/test/bitarray.jl +++ b/test/bitarray.jl @@ -1767,4 +1767,39 @@ end @test all(bitarray[rangeout, rangein] .== true) @test all(bitarray[rangein, rangeout] .== true) end -end \ No newline at end of file +end + +# issue #45825 + +isdefined(Main, :OffsetArrays) || @eval Main include("testhelpers/OffsetArrays.jl") +using .Main.OffsetArrays + +let all_false = OffsetArray(falses(2001), -1000:1000) + @test !any(==(true), all_false) + # should be run with --check-bounds=yes + @test_throws DimensionMismatch BitArray(all_false) + all_false = OffsetArray(falses(2001), 1:2001) + @test !any(==(true), BitArray(all_false)) + all_false = OffsetArray(falses(100, 100), 0:99, -1:98) + @test !any(==(true), all_false) + @test_throws DimensionMismatch BitArray(all_false) + all_false = OffsetArray(falses(100, 100), 1:100, 1:100) + @test !any(==(true), all_false) +end +let a = falses(1000), + msk = BitArray(rand(Bool, 1000)), + n = count(msk), + b = OffsetArray(rand(Bool, n), (-n÷2):(n÷2)-iseven(n)) + a[msk] = b + @test a[msk] == collect(b) + a = falses(100, 100) + msk = BitArray(rand(Bool, 100, 100)) + n = count(msk) + b = OffsetArray(rand(Bool, 1, n), 1:1, (-n÷2):(n÷2)-iseven(n)) + a[msk] = b + @test a[msk] == vec(collect(b)) +end +let b = trues(10) + copyto!(b, view([0,0,0], :)) + @test b == [0,0,0,1,1,1,1,1,1,1] +end From bcac3c28a231b65216b6ecc8aaf20399b4ba8c3b Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sun, 17 Jul 2022 16:12:51 -0400 Subject: [PATCH 17/44] remove examples of time_imports nesting given it was a bug (#46072) (cherry picked from commit 29586ef30f7536c1263290c70e9afbc183841695) --- stdlib/InteractiveUtils/src/macros.jl | 48 +++++++++++---------------- 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/stdlib/InteractiveUtils/src/macros.jl b/stdlib/InteractiveUtils/src/macros.jl index b0005e6d7d783..7c4ce6f0dd588 100644 --- a/stdlib/InteractiveUtils/src/macros.jl +++ b/stdlib/InteractiveUtils/src/macros.jl @@ -356,39 +356,31 @@ See also: [`code_native`](@ref), [`@code_llvm`](@ref), [`@code_typed`](@ref) and A macro to execute an expression and produce a report of any time spent importing packages and their dependencies. Any compilation time will be reported as a percentage, and how much of which was recompilation, if any. -If a package's dependencies have already been imported either globally or by another dependency they will -not appear under that package and the package will accurately report a faster load time than if it were to -be loaded in isolation. - -!!! compat "Julia 1.9" - Reporting of any compilation and recompilation time was added in Julia 1.9 +!!! note + During the load process a package sequentially imports all of its dependencies, not just its direct dependencies. ```julia-repl julia> @time_imports using CSV - 0.4 ms ┌ IteratorInterfaceExtensions - 11.1 ms ┌ TableTraits 84.88% compilation time - 145.4 ms ┌ SentinelArrays 66.73% compilation time - 42.3 ms ┌ Parsers 19.66% compilation time - 4.1 ms ┌ Compat - 8.2 ms ┌ OrderedCollections - 1.4 ms ┌ Zlib_jll - 2.3 ms ┌ TranscodingStreams - 6.1 ms ┌ CodecZlib - 0.3 ms ┌ DataValueInterfaces - 15.2 ms ┌ FilePathsBase 30.06% compilation time - 9.3 ms ┌ InlineStrings - 1.5 ms ┌ DataAPI - 31.4 ms ┌ WeakRefStrings - 14.8 ms ┌ Tables - 24.2 ms ┌ PooledArrays - 2002.4 ms CSV 83.49% compilation time + 50.7 ms Parsers 17.52% compilation time + 0.2 ms DataValueInterfaces + 1.6 ms DataAPI + 0.1 ms IteratorInterfaceExtensions + 0.1 ms TableTraits + 17.5 ms Tables + 26.8 ms PooledArrays + 193.7 ms SentinelArrays 75.12% compilation time + 8.6 ms InlineStrings + 20.3 ms WeakRefStrings + 2.0 ms TranscodingStreams + 1.4 ms Zlib_jll + 1.8 ms CodecZlib + 0.8 ms Compat + 13.1 ms FilePathsBase 28.39% compilation time + 1681.2 ms CSV 92.40% compilation time ``` -!!! note - During the load process a package sequentially imports where necessary all of its dependencies, not just - its direct dependencies. That is also true for the dependencies themselves so nested importing will likely - occur, but not always. Therefore the nesting shown in this output report is not equivalent to the dependency - tree, but does indicate where import time has accumulated. +!!! compat "Julia 1.8" + This macro requires at least Julia 1.8 """ :@time_imports From 169567d6dd9a0b994fa4cf4db5bd956e844713cf Mon Sep 17 00:00:00 2001 From: N5N3 <2642243996@qq.com> Date: Wed, 20 Jul 2022 16:04:46 +0800 Subject: [PATCH 18/44] Fix fast path for `strides(::ReinterpretArray)` with dense parent. (#46114) (cherry picked from commit 017228af116f2565b1d6687b018ec65235dc71de) --- base/reinterpretarray.jl | 2 +- test/abstractarray.jl | 3 +++ test/reinterpretarray.jl | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/base/reinterpretarray.jl b/base/reinterpretarray.jl index 7ca50f9e2859e..d0e559f60f657 100644 --- a/base/reinterpretarray.jl +++ b/base/reinterpretarray.jl @@ -153,7 +153,7 @@ stride(A::Union{DenseArray,StridedReshapedArray,StridedReinterpretArray}, k::Int k ≤ ndims(A) ? strides(A)[k] : length(A) function strides(a::ReinterpretArray{T,<:Any,S,<:AbstractArray{S},IsReshaped}) where {T,S,IsReshaped} - _checkcontiguous(Bool, a) && return size_to_strides(1, size(a)) + _checkcontiguous(Bool, a) && return size_to_strides(1, size(a)...) stp = strides(parent(a)) els, elp = sizeof(T), sizeof(S) els == elp && return stp # 0dim parent is also handled here. diff --git a/test/abstractarray.jl b/test/abstractarray.jl index 43f4223affe62..c811f0d11176f 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -1615,6 +1615,9 @@ Base.size(::FakeZeroDimArray) = () # Zero dimensional parent a = reshape(FakeZeroDimArray(),1,1,1) @test @inferred(strides(a)) == (1, 1, 1) + # Dense parent (but not StridedArray) + A = reinterpret(Int8, reinterpret(reshape, Int16, rand(Int8, 2, 3, 3))) + @test check_strides(reshape(A, 3, 2, 3)) end @testset "stride for 0 dims array #44087" begin diff --git a/test/reinterpretarray.jl b/test/reinterpretarray.jl index bc3ffa63b0b0c..5d7f87fdbdee7 100644 --- a/test/reinterpretarray.jl +++ b/test/reinterpretarray.jl @@ -197,6 +197,9 @@ end end @test check_strides(reinterpret(Float32, view(A, 8:-1:1, viewax2))) end + # issue 46113 + A = reinterpret(Int8, reinterpret(reshape, Int16, rand(Int8, 2, 3, 3))) + @test check_strides(A) end @testset "strides for ReshapedReinterpretArray" begin From bfc7e3e78befc1e3fb3412e540596f32f0af8a14 Mon Sep 17 00:00:00 2001 From: KristofferC Date: Wed, 20 Jul 2022 10:10:11 +0200 Subject: [PATCH 19/44] bump Pkg version to latest 1.8 --- .../Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/md5 | 1 + .../Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/sha512 | 1 + .../Pkg-f0bef8af0ab951d9cf3cceb3c709873737df9471.tar.gz/md5 | 1 - .../Pkg-f0bef8af0ab951d9cf3cceb3c709873737df9471.tar.gz/sha512 | 1 - stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/md5 create mode 100644 deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/sha512 delete mode 100644 deps/checksums/Pkg-f0bef8af0ab951d9cf3cceb3c709873737df9471.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-f0bef8af0ab951d9cf3cceb3c709873737df9471.tar.gz/sha512 diff --git a/deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/md5 b/deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/md5 new file mode 100644 index 0000000000000..713275d000c87 --- /dev/null +++ b/deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/md5 @@ -0,0 +1 @@ +505a28c1e9246f92d0440b7ed9599e27 diff --git a/deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/sha512 b/deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/sha512 new file mode 100644 index 0000000000000..61c1603670788 --- /dev/null +++ b/deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/sha512 @@ -0,0 +1 @@ +67d76980cc5430274bc7c1d5c1de4cc163a1583bbd373e074fc15296481e8bc202f7a4b77af6fd32677a974e9ad5d65dcfd72d74bf0ff657d4cee067eba595f0 diff --git a/deps/checksums/Pkg-f0bef8af0ab951d9cf3cceb3c709873737df9471.tar.gz/md5 b/deps/checksums/Pkg-f0bef8af0ab951d9cf3cceb3c709873737df9471.tar.gz/md5 deleted file mode 100644 index 86b193c4518a1..0000000000000 --- a/deps/checksums/Pkg-f0bef8af0ab951d9cf3cceb3c709873737df9471.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -e02bd98209effd4e05361f29e0a4abbc diff --git a/deps/checksums/Pkg-f0bef8af0ab951d9cf3cceb3c709873737df9471.tar.gz/sha512 b/deps/checksums/Pkg-f0bef8af0ab951d9cf3cceb3c709873737df9471.tar.gz/sha512 deleted file mode 100644 index 59d2f75ab089f..0000000000000 --- a/deps/checksums/Pkg-f0bef8af0ab951d9cf3cceb3c709873737df9471.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -983ebbd8531dbccd12f757d4b79bee75a0f8cbeba5d8cdea9ecd945dc3c53cccfe68691952187736a00fb49d368239daa7b43e918809b61d5f6b91dbb7be9aac diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index abaf21b3b6ba3..06c1c50590065 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,4 +1,4 @@ PKG_BRANCH = master -PKG_SHA1 = f0bef8af0ab951d9cf3cceb3c709873737df9471 +PKG_SHA1 = 57ca49fcbb45b578b78ac77a702913b5e2de7c7c PKG_GIT_URL := https://github.com/JuliaLang/Pkg.jl.git PKG_TAR_URL = https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/$1 From 1549064fb37d9c810262c271bd5ba280db4886e9 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Wed, 20 Jul 2022 10:08:27 +0200 Subject: [PATCH 20/44] Specialize tuple setindex to avoid ntuple-related performance regression. (#46050) (cherry picked from commit d7c56ba30594a7752be75203237ac0daaf65c94a) --- base/tuple.jl | 4 ++-- test/tuple.jl | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/base/tuple.jl b/base/tuple.jl index 3b5142d03039d..21676877d0426 100644 --- a/base/tuple.jl +++ b/base/tuple.jl @@ -55,9 +55,9 @@ function setindex(x::Tuple, v, i::Integer) _setindex(v, i, x...) end -function _setindex(v, i::Integer, args...) +function _setindex(v, i::Integer, args::Vararg{Any,N}) where {N} @inline - return ntuple(j -> ifelse(j == i, v, args[j]), length(args)) + return ntuple(j -> ifelse(j == i, v, args[j]), Val{N}()) end diff --git a/test/tuple.jl b/test/tuple.jl index f3b82de733f16..1b539ea2e6766 100644 --- a/test/tuple.jl +++ b/test/tuple.jl @@ -710,3 +710,6 @@ g42457(a, b) = Base.isequal(a, b) ? 1 : 2.0 @test only(Base.return_types(g42457, (NTuple{3, Int}, Tuple))) === Union{Float64, Int} @test only(Base.return_types(g42457, (NTuple{3, Int}, NTuple))) === Union{Float64, Int} @test only(Base.return_types(g42457, (NTuple{3, Int}, NTuple{4}))) === Float64 + +# issue #46049: setindex(::Tuple) regression +@inferred Base.setindex((1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16), 42, 1) From f3bc6bf09e1dd98a449b419bb121be18c3c56656 Mon Sep 17 00:00:00 2001 From: Chris Elrod Date: Wed, 20 Jul 2022 04:16:13 -0400 Subject: [PATCH 21/44] Use `max(1, Sys.CPU_THREADS)` BLAS threads for apple `aarch64`. (#46085) (cherry picked from commit 97df6db548520227a9585e69a7bff8d6583af183) --- stdlib/LinearAlgebra/src/LinearAlgebra.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stdlib/LinearAlgebra/src/LinearAlgebra.jl b/stdlib/LinearAlgebra/src/LinearAlgebra.jl index e8c2de0ac056a..86e07e118c708 100644 --- a/stdlib/LinearAlgebra/src/LinearAlgebra.jl +++ b/stdlib/LinearAlgebra/src/LinearAlgebra.jl @@ -583,7 +583,11 @@ function __init__() Base.at_disable_library_threading(() -> BLAS.set_num_threads(1)) if !haskey(ENV, "OPENBLAS_NUM_THREADS") - BLAS.set_num_threads(max(1, Sys.CPU_THREADS ÷ 2)) + @static if Sys.isapple() && Base.BinaryPlatforms.arch(Base.BinaryPlatforms.HostPlatform()) == "aarch64" + BLAS.set_num_threads(max(1, Sys.CPU_THREADS)) + else + BLAS.set_num_threads(max(1, Sys.CPU_THREADS ÷ 2)) + end end end From a382f32daf1c4be75b3be0aca70795a228da160a Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Tue, 12 Apr 2022 05:59:32 -0700 Subject: [PATCH 22/44] Make gcd/lcm effect-free by using LazyString (#44935) --- base/checked.jl | 9 +++++---- base/intfuncs.jl | 3 ++- test/intfuncs.jl | 7 +++++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/base/checked.jl b/base/checked.jl index ad92a44e1e5bc..1f9e319f50fbd 100644 --- a/base/checked.jl +++ b/base/checked.jl @@ -115,9 +115,10 @@ function checked_abs end function checked_abs(x::SignedInt) r = ifelse(x<0, -x, x) - r<0 && throw(OverflowError(string("checked arithmetic: cannot compute |x| for x = ", x, "::", typeof(x)))) - r - end + r<0 || return r + msg = LazyString("checked arithmetic: cannot compute |x| for x = ", x, "::", typeof(x)) + throw(OverflowError(msg)) +end checked_abs(x::UnsignedInt) = x checked_abs(x::Bool) = x @@ -151,7 +152,7 @@ end throw_overflowerr_binaryop(op, x, y) = (@noinline; - throw(OverflowError(Base.invokelatest(string, x, " ", op, " ", y, " overflowed for type ", typeof(x))))) + throw(OverflowError(LazyString(x, " ", op, " ", y, " overflowed for type ", typeof(x))))) """ Base.checked_add(x, y) diff --git a/base/intfuncs.jl b/base/intfuncs.jl index 44c7be0626126..076f8b288ee55 100644 --- a/base/intfuncs.jl +++ b/base/intfuncs.jl @@ -54,7 +54,8 @@ function gcd(a::T, b::T) where T<:BitInteger signbit(r) && __throw_gcd_overflow(a, b) return r end -@noinline __throw_gcd_overflow(a, b) = throw(OverflowError("gcd($a, $b) overflows")) +@noinline __throw_gcd_overflow(a, b) = + throw(OverflowError(LazyString("gcd(", a, ", ", b, ") overflows"))) # binary GCD (aka Stein's) algorithm # about 1.7x (2.1x) faster for random Int64s (Int128s) diff --git a/test/intfuncs.jl b/test/intfuncs.jl index 4fc21c3bcf1b2..cf7ae89ea1dd7 100644 --- a/test/intfuncs.jl +++ b/test/intfuncs.jl @@ -2,6 +2,8 @@ using Random +is_effect_free(args...) = Core.Compiler.is_effect_free(Base.infer_effects(args...)) + @testset "gcd/lcm" begin # All Integer data types take different code paths -- test all # TODO: Test gcd and lcm for BigInt. @@ -146,6 +148,11 @@ using Random @test gcd(0xf, 20) == 5 @test gcd(UInt32(6), Int8(-50)) == 2 @test gcd(typemax(UInt), -16) == 1 + + @testset "effects" begin + @test is_effect_free(gcd, Tuple{Int,Int}) + @test is_effect_free(lcm, Tuple{Int,Int}) + end end @testset "gcd/lcm for arrays" begin From 8dc9f5887996f23520c50710369c9b7d3fbb4f51 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Fri, 18 Mar 2022 20:37:25 -0400 Subject: [PATCH 23/44] Fix return_type model when run in toplevel context (#44670) Fixes the test failure observed in #44652. --- base/compiler/abstractinterpretation.jl | 1 + base/compiler/inferencestate.jl | 6 +++++- base/compiler/tfuncs.jl | 6 ++++++ base/compiler/types.jl | 2 +- test/compiler/inference.jl | 7 +++++++ 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index ca68fca8f9be6..dd4fa27e342b1 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -644,6 +644,7 @@ function abstract_call_method(interp::AbstractInterpreter, method::Method, @nosp if edge === nothing edgecycle = edgelimited = true end + # we look for the termination effect override here as well, since the :terminates effect # may have been tainted due to recursion at this point even if it's overridden if is_effect_overridden(sv, :terminates_globally) diff --git a/base/compiler/inferencestate.jl b/base/compiler/inferencestate.jl index c920a0a64e17f..c4415ec788100 100644 --- a/base/compiler/inferencestate.jl +++ b/base/compiler/inferencestate.jl @@ -59,6 +59,10 @@ mutable struct InferenceState inferred::Bool dont_work_on_me::Bool + # Whether to restrict inference of abstract call sites to avoid excessive work + # Set by default for toplevel frame. + restrict_abstract_call_sites::Bool + # Inferred purity flags ipo_effects::Effects @@ -133,7 +137,7 @@ mutable struct InferenceState #=callers_in_cycle=#Vector{InferenceState}(), #=parent=#nothing, #=cached=#cache === :global, - #=inferred=#false, #=dont_work_on_me=#false, + #=inferred=#false, #=dont_work_on_me=#false, #=restrict_abstract_call_sites=# isa(linfo.def, Module), #=ipo_effects=#Effects(EFFECTS_TOTAL; consistent, inbounds_taints_consistency), interp) result.result = frame diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index c188d3e24e143..46075d7008881 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -1993,7 +1993,13 @@ function return_type_tfunc(interp::AbstractInterpreter, argtypes::Vector{Any}, s if contains_is(argtypes_vec, Union{}) return CallMeta(Const(Union{}), false) end + # Run the abstract_call without restricting abstract call + # sites. Otherwise, our behavior model of abstract_call + # below will be wrong. + old_restrict = sv.restrict_abstract_call_sites + sv.restrict_abstract_call_sites = false call = abstract_call(interp, ArgInfo(nothing, argtypes_vec), sv, -1) + sv.restrict_abstract_call_sites = old_restrict info = verbose_stmt_info(interp) ? ReturnTypeCallInfo(call.info) : false rt = widenconditional(call.rt) if isa(rt, Const) diff --git a/base/compiler/types.jl b/base/compiler/types.jl index 8893866822102..a0884bd86d1d3 100644 --- a/base/compiler/types.jl +++ b/base/compiler/types.jl @@ -407,7 +407,7 @@ It also bails out from local statement/frame inference when any lattice element but `AbstractInterpreter` doesn't provide a specific interface for configuring it. """ bail_out_toplevel_call(::AbstractInterpreter, @nospecialize(callsig), sv#=::InferenceState=#) = - return isa(sv.linfo.def, Module) && !isdispatchtuple(callsig) + return sv.restrict_abstract_call_sites && !isdispatchtuple(callsig) bail_out_call(::AbstractInterpreter, @nospecialize(rt), sv#=::InferenceState=#) = return rt === Any bail_out_apply(::AbstractInterpreter, @nospecialize(rt), sv#=::InferenceState=#) = diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index 7e1ea8f84b271..9ed5234107e8e 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -4108,3 +4108,10 @@ end |> !Core.Compiler.is_foldable @test !fully_eliminated() do entry_to_be_invalidated('a') end + +# Make sure return_type_tfunc doesn't accidentally cause bad inference if used +# at top level. +@test let + Base.Experimental.@force_compile + Core.Compiler.return_type(+, NTuple{2, Rational}) +end == Rational From 1110f2b3ba479740b6bac6558530798d9e60da74 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Mon, 16 May 2022 00:56:16 -0400 Subject: [PATCH 24/44] Merge pull request #45299 from JuliaLang/kf/rt_effect_free Fix effects modeling for return_type --- base/compiler/abstractinterpretation.jl | 114 ++++++++++++------------ base/compiler/optimize.jl | 1 - base/compiler/ssair/inlining.jl | 3 - base/compiler/stmtinfo.jl | 3 +- base/compiler/tfuncs.jl | 26 +++--- test/compiler/inline.jl | 20 +++++ 6 files changed, 93 insertions(+), 74 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index dd4fa27e342b1..4feba83574a8e 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -55,8 +55,8 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(f), # At this point we are guaranteed to end up throwing on this path, # which is all that's required for :consistent-cy. Of course, we don't # know anything else about this statement. - tristate_merge!(sv, Effects(; consistent=ALWAYS_TRUE, nonoverlayed)) - return CallMeta(Any, false) + effects = Effects(; consistent=ALWAYS_TRUE, nonoverlayed) + return CallMeta(Any, effects, false) end argtypes = arginfo.argtypes @@ -64,8 +64,7 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(f), InferenceParams(interp).MAX_UNION_SPLITTING, max_methods) if isa(matches, FailedMethodMatch) add_remark!(interp, sv, matches.reason) - tristate_merge!(sv, Effects()) - return CallMeta(Any, false) + return CallMeta(Any, Effects(), false) end (; valid_worlds, applicable, info) = matches @@ -89,7 +88,7 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(f), # try pure-evaluation val = pure_eval_call(interp, f, applicable, arginfo, sv) - val !== nothing && return CallMeta(val, MethodResultPure(info)) # TODO: add some sort of edge(s) + val !== nothing && return CallMeta(val, all_effects, MethodResultPure(info)) # TODO: add some sort of edge(s) for i in 1:napplicable match = applicable[i]::MethodMatch @@ -232,8 +231,7 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(f), delete!(sv.pclimitations, caller) end end - tristate_merge!(sv, all_effects) - return CallMeta(rettype, info) + return CallMeta(rettype, all_effects, info) end struct FailedMethodMatch @@ -1160,7 +1158,7 @@ function abstract_iteration(interp::AbstractInterpreter, @nospecialize(itft), @n # WARNING: Changes to the iteration protocol must be reflected here, # this is not just an optimization. # TODO: this doesn't realize that Array, SimpleVector, Tuple, and NamedTuple do not use the iterate protocol - stateordonet === Bottom && return Any[Bottom], AbstractIterationInfo(CallMeta[CallMeta(Bottom, info)]) + stateordonet === Bottom && return Any[Bottom], AbstractIterationInfo(CallMeta[CallMeta(Bottom, call.effects, info)]) valtype = statetype = Bottom ret = Any[] calls = CallMeta[call] @@ -1236,16 +1234,15 @@ function abstract_apply(interp::AbstractInterpreter, argtypes::Vector{Any}, sv:: max_methods::Int = get_max_methods(sv.mod, interp)) itft = argtype_by_index(argtypes, 2) aft = argtype_by_index(argtypes, 3) - (itft === Bottom || aft === Bottom) && return CallMeta(Bottom, false) + (itft === Bottom || aft === Bottom) && return CallMeta(Bottom, EFFECTS_THROWS, false) aargtypes = argtype_tail(argtypes, 4) aftw = widenconst(aft) if !isa(aft, Const) && !isa(aft, PartialOpaque) && (!isType(aftw) || has_free_typevars(aftw)) if !isconcretetype(aftw) || (aftw <: Builtin) add_remark!(interp, sv, "Core._apply_iterate called on a function of a non-concrete type") - tristate_merge!(sv, Effects()) # bail now, since it seems unlikely that abstract_call will be able to do any better after splitting # this also ensures we don't call abstract_call_gf_by_type below on an IntrinsicFunction or Builtin - return CallMeta(Any, false) + return CallMeta(Any, Effects(), false) end end res = Union{} @@ -1253,6 +1250,7 @@ function abstract_apply(interp::AbstractInterpreter, argtypes::Vector{Any}, sv:: splitunions = 1 < unionsplitcost(aargtypes) <= InferenceParams(interp).MAX_APPLY_UNION_ENUM ctypes = [Any[aft]] infos = Vector{MaybeAbstractIterationInfo}[MaybeAbstractIterationInfo[]] + effects = EFFECTS_TOTAL for i = 1:nargs ctypes´ = Vector{Any}[] infos′ = Vector{MaybeAbstractIterationInfo}[] @@ -1315,6 +1313,7 @@ function abstract_apply(interp::AbstractInterpreter, argtypes::Vector{Any}, sv:: call = abstract_call(interp, ArgInfo(nothing, ct), sv, max_methods) push!(retinfos, ApplyCallInfo(call.info, arginfo)) res = tmerge(res, call.rt) + effects = tristate_merge(effects, call.effects) if bail_out_apply(interp, res, sv) if i != length(ctypes) # No point carrying forward the info, we're not gonna inline it anyway @@ -1325,7 +1324,7 @@ function abstract_apply(interp::AbstractInterpreter, argtypes::Vector{Any}, sv:: end # TODO: Add a special info type to capture all the iteration info. # For now, only propagate info if we don't also union-split the iteration - return CallMeta(res, retinfo) + return CallMeta(res, effects, retinfo) end function argtype_by_index(argtypes::Vector{Any}, i::Int) @@ -1506,21 +1505,21 @@ end function abstract_invoke(interp::AbstractInterpreter, (; fargs, argtypes)::ArgInfo, sv::InferenceState) ft′ = argtype_by_index(argtypes, 2) ft = widenconst(ft′) - ft === Bottom && return CallMeta(Bottom, false), EFFECTS_THROWS + ft === Bottom && return CallMeta(Bottom, EFFECTS_THROWS, false) (types, isexact, isconcrete, istype) = instanceof_tfunc(argtype_by_index(argtypes, 3)) - types === Bottom && return CallMeta(Bottom, false), EFFECTS_THROWS - isexact || return CallMeta(Any, false), Effects() + types === Bottom && return CallMeta(Bottom, EFFECTS_THROWS, false) + isexact || return CallMeta(Any, Effects(), false) argtype = argtypes_to_type(argtype_tail(argtypes, 4)) nargtype = typeintersect(types, argtype) - nargtype === Bottom && return CallMeta(Bottom, false), EFFECTS_THROWS - nargtype isa DataType || return CallMeta(Any, false), Effects() # other cases are not implemented below - isdispatchelem(ft) || return CallMeta(Any, false), Effects() # check that we might not have a subtype of `ft` at runtime, before doing supertype lookup below + nargtype === Bottom && return CallMeta(Bottom, EFFECTS_THROWS, false) + nargtype isa DataType || return CallMeta(Any, Effects(), false) # other cases are not implemented below + isdispatchelem(ft) || return CallMeta(Any, Effects(), false) # check that we might not have a subtype of `ft` at runtime, before doing supertype lookup below ft = ft::DataType types = rewrap_unionall(Tuple{ft, unwrap_unionall(types).parameters...}, types)::Type nargtype = Tuple{ft, nargtype.parameters...} argtype = Tuple{ft, argtype.parameters...} match, valid_worlds, overlayed = findsup(types, method_table(interp)) - match === nothing && return CallMeta(Any, false), Effects() + match === nothing && return CallMeta(Any, Effects(), false) update_valid_age!(sv, valid_worlds) method = match.method (ti, env::SimpleVector) = ccall(:jl_type_intersection_with_env, Any, (Any, Any), nargtype, method.sig)::SimpleVector @@ -1547,7 +1546,7 @@ function abstract_invoke(interp::AbstractInterpreter, (; fargs, argtypes)::ArgIn end end effects = Effects(effects; nonoverlayed=!overlayed) - return CallMeta(from_interprocedural!(rt, sv, arginfo, sig), InvokeCallInfo(match, const_result)), effects + return CallMeta(from_interprocedural!(rt, sv, arginfo, sig), effects, InvokeCallInfo(match, const_result)) end function invoke_rewrite(xs::Vector{Any}) @@ -1568,37 +1567,30 @@ function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f), if f === _apply_iterate return abstract_apply(interp, argtypes, sv, max_methods) elseif f === invoke - call, effects = abstract_invoke(interp, arginfo, sv) - tristate_merge!(sv, effects) - return call + return abstract_invoke(interp, arginfo, sv) elseif f === modifyfield! - tristate_merge!(sv, Effects()) # TODO return abstract_modifyfield!(interp, argtypes, sv) end rt = abstract_call_builtin(interp, f, arginfo, sv, max_methods) - tristate_merge!(sv, builtin_effects(f, argtypes, rt)) - return CallMeta(rt, false) + return CallMeta(rt, builtin_effects(f, argtypes, rt), false) elseif isa(f, Core.OpaqueClosure) # calling an OpaqueClosure about which we have no information returns no information - tristate_merge!(sv, Effects()) - return CallMeta(Any, false) + return CallMeta(Any, Effects(), false) elseif f === Core.kwfunc if la == 2 aty = argtypes[2] if !isvarargtype(aty) ft = widenconst(aty) if isa(ft, DataType) && isdefined(ft.name, :mt) && isdefined(ft.name.mt, :kwsorter) - return CallMeta(Const(ft.name.mt.kwsorter), MethodResultPure()) + return CallMeta(Const(ft.name.mt.kwsorter), EFFECTS_TOTAL, MethodResultPure()) end end end - tristate_merge!(sv, EFFECTS_UNKNOWN) # TODO - return CallMeta(Any, false) + return CallMeta(Any, EFFECTS_UNKNOWN, false) elseif f === TypeVar # Manually look through the definition of TypeVar to # make sure to be able to get `PartialTypeVar`s out. - tristate_merge!(sv, EFFECTS_UNKNOWN) # TODO - (la < 2 || la > 4) && return CallMeta(Union{}, false) + (la < 2 || la > 4) && return CallMeta(Union{}, EFFECTS_UNKNOWN, false) n = argtypes[2] ub_var = Const(Any) lb_var = Const(Union{}) @@ -1608,36 +1600,33 @@ function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f), elseif la == 3 ub_var = argtypes[3] end - return CallMeta(typevar_tfunc(n, lb_var, ub_var), false) + return CallMeta(typevar_tfunc(n, lb_var, ub_var), EFFECTS_UNKNOWN, false) elseif f === UnionAll - tristate_merge!(sv, EFFECTS_UNKNOWN) # TODO - return CallMeta(abstract_call_unionall(argtypes), false) + return CallMeta(abstract_call_unionall(argtypes), EFFECTS_UNKNOWN, false) elseif f === Tuple && la == 2 - tristate_merge!(sv, EFFECTS_UNKNOWN) # TODO aty = argtypes[2] ty = isvarargtype(aty) ? unwrapva(aty) : widenconst(aty) if !isconcretetype(ty) - return CallMeta(Tuple, false) + return CallMeta(Tuple, EFFECTS_UNKNOWN, false) end elseif is_return_type(f) - tristate_merge!(sv, EFFECTS_UNKNOWN) # TODO return return_type_tfunc(interp, argtypes, sv) elseif la == 2 && istopfunction(f, :!) # handle Conditional propagation through !Bool aty = argtypes[2] if isa(aty, Conditional) call = abstract_call_gf_by_type(interp, f, ArgInfo(fargs, Any[Const(f), Bool]), Tuple{typeof(f), Bool}, sv, max_methods) # make sure we've inferred `!(::Bool)` - return CallMeta(Conditional(aty.var, aty.elsetype, aty.vtype), call.info) + return CallMeta(Conditional(aty.var, aty.elsetype, aty.vtype), call.effects, call.info) end elseif la == 3 && istopfunction(f, :!==) # mark !== as exactly a negated call to === rty = abstract_call_known(interp, (===), arginfo, sv, max_methods).rt if isa(rty, Conditional) - return CallMeta(Conditional(rty.var, rty.elsetype, rty.vtype), false) # swap if-else + return CallMeta(Conditional(rty.var, rty.elsetype, rty.vtype), EFFECTS_TOTAL, false) # swap if-else elseif isa(rty, Const) - return CallMeta(Const(rty.val === false), MethodResultPure()) + return CallMeta(Const(rty.val === false), EFFECTS_TOTAL, MethodResultPure()) end - return CallMeta(rty, false) + return CallMeta(rty, EFFECTS_TOTAL, false) elseif la == 3 && istopfunction(f, :(>:)) # mark issupertype as a exact alias for issubtype # swap T1 and T2 arguments and call <: @@ -1647,28 +1636,28 @@ function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f), fargs = nothing end argtypes = Any[typeof(<:), argtypes[3], argtypes[2]] - return CallMeta(abstract_call_known(interp, <:, ArgInfo(fargs, argtypes), sv, max_methods).rt, false) + return CallMeta(abstract_call_known(interp, <:, ArgInfo(fargs, argtypes), sv, max_methods).rt, EFFECTS_TOTAL, false) elseif la == 2 && (a2 = argtypes[2]; isa(a2, Const)) && (svecval = a2.val; isa(svecval, SimpleVector)) && istopfunction(f, :length) # mark length(::SimpleVector) as @pure - return CallMeta(Const(length(svecval)), MethodResultPure()) + return CallMeta(Const(length(svecval)), EFFECTS_TOTAL, MethodResultPure()) elseif la == 3 && (a2 = argtypes[2]; isa(a2, Const)) && (svecval = a2.val; isa(svecval, SimpleVector)) && (a3 = argtypes[3]; isa(a3, Const)) && (idx = a3.val; isa(idx, Int)) && istopfunction(f, :getindex) # mark getindex(::SimpleVector, i::Int) as @pure if 1 <= idx <= length(svecval) && isassigned(svecval, idx) - return CallMeta(Const(getindex(svecval, idx)), MethodResultPure()) + return CallMeta(Const(getindex(svecval, idx)), EFFECTS_TOTAL, MethodResultPure()) end elseif la == 2 && istopfunction(f, :typename) - return CallMeta(typename_static(argtypes[2]), MethodResultPure()) + return CallMeta(typename_static(argtypes[2]), EFFECTS_TOTAL, MethodResultPure()) elseif max_methods > 1 && istopfunction(f, :copyto!) max_methods = 1 elseif la == 3 && istopfunction(f, :typejoin) if is_all_const_arg(arginfo) val = _pure_eval_call(f, arginfo) - return CallMeta(val === nothing ? Type : val, MethodResultPure()) + return CallMeta(val === nothing ? Type : val, EFFECTS_TOTAL, MethodResultPure()) end end atype = argtypes_to_type(argtypes) @@ -1677,7 +1666,7 @@ end function abstract_call_opaque_closure(interp::AbstractInterpreter, closure::PartialOpaque, arginfo::ArgInfo, sv::InferenceState) sig = argtypes_to_type(arginfo.argtypes) - (; rt, edge) = result = abstract_call_method(interp, closure.source, sig, Core.svec(), false, sv) + (; rt, edge, edge_effects) = result = abstract_call_method(interp, closure.source, sig, Core.svec(), false, sv) edge !== nothing && add_backedge!(edge, sv) tt = closure.typ sigT = (unwrap_unionall(tt)::DataType).parameters[1] @@ -1693,7 +1682,7 @@ function abstract_call_opaque_closure(interp::AbstractInterpreter, closure::Part end end info = OpaqueClosureCallInfo(match, const_result) - return CallMeta(from_interprocedural!(rt, sv, arginfo, match.spec_types), info) + return CallMeta(from_interprocedural!(rt, sv, arginfo, match.spec_types), edge_effects, info) end function most_general_argtypes(closure::PartialOpaque) @@ -1715,18 +1704,30 @@ function abstract_call(interp::AbstractInterpreter, arginfo::ArgInfo, if isa(ft, PartialOpaque) newargtypes = copy(argtypes) newargtypes[1] = ft.env - tristate_merge!(sv, Effects()) # TODO - return abstract_call_opaque_closure(interp, ft, ArgInfo(arginfo.fargs, newargtypes), sv) + body_call = abstract_call_opaque_closure(interp, ft, ArgInfo(arginfo.fargs, newargtypes), sv) + # Analyze implicit type asserts on argument and return type + ftt = ft.typ + (at, rt) = unwrap_unionall(ftt).parameters + if isa(rt, TypeVar) + rt = rewrap_unionall(rt.lb, ftt) + else + rt = rewrap_unionall(rt, ftt) + end + nothrow = body_call.rt ⊑ rt + if nothrow + nothrow = tuple_tfunc(newargtypes[2:end]) ⊑ rewrap_unionall(at, ftt) + end + return CallMeta(body_call.rt, Effects(body_call.effects, + nothrow = nothrow ? TRISTATE_UNKNOWN : body_call.effects.nothrow), + body_call.info) elseif (uft = unwrap_unionall(widenconst(ft)); isa(uft, DataType) && uft.name === typename(Core.OpaqueClosure)) - tristate_merge!(sv, Effects()) # TODO - return CallMeta(rewrap_unionall((uft::DataType).parameters[2], widenconst(ft)), false) + return CallMeta(rewrap_unionall((uft::DataType).parameters[2], widenconst(ft)), Effects(), false) elseif f === nothing # non-constant function, but the number of arguments is known # and the ft is not a Builtin or IntrinsicFunction if hasintersect(widenconst(ft), Union{Builtin, Core.OpaqueClosure}) - tristate_merge!(sv, Effects()) add_remark!(interp, sv, "Could not identify method table for call") - return CallMeta(Any, false) + return CallMeta(Any, Effects(), false) end return abstract_call_gf_by_type(interp, nothing, arginfo, argtypes_to_type(argtypes), sv, max_methods) end @@ -1852,6 +1853,7 @@ function abstract_eval_statement(interp::AbstractInterpreter, @nospecialize(e), t = Bottom else callinfo = abstract_call(interp, ArgInfo(ea, argtypes), sv) + tristate_merge!(sv, callinfo.effects) sv.stmt_info[sv.currpc] = callinfo.info t = callinfo.rt end diff --git a/base/compiler/optimize.jl b/base/compiler/optimize.jl index cd27dbb01b625..3c975b04146fa 100644 --- a/base/compiler/optimize.jl +++ b/base/compiler/optimize.jl @@ -202,7 +202,6 @@ function stmt_effect_free(@nospecialize(stmt), @nospecialize(rt), src::Union{IRC f = argextype(args[1], src) f = singleton_type(f) f === nothing && return false - is_return_type(f) && return true if isa(f, IntrinsicFunction) intrinsic_effect_free_if_nothrow(f) || return false return intrinsic_nothrow(f, diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl index db2a6b1d33db3..e51581e62569d 100644 --- a/base/compiler/ssair/inlining.jl +++ b/base/compiler/ssair/inlining.jl @@ -1166,9 +1166,6 @@ function process_simple!(ir::IRCode, idx::Int, state::InliningState, todo::Vecto ir[SSAValue(idx)][:inst] = lateres.val check_effect_free!(ir, idx, lateres.val, rt) return nothing - elseif is_return_type(sig.f) - check_effect_free!(ir, idx, stmt, rt) - return nothing end return stmt, sig diff --git a/base/compiler/stmtinfo.jl b/base/compiler/stmtinfo.jl index 3eeff0c2c86a8..bce7d7425ca23 100644 --- a/base/compiler/stmtinfo.jl +++ b/base/compiler/stmtinfo.jl @@ -10,6 +10,7 @@ and any additional information (`call.info`) for a given generic call. """ struct CallMeta rt::Any + effects::Effects info::Any end @@ -75,7 +76,7 @@ effect-free, including being no-throw (typically because the value was computed by calling an `@pure` function). """ struct MethodResultPure - info::Union{MethodMatchInfo,UnionSplitInfo,Bool} + info::Any end let instance = MethodResultPure(false) global MethodResultPure diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index 46075d7008881..2411fc0514b80 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -1010,10 +1010,10 @@ end function abstract_modifyfield!(interp::AbstractInterpreter, argtypes::Vector{Any}, sv::InferenceState) nargs = length(argtypes) if !isempty(argtypes) && isvarargtype(argtypes[nargs]) - nargs - 1 <= 6 || return CallMeta(Bottom, false) - nargs > 3 || return CallMeta(Any, false) + nargs - 1 <= 6 || return CallMeta(Bottom, EFFECTS_THROWS, false) + nargs > 3 || return CallMeta(Any, EFFECTS_UNKNOWN, false) else - 5 <= nargs <= 6 || return CallMeta(Bottom, false) + 5 <= nargs <= 6 || return CallMeta(Bottom, EFFECTS_THROWS, false) end o = unwrapva(argtypes[2]) f = unwrapva(argtypes[3]) @@ -1036,7 +1036,7 @@ function abstract_modifyfield!(interp::AbstractInterpreter, argtypes::Vector{Any end info = callinfo.info end - return CallMeta(RT, info) + return CallMeta(RT, Effects(), info) end replacefield!_tfunc(o, f, x, v, success_order, failure_order) = (@nospecialize; replacefield!_tfunc(o, f, x, v)) replacefield!_tfunc(o, f, x, v, success_order) = (@nospecialize; replacefield!_tfunc(o, f, x, v)) @@ -1991,7 +1991,7 @@ function return_type_tfunc(interp::AbstractInterpreter, argtypes::Vector{Any}, s if isa(af_argtype, DataType) && af_argtype <: Tuple argtypes_vec = Any[aft, af_argtype.parameters...] if contains_is(argtypes_vec, Union{}) - return CallMeta(Const(Union{}), false) + return CallMeta(Const(Union{}), EFFECTS_TOTAL, false) end # Run the abstract_call without restricting abstract call # sites. Otherwise, our behavior model of abstract_call @@ -2000,36 +2000,36 @@ function return_type_tfunc(interp::AbstractInterpreter, argtypes::Vector{Any}, s sv.restrict_abstract_call_sites = false call = abstract_call(interp, ArgInfo(nothing, argtypes_vec), sv, -1) sv.restrict_abstract_call_sites = old_restrict - info = verbose_stmt_info(interp) ? ReturnTypeCallInfo(call.info) : false + info = verbose_stmt_info(interp) ? MethodResultPure(ReturnTypeCallInfo(call.info)) : MethodResultPure() rt = widenconditional(call.rt) if isa(rt, Const) # output was computed to be constant - return CallMeta(Const(typeof(rt.val)), info) + return CallMeta(Const(typeof(rt.val)), EFFECTS_TOTAL, info) end rt = widenconst(rt) if rt === Bottom || (isconcretetype(rt) && !iskindtype(rt)) # output cannot be improved so it is known for certain - return CallMeta(Const(rt), info) + return CallMeta(Const(rt), EFFECTS_TOTAL, info) elseif !isempty(sv.pclimitations) # conservatively express uncertainty of this result # in two ways: both as being a subtype of this, and # because of LimitedAccuracy causes - return CallMeta(Type{<:rt}, info) + return CallMeta(Type{<:rt}, EFFECTS_TOTAL, info) elseif (isa(tt, Const) || isconstType(tt)) && (isa(aft, Const) || isconstType(aft)) # input arguments were known for certain # XXX: this doesn't imply we know anything about rt - return CallMeta(Const(rt), info) + return CallMeta(Const(rt), EFFECTS_TOTAL, info) elseif isType(rt) - return CallMeta(Type{rt}, info) + return CallMeta(Type{rt}, EFFECTS_TOTAL, info) else - return CallMeta(Type{<:rt}, info) + return CallMeta(Type{<:rt}, EFFECTS_TOTAL, info) end end end end end - return CallMeta(Type, false) + return CallMeta(Type, EFFECTS_THROWS, false) end # N.B.: typename maps type equivalence classes to a single value diff --git a/test/compiler/inline.jl b/test/compiler/inline.jl index 8318b733727d7..dfcea14584713 100644 --- a/test/compiler/inline.jl +++ b/test/compiler/inline.jl @@ -1128,3 +1128,23 @@ end let src = code_typed1(f44200) @test count(x -> isa(x, Core.PiNode), src.code) == 0 end + +# Test that effect modeling for return_type doesn't incorrectly pick +# up the effects of the function being analyzed +function f_throws() + error() +end + +@noinline function return_type_unused(x) + Core.Compiler.return_type(f_throws, Tuple{}) + return x+1 +end + +@test fully_eliminated(Tuple{Int}) do x + return_type_unused(x) + return nothing +end + +# Test that inlining doesn't accidentally delete a bad return_type call +f_bad_return_type() = Core.Compiler.return_type(+, 1, 2) +@test_throws MethodError f_bad_return_type() From 55eb09d80676c177d46120f56127a368a5cf1952 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Sat, 11 Jun 2022 17:36:53 +0900 Subject: [PATCH 25/44] Merge pull request #45613 from JuliaLang/avi/concretemath improve concrete-foldability of core math functions --- base/intfuncs.jl | 28 ++++++++++++++-------------- base/special/exp.jl | 12 ++++++++---- base/special/log.jl | 28 +++++++++++++++++----------- base/special/rem_pio2.jl | 5 ++++- test/math.jl | 18 ++++++++++++++++++ 5 files changed, 61 insertions(+), 30 deletions(-) diff --git a/base/intfuncs.jl b/base/intfuncs.jl index 076f8b288ee55..a0a38003980a9 100644 --- a/base/intfuncs.jl +++ b/base/intfuncs.jl @@ -248,20 +248,20 @@ end # ^ for any x supporting * to_power_type(x) = convert(Base._return_type(*, Tuple{typeof(x), typeof(x)}), x) -@noinline throw_domerr_powbysq(::Any, p) = throw(DomainError(p, - string("Cannot raise an integer x to a negative power ", p, '.', - "\nConvert input to float."))) -@noinline throw_domerr_powbysq(::Integer, p) = throw(DomainError(p, - string("Cannot raise an integer x to a negative power ", p, '.', - "\nMake x or $p a float by adding a zero decimal ", - "(e.g., 2.0^$p or 2^$(float(p)) instead of 2^$p), ", - "or write 1/x^$(-p), float(x)^$p, x^float($p) or (x//1)^$p"))) -@noinline throw_domerr_powbysq(::AbstractMatrix, p) = throw(DomainError(p, - string("Cannot raise an integer matrix x to a negative power ", p, '.', - "\nMake x a float matrix by adding a zero decimal ", - "(e.g., [2.0 1.0;1.0 0.0]^$p instead ", - "of [2 1;1 0]^$p), or write float(x)^$p or Rational.(x)^$p"))) -function power_by_squaring(x_, p::Integer) +@noinline throw_domerr_powbysq(::Any, p) = throw(DomainError(p, LazyString( + "Cannot raise an integer x to a negative power ", p, ".", + "\nConvert input to float."))) +@noinline throw_domerr_powbysq(::Integer, p) = throw(DomainError(p, LazyString( + "Cannot raise an integer x to a negative power ", p, ".", + "\nMake x or ", p, " a float by adding a zero decimal ", + "(e.g., 2.0^", p, " or 2^", float(p), " instead of 2^", p, ")", + "or write 1/x^", -p, ", float(x)^", p, ", x^float(", p, ") or (x//1)^", p, "."))) +@noinline throw_domerr_powbysq(::AbstractMatrix, p) = throw(DomainError(p, LazyString( + "Cannot raise an integer matrix x to a negative power ", p, ".", + "\nMake x a float matrix by adding a zero decimal ", + "(e.g., [2.0 1.0;1.0 0.0]^", p, " instead of [2 1;1 0]^", p, ")", + "or write float(x)^", p, " or Rational.(x)^", p, "."))) +@assume_effects :terminates_locally function power_by_squaring(x_, p::Integer) x = to_power_type(x_) if p == 1 return copy(x) diff --git a/base/special/exp.jl b/base/special/exp.jl index c2bbb47902360..00a9c0c2d19c6 100644 --- a/base/special/exp.jl +++ b/base/special/exp.jl @@ -175,7 +175,11 @@ const J_TABLE = (0x0000000000000000, 0xaac00b1afa5abcbe, 0x9b60163da9fb3335, 0xa 0xa66f0f9c1cb64129, 0x93af252b376bba97, 0xacdf3ac948dd7273, 0x99df50765b6e4540, 0x9faf6632798844f8, 0xa12f7bfdad9cbe13, 0xaeef91d802243c88, 0x874fa7c1819e90d8, 0xacdfbdba3692d513, 0x62efd3c22b8f71f1, 0x74afe9d96b2a23d9) -@inline function table_unpack(ind) +# XXX we want to mark :consistent-cy here so that this function can be concrete-folded, +# because the effect analysis currently can't prove it in the presence of `@inbounds` or +# `:boundscheck`, but still the access to `J_TABLE` is really safe here +Base.@assume_effects :consistent @inline function table_unpack(ind::Int32) + ind = ind & 255 + 1 # 255 == length(J_TABLE) - 1 j = @inbounds J_TABLE[ind] jU = reinterpret(Float64, JU_CONST | (j&JU_MASK)) jL = reinterpret(Float64, JL_CONST | (j>>8)) @@ -211,7 +215,7 @@ end r = muladd(N_float, LogBo256U(base, T), x) r = muladd(N_float, LogBo256L(base, T), r) k = N >> 8 - jU, jL = table_unpack(N&255 + 1) + jU, jL = table_unpack(N) small_part = muladd(jU, expm1b_kernel(base, r), jL) + jU if !(abs(x) <= SUBNORM_EXP(base, T)) @@ -236,7 +240,7 @@ end r = muladd(N_float, LogBo256U(base, T), x) r = muladd(N_float, LogBo256L(base, T), r) k = N >> 8 - jU, jL = table_unpack(N&255 + 1) + jU, jL = table_unpack(N) very_small = muladd(jU, expm1b_kernel(base, r), jL) small_part = muladd(jU,xlo,very_small) + jU if !(abs(x) <= SUBNORM_EXP(base, T)) @@ -438,7 +442,7 @@ function expm1(x::Float64) r = muladd(N_float, LogBo256U(Val(:ℯ), T), x) r = muladd(N_float, LogBo256L(Val(:ℯ), T), r) k = Int64(N >> 8) - jU, jL = table_unpack(N&255 +1) + jU, jL = table_unpack(N) p = expm1b_kernel(Val(:ℯ), r) twopk = reinterpret(Float64, (1023+k) << 52) twopnk = reinterpret(Float64, (1023-k) << 52) diff --git a/base/special/log.jl b/base/special/log.jl index bca0d7143db48..f16ba03d70f0d 100644 --- a/base/special/log.jl +++ b/base/special/log.jl @@ -92,7 +92,6 @@ const t_log_Float64 = ((0.0,0.0),(0.007782140442941454,-8.865052917267247e-13), (0.6853040030982811,6.383161517064652e-13),(0.6892332812385575,2.5144230728376075e-13), (0.6931471805601177,-1.7239444525614835e-13)) - # Float32 lookup table # to generate values: # N=16 @@ -156,7 +155,12 @@ logbU(::Type{Float64},::Val{10}) = 0.4342944819032518 logbL(::Type{Float64},::Val{10}) = 1.098319650216765e-17 # Procedure 1 -@inline function log_proc1(y::Float64,mf::Float64,F::Float64,f::Float64,jp::Int,base=Val(:ℯ)) +# XXX we want to mark :consistent-cy here so that this function can be concrete-folded, +# because the effect analysis currently can't prove it in the presence of `@inbounds` or +# `:boundscheck`, but still the access to `t_log_Float64` is really safe here +Base.@assume_effects :consistent @inline function log_proc1(y::Float64,mf::Float64,F::Float64,f::Float64,base=Val(:ℯ)) + jp = unsafe_trunc(Int,128.0*F)-127 + ## Steps 1 and 2 @inbounds hi,lo = t_log_Float64[jp] l_hi = mf* 0.6931471805601177 + hi @@ -211,8 +215,13 @@ end return fma(m_hi, u, fma(m_lo, u, m_hi*fma(fma(-u,f,2(f-u)), g, q))) end +# Procedure 1 +# XXX we want to mark :consistent-cy here so that this function can be concrete-folded, +# because the effect analysis currently can't prove it in the presence of `@inbounds` or +# `:boundscheck`, but still the access to `t_log_Float32` is really safe here +Base.@assume_effects :consistent @inline function log_proc1(y::Float32,mf::Float32,F::Float32,f::Float32,base=Val(:ℯ)) + jp = unsafe_trunc(Int,128.0f0*F)-127 -@inline function log_proc1(y::Float32,mf::Float32,F::Float32,f::Float32,jp::Int,base=Val(:ℯ)) ## Steps 1 and 2 @inbounds hi = t_log_Float32[jp] l = mf*0.6931471805599453 + hi @@ -232,6 +241,7 @@ end Float32(logb(Float32, base)*(l + (u + q))) end +# Procedure 2 @inline function log_proc2(f::Float32,base=Val(:ℯ)) ## Step 1 # compute in higher precision @@ -281,9 +291,8 @@ function _log(x::Float64, base, func) mf = Float64(m) F = (y + 3.5184372088832e13) - 3.5184372088832e13 # 0x1p-7*round(0x1p7*y) f = y-F - jp = unsafe_trunc(Int,128.0*F)-127 - return log_proc1(y,mf,F,f,jp,base) + return log_proc1(y,mf,F,f,base) elseif x == 0.0 -Inf elseif isnan(x) @@ -317,9 +326,8 @@ function _log(x::Float32, base, func) mf = Float32(m) F = (y + 65536.0f0) - 65536.0f0 # 0x1p-7*round(0x1p7*y) f = y-F - jp = unsafe_trunc(Int,128.0f0*F)-127 - log_proc1(y,mf,F,f,jp,base) + log_proc1(y,mf,F,f,base) elseif x == 0f0 -Inf32 elseif isnan(x) @@ -352,9 +360,8 @@ function log1p(x::Float64) mf = Float64(m) F = (y + 3.5184372088832e13) - 3.5184372088832e13 # 0x1p-7*round(0x1p7*y) f = (y - F) + c*s #2^m(F+f) = 1+x = z+c - jp = unsafe_trunc(Int,128.0*F)-127 - log_proc1(y,mf,F,f,jp) + log_proc1(y,mf,F,f) elseif x == -1.0 -Inf elseif isnan(x) @@ -385,9 +392,8 @@ function log1p(x::Float32) mf = Float32(m) F = (y + 65536.0f0) - 65536.0f0 # 0x1p-7*round(0x1p7*y) f = (y - F) + s*c #2^m(F+f) = 1+x = z+c - jp = unsafe_trunc(Int,128.0*F)-127 - log_proc1(y,mf,F,f,jp) + log_proc1(y,mf,F,f) elseif x == -1f0 -Inf32 elseif isnan(x) diff --git a/base/special/rem_pio2.jl b/base/special/rem_pio2.jl index 4ec9945885e7e..c9767f50358c6 100644 --- a/base/special/rem_pio2.jl +++ b/base/special/rem_pio2.jl @@ -125,7 +125,10 @@ function fromfraction(f::Int128) return (z1,z2) end -function paynehanek(x::Float64) +# XXX we want to mark :consistent-cy here so that this function can be concrete-folded, +# because the effect analysis currently can't prove it in the presence of `@inbounds` or +# `:boundscheck`, but still the accesses to `INV_2PI` are really safe here +Base.@assume_effects :consistent function paynehanek(x::Float64) # 1. Convert to form # # x = X * 2^k, diff --git a/test/math.jl b/test/math.jl index 55d0a3b6c5ed4..6e7908d890c81 100644 --- a/test/math.jl +++ b/test/math.jl @@ -1425,3 +1425,21 @@ end for T in (Float32, Float64) @test Core.Compiler.is_foldable(Base.infer_effects(^, (T,Int))) end + +# test constant-foldability +for fn in (:sin, :cos, :tan, :log, :log2, :log10, :log1p, :exponent, :sqrt, :cbrt, + # TODO :asin, :atan, :acos, :sinh, :cosh, :tanh, :asinh, :acosh, :atanh, + # TODO :exp, :exp2, :exp10, :expm1 + ) + for T in (Float32, Float64) + f = getfield(@__MODULE__, fn) + eff = Base.infer_effects(f, (T,)) + if Core.Compiler.is_foldable(eff) + @test true + else + @error "bad effects found for $f(::$T)" eff + @test false + end + end +end +@test Core.Compiler.is_foldable(Base.infer_effects(^, (Float32,Int))) From 1835d8f0363c91a9c292e3a348ee087cad70f6a5 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Thu, 16 Jun 2022 03:37:38 +0900 Subject: [PATCH 26/44] test: allow new concrete-foldability tests to fail (#45670) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit But just print bad effects instead – especially `[sin|cos|tan](::Float32)` seem to be analyzed as non-foldable sometimes non-deterministically, somehow. We need to dig into what's leading to the bad analysis with Cthulhu on each platform, but this homework is left for the readers with access. Tests added in #45613 --- test/math.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/math.jl b/test/math.jl index 6e7908d890c81..5daf1ef465509 100644 --- a/test/math.jl +++ b/test/math.jl @@ -1428,8 +1428,8 @@ end # test constant-foldability for fn in (:sin, :cos, :tan, :log, :log2, :log10, :log1p, :exponent, :sqrt, :cbrt, - # TODO :asin, :atan, :acos, :sinh, :cosh, :tanh, :asinh, :acosh, :atanh, - # TODO :exp, :exp2, :exp10, :expm1 + # TODO? :asin, :atan, :acos, :sinh, :cosh, :tanh, :asinh, :acosh, :atanh, + # TODO? :exp, :exp2, :exp10, :expm1 ) for T in (Float32, Float64) f = getfield(@__MODULE__, fn) @@ -1437,8 +1437,10 @@ for fn in (:sin, :cos, :tan, :log, :log2, :log10, :log1p, :exponent, :sqrt, :cbr if Core.Compiler.is_foldable(eff) @test true else - @error "bad effects found for $f(::$T)" eff - @test false + # XXX only print bad effects – especially `[sin|cos|tan](::Float32)` are analyzed + # as non-foldable sometimes but non-deterministically somehow, we need to dig + # into what's leading to the bad analysis with Cthulhu on each platform + @warn "bad effects found for $f(::$T)" eff end end end From 2daf1fdb604fb4ad91226c81fa280051f5dc0f63 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Tue, 12 Jul 2022 12:54:00 +0900 Subject: [PATCH 27/44] compiler: move effects-related test cases into dedicated file (#45992) --- test/choosetests.jl | 4 +-- test/compiler/effects.jl | 64 ++++++++++++++++++++++++++++++++++++++ test/compiler/inference.jl | 63 ------------------------------------- 3 files changed, 66 insertions(+), 65 deletions(-) create mode 100644 test/compiler/effects.jl diff --git a/test/choosetests.jl b/test/choosetests.jl index 099dfa18a71c5..f5775bbc00911 100644 --- a/test/choosetests.jl +++ b/test/choosetests.jl @@ -140,8 +140,8 @@ function choosetests(choices = []) "strings/io", "strings/types"]) # do subarray before sparse but after linalg filtertests!(tests, "subarray") - filtertests!(tests, "compiler", ["compiler/inference", "compiler/validation", - "compiler/ssair", "compiler/irpasses", "compiler/codegen", + filtertests!(tests, "compiler", ["compiler/inference", "compiler/effects", + "compiler/validation", "compiler/ssair", "compiler/irpasses", "compiler/codegen", "compiler/inline", "compiler/contextual", "compiler/AbstractInterpreter", "compiler/EscapeAnalysis/local", "compiler/EscapeAnalysis/interprocedural"]) filtertests!(tests, "compiler/EscapeAnalysis", [ diff --git a/test/compiler/effects.jl b/test/compiler/effects.jl new file mode 100644 index 0000000000000..55b99dee6a968 --- /dev/null +++ b/test/compiler/effects.jl @@ -0,0 +1,64 @@ +using Test +include("irutils.jl") + +# control flow backedge should taint `terminates` +@test Base.infer_effects((Int,)) do n + for i = 1:n; end +end |> !Core.Compiler.is_terminates + +# effects propagation for `Core.invoke` calls +# https://github.com/JuliaLang/julia/issues/44763 +global x44763::Int = 0 +increase_x44763!(n) = (global x44763; x44763 += n) +invoke44763(x) = @invoke increase_x44763!(x) +@test Base.return_types() do + invoke44763(42) +end |> only === Int +@test x44763 == 0 + +# Test that purity doesn't try to accidentally run unreachable code due to +# boundscheck elimination +function f_boundscheck_elim(n) + # Inbounds here assumes that this is only ever called with n==0, but of + # course the compiler has no way of knowing that, so it must not attempt + # to run the @inbounds `getfield(sin, 1)`` that ntuple generates. + ntuple(x->(@inbounds getfield(sin, x)), n) +end +@test Tuple{} <: code_typed(f_boundscheck_elim, Tuple{Int})[1][2] + +# Test that purity modeling doesn't accidentally introduce new world age issues +f_redefine_me(x) = x+1 +f_call_redefine() = f_redefine_me(0) +f_mk_opaque() = Base.Experimental.@opaque ()->Base.inferencebarrier(f_call_redefine)() +const op_capture_world = f_mk_opaque() +f_redefine_me(x) = x+2 +@test op_capture_world() == 1 +@test f_mk_opaque()() == 2 + +# backedge insertion for Any-typed, effect-free frame +const CONST_DICT = let d = Dict() + for c in 'A':'z' + push!(d, c => Int(c)) + end + d +end +Base.@assume_effects :foldable getcharid(c) = CONST_DICT[c] +@noinline callf(f, args...) = f(args...) +function entry_to_be_invalidated(c) + return callf(getcharid, c) +end +@test Base.infer_effects((Char,)) do x + entry_to_be_invalidated(x) +end |> Core.Compiler.is_foldable +@test fully_eliminated(; retval=97) do + entry_to_be_invalidated('a') +end +getcharid(c) = CONST_DICT[c] # now this is not eligible for concrete evaluation +@test Base.infer_effects((Char,)) do x + entry_to_be_invalidated(x) +end |> !Core.Compiler.is_foldable +@test !fully_eliminated() do + entry_to_be_invalidated('a') +end + +@test !Core.Compiler.builtin_nothrow(Core.get_binding_type, Any[Rational{Int}, Core.Const(:foo)], Any) diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index 9ed5234107e8e..69fd1a2a36ca1 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -4048,70 +4048,7 @@ end end |> only === Union{} end -# Test that purity modeling doesn't accidentally introduce new world age issues -f_redefine_me(x) = x+1 -f_call_redefine() = f_redefine_me(0) -f_mk_opaque() = @Base.Experimental.opaque ()->Base.inferencebarrier(f_call_redefine)() -const op_capture_world = f_mk_opaque() -f_redefine_me(x) = x+2 -@test op_capture_world() == 1 -@test f_mk_opaque()() == 2 - -# Test that purity doesn't try to accidentally run unreachable code due to -# boundscheck elimination -function f_boundscheck_elim(n) - # Inbounds here assumes that this is only ever called with n==0, but of - # course the compiler has no way of knowing that, so it must not attempt - # to run the @inbounds `getfield(sin, 1)`` that ntuple generates. - ntuple(x->(@inbounds getfield(sin, x)), n) -end -@test Tuple{} <: code_typed(f_boundscheck_elim, Tuple{Int})[1][2] - -@test !Core.Compiler.builtin_nothrow(Core.get_binding_type, Any[Rational{Int}, Core.Const(:foo)], Any) - # https://github.com/JuliaLang/julia/issues/44965 let t = Core.Compiler.tuple_tfunc(Any[Core.Const(42), Vararg{Any}]) @test Core.Compiler.issimplertype(t, t) end - -# https://github.com/JuliaLang/julia/issues/44763 -global x44763::Int = 0 -increase_x44763!(n) = (global x44763; x44763 += n) -invoke44763(x) = Base.@invoke increase_x44763!(x) -@test Base.return_types() do - invoke44763(42) -end |> only === Int -@test x44763 == 0 - -# backedge insertion for Any-typed, effect-free frame -const CONST_DICT = let d = Dict() - for c in 'A':'z' - push!(d, c => Int(c)) - end - d -end -Base.@assume_effects :foldable getcharid(c) = CONST_DICT[c] -@noinline callf(f, args...) = f(args...) -function entry_to_be_invalidated(c) - return callf(getcharid, c) -end -@test Base.infer_effects((Char,)) do x - entry_to_be_invalidated(x) -end |> Core.Compiler.is_foldable -@test fully_eliminated(; retval=97) do - entry_to_be_invalidated('a') -end -getcharid(c) = CONST_DICT[c] # now this is not eligible for concrete evaluation -@test Base.infer_effects((Char,)) do x - entry_to_be_invalidated(x) -end |> !Core.Compiler.is_foldable -@test !fully_eliminated() do - entry_to_be_invalidated('a') -end - -# Make sure return_type_tfunc doesn't accidentally cause bad inference if used -# at top level. -@test let - Base.Experimental.@force_compile - Core.Compiler.return_type(+, NTuple{2, Rational}) -end == Rational From 1390613d29220acac1c375e102ae2f2428c2fb95 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Tue, 12 Jul 2022 18:09:23 +0900 Subject: [PATCH 28/44] Merge pull request #45993 from JuliaLang/avi/recursion-effects effects: relax recursion detection for effects analysis --- base/compiler/abstractinterpretation.jl | 64 ++++++++++++++++++------- test/compiler/effects.jl | 15 ++++++ 2 files changed, 61 insertions(+), 18 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 4feba83574a8e..31441407dc31a 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -652,14 +652,43 @@ function abstract_call_method(interp::AbstractInterpreter, method::Method, @nosp # this edge is known to terminate edge_effects = Effects(edge_effects; terminates=ALWAYS_TRUE) elseif edgecycle - # Some sort of recursion was detected. Even if we did not limit types, - # we cannot guarantee that the call will terminate - edge_effects = Effects(edge_effects; terminates=TRISTATE_UNKNOWN) + # Some sort of recursion was detected. + if edge !== nothing && !edgelimited && !is_edge_recursed(edge, sv) + # no `MethodInstance` cycles -- don't taint :terminate + else + # we cannot guarantee that the call will terminate + edge_effects = Effects(edge_effects; terminates=ALWAYS_FALSE) + end end return MethodCallResult(rt, edgecycle, edgelimited, edge, edge_effects) end -# keeps result and context information of abstract method call, will be used by succeeding constant-propagation +function is_edge_recursed(edge::MethodInstance, sv::InferenceState) + return any(InfStackUnwind(sv)) do infstate + return edge === infstate.linfo + end +end + +function is_method_recursed(method::Method, sv::InferenceState) + return any(InfStackUnwind(sv)) do infstate + return method === infstate.linfo.def + end +end + +function is_constprop_edge_recursed(edge::MethodInstance, sv::InferenceState) + return any(InfStackUnwind(sv)) do infstate + return edge === infstate.linfo && any(infstate.result.overridden_by_const) + end +end + +function is_constprop_method_recursed(method::Method, sv::InferenceState) + return any(InfStackUnwind(sv)) do infstate + return method === infstate.linfo.def && any(infstate.result.overridden_by_const) + end +end + +# keeps result and context information of abstract_method_call, which will later be used for +# backedge computation, and concrete evaluation or constant-propagation struct MethodCallResult rt edgecycle::Bool @@ -801,17 +830,14 @@ function abstract_call_method_with_const_args(interp::AbstractInterpreter, resul if inf_result === nothing # if there might be a cycle, check to make sure we don't end up # calling ourselves here. - let result = result # prevent capturing - if result.edgecycle && _any(InfStackUnwind(sv)) do infstate - # if the type complexity limiting didn't decide to limit the call signature (`result.edgelimited = false`) - # we can relax the cycle detection by comparing `MethodInstance`s and allow inference to - # propagate different constant elements if the recursion is finite over the lattice - return (result.edgelimited ? match.method === infstate.linfo.def : mi === infstate.linfo) && - any(infstate.result.overridden_by_const) - end - add_remark!(interp, sv, "[constprop] Edge cycle encountered") - return nothing - end + if result.edgecycle && (result.edgelimited ? + is_constprop_method_recursed(match.method, sv) : + # if the type complexity limiting didn't decide to limit the call signature (`result.edgelimited = false`) + # we can relax the cycle detection by comparing `MethodInstance`s and allow inference to + # propagate different constant elements if the recursion is finite over the lattice + is_constprop_edge_recursed(mi, sv)) + add_remark!(interp, sv, "[constprop] Edge cycle encountered") + return nothing end inf_result = InferenceResult(mi, (arginfo, sv)) if !any(inf_result.overridden_by_const) @@ -922,8 +948,8 @@ function is_const_prop_profitable_arg(@nospecialize(arg)) isa(arg, PartialOpaque) && return true isa(arg, Const) || return true val = arg.val - # don't consider mutable values or Strings useful constants - return isa(val, Symbol) || isa(val, Type) || (!isa(val, String) && !ismutable(val)) + # don't consider mutable values useful constants + return isa(val, Symbol) || isa(val, Type) || !ismutable(val) end function is_const_prop_profitable_conditional(cnd::Conditional, fargs::Vector{Any}, sv::InferenceState) @@ -1275,7 +1301,7 @@ function abstract_apply(interp::AbstractInterpreter, argtypes::Vector{Any}, sv:: end cti = Any[Vararg{argt}] end - if _any(t -> t === Bottom, cti) + if any(@nospecialize(t) -> t === Bottom, cti) continue end for j = 1:length(ctypes) @@ -1954,6 +1980,8 @@ function abstract_eval_statement(interp::AbstractInterpreter, @nospecialize(e), for i = 3:length(e.args) if abstract_eval_value(interp, e.args[i], vtypes, sv) === Bottom t = Bottom + tristate_merge!(sv, EFFECTS_THROWS) + @goto t_computed end end cconv = e.args[5] diff --git a/test/compiler/effects.jl b/test/compiler/effects.jl index 55b99dee6a968..101adfb97683c 100644 --- a/test/compiler/effects.jl +++ b/test/compiler/effects.jl @@ -6,6 +6,21 @@ include("irutils.jl") for i = 1:n; end end |> !Core.Compiler.is_terminates +# interprocedural-recursion should taint `terminates` **appropriately** +function sumrecur(a, x) + isempty(a) && return x + return sumrecur(Base.tail(a), x + first(a)) +end +@test Base.infer_effects(sumrecur, (Tuple{Int,Int,Int},Int)) |> Core.Compiler.is_terminates +@test Base.infer_effects(sumrecur, (Tuple{Int,Int,Int,Vararg{Int}},Int)) |> !Core.Compiler.is_terminates + +# https://github.com/JuliaLang/julia/issues/45781 +@test Base.infer_effects((Float32,)) do a + out1 = promote_type(Irrational{:π}, Bool) + out2 = sin(a) + out1, out2 +end |> Core.Compiler.is_terminates + # effects propagation for `Core.invoke` calls # https://github.com/JuliaLang/julia/issues/44763 global x44763::Int = 0 From 1645d1d8a8888ac56210d7ef329690fb0c8f7f77 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Mon, 25 Jul 2022 10:20:34 -0400 Subject: [PATCH 29/44] Merge pull request #46111 from JuliaLang/avi/correct-consistent effects: fix correctness issues of `:consistent`-cy analysis --- base/compiler/abstractinterpretation.jl | 33 ++++--- base/compiler/tfuncs.jl | 65 +++++++++++++- test/compiler/effects.jl | 115 ++++++++++++++++++++++++ 3 files changed, 197 insertions(+), 16 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 31441407dc31a..430cfc1796f60 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -1809,18 +1809,21 @@ function abstract_eval_cfunction(interp::AbstractInterpreter, e::Expr, vtypes::V end function abstract_eval_value_expr(interp::AbstractInterpreter, e::Expr, vtypes::VarTable, sv::InferenceState) - if e.head === :static_parameter + head = e.head + if head === :static_parameter n = e.args[1]::Int t = Any if 1 <= n <= length(sv.sptypes) t = sv.sptypes[n] end return t - elseif e.head === :boundscheck + elseif head === :boundscheck return Bool - else + elseif head === :the_exception + tristate_merge!(sv, Effects(EFFECTS_TOTAL; consistent=ALWAYS_FALSE)) return Any end + return Any end function abstract_eval_special_value(interp::AbstractInterpreter, @nospecialize(e), vtypes::VarTable, sv::InferenceState) @@ -1886,6 +1889,7 @@ function abstract_eval_statement(interp::AbstractInterpreter, @nospecialize(e), elseif ehead === :new t, isexact = instanceof_tfunc(abstract_eval_value(interp, e.args[1], vtypes, sv)) is_nothrow = true + is_consistent = false if isconcretedispatch(t) fcount = fieldcount(t) nargs = length(e.args) - 1 @@ -1916,22 +1920,27 @@ function abstract_eval_statement(interp::AbstractInterpreter, @nospecialize(e), # For now, don't allow: # - Const/PartialStruct of mutables # - partially initialized Const/PartialStruct - if !ismutabletype(t) && fcount == nargs - if allconst - argvals = Vector{Any}(undef, nargs) - for j in 1:nargs - argvals[j] = (ats[j]::Const).val + if !ismutabletype(t) + if fcount == nargs + is_consistent = true + if allconst + argvals = Vector{Any}(undef, nargs) + for j in 1:nargs + argvals[j] = (ats[j]::Const).val + end + t = Const(ccall(:jl_new_structv, Any, (Any, Ptr{Cvoid}, UInt32), t, argvals, nargs)) + elseif anyrefine + t = PartialStruct(t, ats) end - t = Const(ccall(:jl_new_structv, Any, (Any, Ptr{Cvoid}, UInt32), t, argvals, nargs)) - elseif anyrefine - t = PartialStruct(t, ats) + else + is_consistent = all(i::Int -> is_undefref_fieldtype(fieldtype(t, i)), (nargs+1):fcount) end end else is_nothrow = false end tristate_merge!(sv, Effects(EFFECTS_TOTAL; - consistent = !ismutabletype(t) ? ALWAYS_TRUE : TRISTATE_UNKNOWN, + consistent = is_consistent ? ALWAYS_TRUE : TRISTATE_UNKNOWN, nothrow = is_nothrow ? ALWAYS_TRUE : TRISTATE_UNKNOWN)) elseif ehead === :splatnew t, isexact = instanceof_tfunc(abstract_eval_value(interp, e.args[1], vtypes, sv)) diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index 2411fc0514b80..7cbde8e7d54ab 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -861,7 +861,7 @@ function _getfield_tfunc(@nospecialize(s00), @nospecialize(name), setfield::Bool end isa(s, DataType) || return Any isabstracttype(s) && return Any - if s <: Tuple && !(Int <: widenconst(name)) + if s <: Tuple && !hasintersect(widenconst(name), Int) return Bottom end if s <: Module @@ -936,6 +936,57 @@ function _getfield_tfunc(@nospecialize(s00), @nospecialize(name), setfield::Bool return rewrap_unionall(R, s00) end +function getfield_notundefined(@nospecialize(typ0), @nospecialize(name)) + typ = unwrap_unionall(typ0) + if isa(typ, Union) + return getfield_notundefined(rewrap_unionall(typ.a, typ0), name) && + getfield_notundefined(rewrap_unionall(typ.b, typ0), name) + end + isa(typ, DataType) || return false + if typ.name === Tuple.name || typ.name === _NAMEDTUPLE_NAME + # tuples and named tuples can't be instantiated with undefined fields, + # so we don't need to be conservative here + return true + end + if !isa(name, Const) + isvarargtype(name) && return false + if !hasintersect(widenconst(name), Union{Int,Symbol}) + return true # no undefined behavior if thrown + end + # field isn't known precisely, but let's check if all the fields can't be + # initialized with undefined value so to avoid being too conservative + fcnt = fieldcount_noerror(typ) + fcnt === nothing && return false + all(i::Int->is_undefref_fieldtype(fieldtype(typ,i)), 1:fcnt) && return true + return false + end + name = name.val + if isa(name, Symbol) + fidx = fieldindex(typ, name, false) + fidx === nothing && return true # no undefined behavior if thrown + elseif isa(name, Int) + fidx = name + else + return true # no undefined behavior if thrown + end + fcnt = fieldcount_noerror(typ) + fcnt === nothing && return false + 0 < fidx ≤ fcnt || return true # no undefined behavior if thrown + ftyp = fieldtype(typ, fidx) + is_undefref_fieldtype(ftyp) && return true + return fidx ≤ datatype_min_ninitialized(typ) +end +# checks if a field of this type will not be initialized with undefined value +# and the access to that uninitialized field will cause and `UndefRefError`, e.g., +# - is_undefref_fieldtype(String) === true +# - is_undefref_fieldtype(Integer) === true +# - is_undefref_fieldtype(Any) === true +# - is_undefref_fieldtype(Int) === false +# - is_undefref_fieldtype(Union{Int32,Int64}) === false +function is_undefref_fieldtype(@nospecialize ftyp) + return !has_free_typevars(ftyp) && !allocatedinline(ftyp) +end + function setfield!_tfunc(o, f, v, order) @nospecialize if !isvarargtype(order) @@ -1772,9 +1823,15 @@ function builtin_effects(f::Builtin, argtypes::Vector{Any}, rt) end s = s::DataType ipo_consistent = !ismutabletype(s) - nothrow = false - if f === Core.getfield && !isvarargtype(argtypes[end]) && - getfield_boundscheck(argtypes[2:end]) !== true + # access to `isbitstype`-field initialized with undefined value leads to undefined behavior + # so should taint `:consistent`-cy while access to uninitialized non-`isbitstype` field + # throws `UndefRefError` so doesn't need to taint it + # NOTE `getfield_notundefined` conservatively checks if this field is never initialized + # with undefined value so that we don't taint `:consistent`-cy too aggressively here + if f === Core.getfield && !getfield_notundefined(s, argtypes[2]) + ipo_consistent = false + end + if f === Core.getfield && !isvarargtype(argtypes[end]) && getfield_boundscheck(argtypes) !== true # If we cannot independently prove inboundsness, taint consistency. # The inbounds-ness assertion requires dynamic reachability, while # :consistent needs to be true for all input values. diff --git a/test/compiler/effects.jl b/test/compiler/effects.jl index 101adfb97683c..0f2a82a3395f1 100644 --- a/test/compiler/effects.jl +++ b/test/compiler/effects.jl @@ -21,6 +21,121 @@ end out1, out2 end |> Core.Compiler.is_terminates +# :the_exception expression should taint :consistent-cy +global inconsistent_var::Int = 42 +function throw_inconsistent() # this is still :consistent + throw(inconsistent_var) +end +function catch_inconsistent() + try + throw_inconsistent() + catch err + err + end +end +@test !Core.Compiler.is_consistent(Base.infer_effects(catch_inconsistent)) +cache_inconsistent() = catch_inconsistent() +function compare_inconsistent() + a = cache_inconsistent() + global inconsistent_var = 0 + b = cache_inconsistent() + global inconsistent_var = 42 + return a === b +end +@test !compare_inconsistent() +# return type information shouldn't be able to refine it also +function catch_inconsistent(x::T) where T + v = x + try + throw_inconsistent() + catch err + v = err::T + end + return v +end +@test !Core.Compiler.is_consistent(Base.infer_effects(catch_inconsistent, (Int,))) +cache_inconsistent(x) = catch_inconsistent(x) +function compare_inconsistent(x::T) where T + x = one(T) + a = cache_inconsistent(x) + global inconsistent_var = 0 + b = cache_inconsistent(x) + global inconsistent_var = 42 + return a === b +end +@test !compare_inconsistent(3) + +# allocation/access of uninitialized fields should taint the :consistent-cy +struct Maybe{T} + x::T + Maybe{T}() where T = new{T}() + Maybe{T}(x) where T = new{T}(x) + Maybe(x::T) where T = new{T}(x) +end +Base.getindex(x::Maybe) = x.x + +import Core.Compiler: Const, getfield_notundefined +for T = (Base.RefValue, Maybe) # both mutable and immutable + for name = (Const(1), Const(:x)) + @test getfield_notundefined(T{String}, name) + @test getfield_notundefined(T{Integer}, name) + @test getfield_notundefined(T{Union{String,Integer}}, name) + @test getfield_notundefined(Union{T{String},T{Integer}}, name) + @test !getfield_notundefined(T{Int}, name) + @test !getfield_notundefined(T{<:Integer}, name) + @test !getfield_notundefined(T{Union{Int32,Int64}}, name) + @test !getfield_notundefined(T, name) + end + # throw doesn't account for undefined behavior + for name = (Const(0), Const(2), Const(1.0), Const(:y), Const("x"), + Float64, String, Nothing) + @test getfield_notundefined(T{String}, name) + @test getfield_notundefined(T{Int}, name) + @test getfield_notundefined(T{Integer}, name) + @test getfield_notundefined(T{<:Integer}, name) + @test getfield_notundefined(T{Union{Int32,Int64}}, name) + @test getfield_notundefined(T, name) + end + # should not be too conservative when field isn't known very well but object information is accurate + @test getfield_notundefined(T{String}, Int) + @test getfield_notundefined(T{String}, Symbol) + @test getfield_notundefined(T{Integer}, Int) + @test getfield_notundefined(T{Integer}, Symbol) + @test !getfield_notundefined(T{Int}, Int) + @test !getfield_notundefined(T{Int}, Symbol) + @test !getfield_notundefined(T{<:Integer}, Int) + @test !getfield_notundefined(T{<:Integer}, Symbol) +end +# should be conservative when object information isn't accurate +@test !getfield_notundefined(Any, Const(1)) +@test !getfield_notundefined(Any, Const(:x)) +# tuples and namedtuples should be okay if not given accurate information +for TupleType = Any[Tuple{Int,Int,Int}, Tuple{Int,Vararg{Int}}, Tuple{Any}, Tuple, + NamedTuple{(:a, :b), Tuple{Int,Int}}, NamedTuple{(:x,),Tuple{Any}}, NamedTuple], + FieldType = Any[Int, Symbol, Any] + @test getfield_notundefined(TupleType, FieldType) +end + +# TODO add equivalent test cases for `Ref` once we handle mutability more nicely +@test Base.infer_effects() do + Maybe{Int}() +end |> !Core.Compiler.is_consistent +@test Base.infer_effects() do + Maybe{Int}()[] +end |> !Core.Compiler.is_consistent +@test !fully_eliminated() do + Maybe{Int}()[] +end +@test Base.infer_effects() do + Maybe{String}() +end |> Core.Compiler.is_consistent +@test Base.infer_effects() do + Maybe{String}()[] +end |> Core.Compiler.is_consistent +@test Base.return_types() do + Maybe{String}()[] # this expression should be concrete evaluated +end |> only === Union{} + # effects propagation for `Core.invoke` calls # https://github.com/JuliaLang/julia/issues/44763 global x44763::Int = 0 From a1937abab49ee49b64118b46647ac3ad5ee4193c Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Mon, 20 Jun 2022 15:37:16 +0900 Subject: [PATCH 30/44] effects: improve tri-state printing --- base/compiler/ssair/show.jl | 15 ++++++++++++++- base/show.jl | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/base/compiler/ssair/show.jl b/base/compiler/ssair/show.jl index f4c826a45156f..2ec160077354c 100644 --- a/base/compiler/ssair/show.jl +++ b/base/compiler/ssair/show.jl @@ -791,7 +791,11 @@ function show_ir(io::IO, code::Union{IRCode, CodeInfo}, config::IRShowConfig=def end tristate_letter(t::TriState) = t === ALWAYS_TRUE ? '+' : t === ALWAYS_FALSE ? '!' : '?' -tristate_color(t::TriState) = t === ALWAYS_TRUE ? :green : t === ALWAYS_FALSE ? :red : :orange +tristate_color(t::TriState) = t === ALWAYS_TRUE ? :green : t === ALWAYS_FALSE ? :red : :yellow +tristate_repr(t::TriState) = + t === ALWAYS_TRUE ? "ALWAYS_TRUE" : + t === ALWAYS_FALSE ? "ALWAYS_FALSE" : + t === TRISTATE_UNKNOWN ? "TRISTATE_UNKNOWN" : nothing function Base.show(io::IO, e::Core.Compiler.Effects) print(io, "(") @@ -806,4 +810,13 @@ function Base.show(io::IO, e::Core.Compiler.Effects) e.nonoverlayed || printstyled(io, '′'; color=:red) end +function Base.show(io::IO, t::TriState) + s = tristate_repr(t) + if s !== nothing + printstyled(io, s; color = tristate_color(t)) + else # unknown state, redirect to the fallback printing + Base.@invoke show(io::IO, t::Any) + end +end + @specialize diff --git a/base/show.jl b/base/show.jl index 607f13d3778e7..381a17f188482 100644 --- a/base/show.jl +++ b/base/show.jl @@ -2490,7 +2490,7 @@ module IRShow import ..Base import .Compiler: IRCode, ReturnNode, GotoIfNot, CFG, scan_ssa_use!, Argument, isexpr, compute_basic_blocks, block_for_inst, - TriState, Effects, ALWAYS_TRUE, ALWAYS_FALSE + TriState, Effects, ALWAYS_TRUE, ALWAYS_FALSE, TRISTATE_UNKNOWN Base.getindex(r::Compiler.StmtRange, ind::Integer) = Compiler.getindex(r, ind) Base.size(r::Compiler.StmtRange) = Compiler.size(r) Base.first(r::Compiler.StmtRange) = Compiler.first(r) From 431a5e51c692459159c6cfd457559cbb6c5158ff Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Mon, 25 Jul 2022 17:16:57 -0400 Subject: [PATCH 31/44] manual fixes, `@invoke` isn't exported on 1.8 --- base/compiler/ssair/show.jl | 2 +- test/compiler/effects.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/compiler/ssair/show.jl b/base/compiler/ssair/show.jl index 2ec160077354c..17b7fd7e925dc 100644 --- a/base/compiler/ssair/show.jl +++ b/base/compiler/ssair/show.jl @@ -815,7 +815,7 @@ function Base.show(io::IO, t::TriState) if s !== nothing printstyled(io, s; color = tristate_color(t)) else # unknown state, redirect to the fallback printing - Base.@invoke show(io::IO, t::Any) + Core.invoke(show, Tuple{IO,Any}, io, t) end end diff --git a/test/compiler/effects.jl b/test/compiler/effects.jl index 0f2a82a3395f1..0c00ef42df6ea 100644 --- a/test/compiler/effects.jl +++ b/test/compiler/effects.jl @@ -140,7 +140,7 @@ end |> only === Union{} # https://github.com/JuliaLang/julia/issues/44763 global x44763::Int = 0 increase_x44763!(n) = (global x44763; x44763 += n) -invoke44763(x) = @invoke increase_x44763!(x) +invoke44763(x) = Base.@invoke increase_x44763!(x) @test Base.return_types() do invoke44763(42) end |> only === Int From 9b38226670ac44d060978cc90551cce0a15ec26b Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Fri, 29 Jul 2022 06:18:47 -0400 Subject: [PATCH 32/44] inference: fix #46207, make sure we never form nested `Conditional` (#46208) --- base/compiler/abstractinterpretation.jl | 6 ++++++ test/compiler/inference.jl | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 430cfc1796f60..5c1133b4d40ec 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -1430,20 +1430,26 @@ function abstract_call_builtin(interp::AbstractInterpreter, f::Builtin, (; fargs if isa(aty, Const) && isa(b, SlotNumber) if rt === Const(false) aty = Union{} + bty = widenconditional(bty) elseif rt === Const(true) bty = Union{} elseif bty isa Type && isdefined(typeof(aty.val), :instance) # can only widen a if it is a singleton bty = typesubtract(bty, typeof(aty.val), InferenceParams(interp).MAX_UNION_SPLITTING) + else + bty = widenconditional(bty) end return Conditional(b, aty, bty) end if isa(bty, Const) && isa(a, SlotNumber) if rt === Const(false) bty = Union{} + aty = widenconditional(aty) elseif rt === Const(true) aty = Union{} elseif aty isa Type && isdefined(typeof(bty.val), :instance) # same for b aty = typesubtract(aty, typeof(bty.val), InferenceParams(interp).MAX_UNION_SPLITTING) + else + aty = widenconditional(aty) end return Conditional(a, bty, aty) end diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index 69fd1a2a36ca1..8ea3a55030fe3 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -2102,6 +2102,16 @@ let M = Module() @test rt == Tuple{Union{Nothing,Int},Any} end +# make sure we never form nested `Conditional` (https://github.com/JuliaLang/julia/issues/46207) +@test Base.return_types((Any,)) do a + c = isa(a, Integer) + 42 === c ? :a : "b" +end |> only === String +@test Base.return_types((Any,)) do a + c = isa(a, Integer) + c === 42 ? :a : "b" +end |> only === String + @testset "conditional constraint propagation from non-`Conditional` object" begin @test Base.return_types((Bool,)) do b if b From c02b4e18a35243f9be0c953bfb63f9116a8ae0e3 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Wed, 20 Jul 2022 11:51:39 -0400 Subject: [PATCH 33/44] Fix timev compilation time tracking and add tests (#46100) (cherry picked from commit f3c22273d44ca9daedff3f72994e6ccf9c04c13e) --- base/timing.jl | 2 ++ test/misc.jl | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/base/timing.jl b/base/timing.jl index 1579cd5673bc9..a72f2980ca3b8 100644 --- a/base/timing.jl +++ b/base/timing.jl @@ -342,9 +342,11 @@ macro timev(msg, ex) Experimental.@force_compile local stats = gc_num() local elapsedtime = time_ns() + cumulative_compile_timing(true) local compile_elapsedtimes = cumulative_compile_time_ns() local val = @__tryfinally($(esc(ex)), (elapsedtime = time_ns() - elapsedtime; + cumulative_compile_timing(false); compile_elapsedtimes = cumulative_compile_time_ns() .- compile_elapsedtimes) ) local diff = GC_Diff(gc_num(), stats) diff --git a/test/misc.jl b/test/misc.jl index acefe3981674c..9ad9b4e21acac 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -354,6 +354,80 @@ after_comp, after_recomp = Base.cumulative_compile_time_ns() # no need to turn t end # redirect_stdout +macro capture_stdout(ex) + quote + mktemp() do fname, f + redirect_stdout(f) do + $(esc(ex)) + end + seekstart(f) + read(f, String) + end + end +end + +# compilation reports in @time, @timev +let f = gensym("f"), callf = gensym("callf"), call2f = gensym("call2f") + @eval begin + $f(::Real) = 1 + $callf(container) = $f(container[1]) + $call2f(container) = $callf(container) + c64 = [1.0] + c32 = [1.0f0] + cabs = AbstractFloat[1.0] + + out = @capture_stdout @time $call2f(c64) + @test occursin("% compilation time", out) + out = @capture_stdout @time $call2f(c64) + @test occursin("% compilation time", out) == false + + out = @capture_stdout @time $call2f(c32) + @test occursin("% compilation time", out) + out = @capture_stdout @time $call2f(c32) + @test occursin("% compilation time", out) == false + + out = @capture_stdout @time $call2f(cabs) + @test occursin("% compilation time", out) + out = @capture_stdout @time $call2f(cabs) + @test occursin("% compilation time", out) == false + + $f(::Float64) = 2 + out = @capture_stdout @time $call2f(c64) + @test occursin("% compilation time:", out) + @test occursin("% of which was recompilation", out) + end +end +let f = gensym("f"), callf = gensym("callf"), call2f = gensym("call2f") + @eval begin + $f(::Real) = 1 + $callf(container) = $f(container[1]) + $call2f(container) = $callf(container) + c64 = [1.0] + c32 = [1.0f0] + cabs = AbstractFloat[1.0] + + out = @capture_stdout @timev $call2f(c64) + @test occursin("% compilation time", out) + out = @capture_stdout @timev $call2f(c64) + @test occursin("% compilation time", out) == false + + out = @capture_stdout @timev $call2f(c32) + @test occursin("% compilation time", out) + out = @capture_stdout @timev $call2f(c32) + @test occursin("% compilation time", out) == false + + out = @capture_stdout @timev $call2f(cabs) + @test occursin("% compilation time", out) + out = @capture_stdout @timev $call2f(cabs) + @test occursin("% compilation time", out) == false + + $f(::Float64) = 2 + out = @capture_stdout @timev $call2f(c64) + @test occursin("% compilation time:", out) + @test occursin("% of which was recompilation", out) + end +end + # interactive utilities struct ambigconvert; end # inject a problematic `convert` method to ensure it still works From 20ef7d9bb059f82cf0cb1209eaef96b93fa601b6 Mon Sep 17 00:00:00 2001 From: Ian Date: Mon, 1 Aug 2022 13:09:43 -0400 Subject: [PATCH 34/44] update Pkg branch & commit --- .../Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/md5 | 1 - .../sha512 | 1 - .../Pkg-63f4405d17e11decd2e5eb786cc491322b68c58c.tar.gz/md5 | 1 + .../sha512 | 1 + stdlib/Pkg.version | 4 ++-- 5 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/sha512 create mode 100644 deps/checksums/Pkg-63f4405d17e11decd2e5eb786cc491322b68c58c.tar.gz/md5 create mode 100644 deps/checksums/Pkg-63f4405d17e11decd2e5eb786cc491322b68c58c.tar.gz/sha512 diff --git a/deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/md5 b/deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/md5 deleted file mode 100644 index 713275d000c87..0000000000000 --- a/deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -505a28c1e9246f92d0440b7ed9599e27 diff --git a/deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/sha512 b/deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/sha512 deleted file mode 100644 index 61c1603670788..0000000000000 --- a/deps/checksums/Pkg-57ca49fcbb45b578b78ac77a702913b5e2de7c7c.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -67d76980cc5430274bc7c1d5c1de4cc163a1583bbd373e074fc15296481e8bc202f7a4b77af6fd32677a974e9ad5d65dcfd72d74bf0ff657d4cee067eba595f0 diff --git a/deps/checksums/Pkg-63f4405d17e11decd2e5eb786cc491322b68c58c.tar.gz/md5 b/deps/checksums/Pkg-63f4405d17e11decd2e5eb786cc491322b68c58c.tar.gz/md5 new file mode 100644 index 0000000000000..267a11ce9e392 --- /dev/null +++ b/deps/checksums/Pkg-63f4405d17e11decd2e5eb786cc491322b68c58c.tar.gz/md5 @@ -0,0 +1 @@ +eb99c4458db02049e01122431211678a diff --git a/deps/checksums/Pkg-63f4405d17e11decd2e5eb786cc491322b68c58c.tar.gz/sha512 b/deps/checksums/Pkg-63f4405d17e11decd2e5eb786cc491322b68c58c.tar.gz/sha512 new file mode 100644 index 0000000000000..de1835da35995 --- /dev/null +++ b/deps/checksums/Pkg-63f4405d17e11decd2e5eb786cc491322b68c58c.tar.gz/sha512 @@ -0,0 +1 @@ +57fe5f9d897ff82ba64c6e4d8f102a2fc5d689340b41993c4f2cab3af0f516427d5e3696e0db75cedc49866ef19d4c87194e175f2a51391e1ae76546b10e997d diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index 06c1c50590065..464e7fd2c45a4 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,4 +1,4 @@ -PKG_BRANCH = master -PKG_SHA1 = 57ca49fcbb45b578b78ac77a702913b5e2de7c7c +PKG_BRANCH = release-1.8 +PKG_SHA1 = 63f4405d17e11decd2e5eb786cc491322b68c58c PKG_GIT_URL := https://github.com/JuliaLang/Pkg.jl.git PKG_TAR_URL = https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/$1 From a9bf474a60208baf5307485bcbbc9ab7f8880e00 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Sat, 11 Jun 2022 16:59:49 -0400 Subject: [PATCH 35/44] Prefix Float16 intrinsics (cherry picked from commit f6518663878bbef442af566a3e91e3502d087f2c) --- src/APInt-C.cpp | 6 ++-- src/julia.expmap | 6 ---- src/julia_internal.h | 14 +++++++-- src/runtime_intrinsics.c | 64 +++++++++++++++++++++++----------------- 4 files changed, 52 insertions(+), 38 deletions(-) diff --git a/src/APInt-C.cpp b/src/APInt-C.cpp index bc0a62e21dd3e..f06d4362bf958 100644 --- a/src/APInt-C.cpp +++ b/src/APInt-C.cpp @@ -316,7 +316,7 @@ void LLVMByteSwap(unsigned numbits, integerPart *pa, integerPart *pr) { void LLVMFPtoInt(unsigned numbits, void *pa, unsigned onumbits, integerPart *pr, bool isSigned, bool *isExact) { double Val; if (numbits == 16) - Val = __gnu_h2f_ieee(*(uint16_t*)pa); + Val = julia__gnu_h2f_ieee(*(uint16_t*)pa); else if (numbits == 32) Val = *(float*)pa; else if (numbits == 64) @@ -391,7 +391,7 @@ void LLVMSItoFP(unsigned numbits, integerPart *pa, unsigned onumbits, integerPar val = a.roundToDouble(true); } if (onumbits == 16) - *(uint16_t*)pr = __gnu_f2h_ieee(val); + *(uint16_t*)pr = julia__gnu_f2h_ieee(val); else if (onumbits == 32) *(float*)pr = val; else if (onumbits == 64) @@ -408,7 +408,7 @@ void LLVMUItoFP(unsigned numbits, integerPart *pa, unsigned onumbits, integerPar val = a.roundToDouble(false); } if (onumbits == 16) - *(uint16_t*)pr = __gnu_f2h_ieee(val); + *(uint16_t*)pr = julia__gnu_f2h_ieee(val); else if (onumbits == 32) *(float*)pr = val; else if (onumbits == 64) diff --git a/src/julia.expmap b/src/julia.expmap index 2d801dceae044..6717f8d00c621 100644 --- a/src/julia.expmap +++ b/src/julia.expmap @@ -37,12 +37,6 @@ environ; __progname; - /* compiler run-time intrinsics */ - __gnu_h2f_ieee; - __extendhfsf2; - __gnu_f2h_ieee; - __truncdfhf2; - local: *; }; diff --git a/src/julia_internal.h b/src/julia_internal.h index 7e47a4c9b453f..98ef613e3be9a 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -1520,8 +1520,18 @@ jl_sym_t *_jl_symbol(const char *str, size_t len) JL_NOTSAFEPOINT; #define JL_GC_ASSERT_LIVE(x) (void)(x) #endif -float __gnu_h2f_ieee(uint16_t param) JL_NOTSAFEPOINT; -uint16_t __gnu_f2h_ieee(float param) JL_NOTSAFEPOINT; +JL_DLLEXPORT float julia__gnu_h2f_ieee(uint16_t param) JL_NOTSAFEPOINT; +JL_DLLEXPORT uint16_t julia__gnu_f2h_ieee(float param) JL_NOTSAFEPOINT; +JL_DLLEXPORT uint16_t julia__truncdfhf2(double param) JL_NOTSAFEPOINT; +//JL_DLLEXPORT double julia__extendhfdf2(uint16_t n) JL_NOTSAFEPOINT; +//JL_DLLEXPORT int32_t julia__fixhfsi(uint16_t n) JL_NOTSAFEPOINT; +//JL_DLLEXPORT int64_t julia__fixhfdi(uint16_t n) JL_NOTSAFEPOINT; +//JL_DLLEXPORT uint32_t julia__fixunshfsi(uint16_t n) JL_NOTSAFEPOINT; +//JL_DLLEXPORT uint64_t julia__fixunshfdi(uint16_t n) JL_NOTSAFEPOINT; +//JL_DLLEXPORT uint16_t julia__floatsihf(int32_t n) JL_NOTSAFEPOINT; +//JL_DLLEXPORT uint16_t julia__floatdihf(int64_t n) JL_NOTSAFEPOINT; +//JL_DLLEXPORT uint16_t julia__floatunsihf(uint32_t n) JL_NOTSAFEPOINT; +//JL_DLLEXPORT uint16_t julia__floatundihf(uint64_t n) JL_NOTSAFEPOINT; #ifdef __cplusplus } diff --git a/src/runtime_intrinsics.c b/src/runtime_intrinsics.c index 9525b655dc5e3..f505a9d5e5d5a 100644 --- a/src/runtime_intrinsics.c +++ b/src/runtime_intrinsics.c @@ -15,9 +15,6 @@ const unsigned int host_char_bit = 8; // float16 intrinsics -// TODO: use LLVM's compiler-rt on all platforms (Xcode already links compiler-rt) - -#if !defined(_OS_DARWIN_) static inline float half_to_float(uint16_t ival) JL_NOTSAFEPOINT { @@ -188,22 +185,17 @@ static inline uint16_t float_to_half(float param) JL_NOTSAFEPOINT return h; } -JL_DLLEXPORT float __gnu_h2f_ieee(uint16_t param) +JL_DLLEXPORT float julia__gnu_h2f_ieee(uint16_t param) { return half_to_float(param); } -JL_DLLEXPORT float __extendhfsf2(uint16_t param) -{ - return half_to_float(param); -} - -JL_DLLEXPORT uint16_t __gnu_f2h_ieee(float param) +JL_DLLEXPORT uint16_t julia__gnu_f2h_ieee(float param) { return float_to_half(param); } -JL_DLLEXPORT uint16_t __truncdfhf2(double param) +JL_DLLEXPORT uint16_t julia__truncdfhf2(double param) { float res = (float)param; uint32_t resi; @@ -225,7 +217,25 @@ JL_DLLEXPORT uint16_t __truncdfhf2(double param) return float_to_half(res); } -#endif +//JL_DLLEXPORT double julia__extendhfdf2(uint16_t n) { return (double)julia__gnu_h2f_ieee(n); } +//JL_DLLEXPORT int32_t julia__fixhfsi(uint16_t n) { return (int32_t)julia__gnu_h2f_ieee(n); } +//JL_DLLEXPORT int64_t julia__fixhfdi(uint16_t n) { return (int64_t)julia__gnu_h2f_ieee(n); } +//JL_DLLEXPORT uint32_t julia__fixunshfsi(uint16_t n) { return (uint32_t)julia__gnu_h2f_ieee(n); } +//JL_DLLEXPORT uint64_t julia__fixunshfdi(uint16_t n) { return (uint64_t)julia__gnu_h2f_ieee(n); } +//JL_DLLEXPORT uint16_t julia__floatsihf(int32_t n) { return julia__gnu_f2h_ieee((float)n); } +//JL_DLLEXPORT uint16_t julia__floatdihf(int64_t n) { return julia__gnu_f2h_ieee((float)n); } +//JL_DLLEXPORT uint16_t julia__floatunsihf(uint32_t n) { return julia__gnu_f2h_ieee((float)n); } +//JL_DLLEXPORT uint16_t julia__floatundihf(uint64_t n) { return julia__gnu_f2h_ieee((float)n); } +//HANDLE_LIBCALL(F16, F128, __extendhftf2) +//HANDLE_LIBCALL(F16, F80, __extendhfxf2) +//HANDLE_LIBCALL(F80, F16, __truncxfhf2) +//HANDLE_LIBCALL(F128, F16, __trunctfhf2) +//HANDLE_LIBCALL(PPCF128, F16, __trunctfhf2) +//HANDLE_LIBCALL(F16, I128, __fixhfti) +//HANDLE_LIBCALL(F16, I128, __fixunshfti) +//HANDLE_LIBCALL(I128, F16, __floattihf) +//HANDLE_LIBCALL(I128, F16, __floatuntihf) + // run time version of bitcast intrinsic JL_DLLEXPORT jl_value_t *jl_bitcast(jl_value_t *ty, jl_value_t *v) @@ -551,9 +561,9 @@ static inline unsigned select_by_size(unsigned sz) JL_NOTSAFEPOINT } #define fp_select(a, func) \ - sizeof(a) == sizeof(float) ? func##f((float)a) : func(a) + sizeof(a) <= sizeof(float) ? func##f((float)a) : func(a) #define fp_select2(a, b, func) \ - sizeof(a) == sizeof(float) ? func##f(a, b) : func(a, b) + sizeof(a) <= sizeof(float) ? func##f(a, b) : func(a, b) // fast-function generators // @@ -597,11 +607,11 @@ static inline void name(unsigned osize, void *pa, void *pr) JL_NOTSAFEPOINT \ static inline void name(unsigned osize, void *pa, void *pr) JL_NOTSAFEPOINT \ { \ uint16_t a = *(uint16_t*)pa; \ - float A = __gnu_h2f_ieee(a); \ + float A = julia__gnu_h2f_ieee(a); \ if (osize == 16) { \ float R; \ OP(&R, A); \ - *(uint16_t*)pr = __gnu_f2h_ieee(R); \ + *(uint16_t*)pr = julia__gnu_f2h_ieee(R); \ } else { \ OP((uint16_t*)pr, A); \ } \ @@ -625,11 +635,11 @@ static void jl_##name##16(unsigned runtime_nbits, void *pa, void *pb, void *pr) { \ uint16_t a = *(uint16_t*)pa; \ uint16_t b = *(uint16_t*)pb; \ - float A = __gnu_h2f_ieee(a); \ - float B = __gnu_h2f_ieee(b); \ + float A = julia__gnu_h2f_ieee(a); \ + float B = julia__gnu_h2f_ieee(b); \ runtime_nbits = 16; \ float R = OP(A, B); \ - *(uint16_t*)pr = __gnu_f2h_ieee(R); \ + *(uint16_t*)pr = julia__gnu_f2h_ieee(R); \ } // float or integer inputs, bool output @@ -650,8 +660,8 @@ static int jl_##name##16(unsigned runtime_nbits, void *pa, void *pb) JL_NOTSAFEP { \ uint16_t a = *(uint16_t*)pa; \ uint16_t b = *(uint16_t*)pb; \ - float A = __gnu_h2f_ieee(a); \ - float B = __gnu_h2f_ieee(b); \ + float A = julia__gnu_h2f_ieee(a); \ + float B = julia__gnu_h2f_ieee(b); \ runtime_nbits = 16; \ return OP(A, B); \ } @@ -691,12 +701,12 @@ static void jl_##name##16(unsigned runtime_nbits, void *pa, void *pb, void *pc, uint16_t a = *(uint16_t*)pa; \ uint16_t b = *(uint16_t*)pb; \ uint16_t c = *(uint16_t*)pc; \ - float A = __gnu_h2f_ieee(a); \ - float B = __gnu_h2f_ieee(b); \ - float C = __gnu_h2f_ieee(c); \ + float A = julia__gnu_h2f_ieee(a); \ + float B = julia__gnu_h2f_ieee(b); \ + float C = julia__gnu_h2f_ieee(c); \ runtime_nbits = 16; \ float R = OP(A, B, C); \ - *(uint16_t*)pr = __gnu_f2h_ieee(R); \ + *(uint16_t*)pr = julia__gnu_f2h_ieee(R); \ } @@ -1318,7 +1328,7 @@ static inline int fpiseq##nbits(c_type a, c_type b) JL_NOTSAFEPOINT { \ fpiseq_n(float, 32) fpiseq_n(double, 64) #define fpiseq(a,b) \ - sizeof(a) == sizeof(float) ? fpiseq32(a, b) : fpiseq64(a, b) + sizeof(a) <= sizeof(float) ? fpiseq32(a, b) : fpiseq64(a, b) bool_fintrinsic(eq,eq_float) bool_fintrinsic(ne,ne_float) @@ -1367,7 +1377,7 @@ cvt_iintrinsic(LLVMFPtoUI, fptoui) if (!(osize < 8 * sizeof(a))) \ jl_error("fptrunc: output bitsize must be < input bitsize"); \ else if (osize == 16) \ - *(uint16_t*)pr = __gnu_f2h_ieee(a); \ + *(uint16_t*)pr = julia__gnu_f2h_ieee(a); \ else if (osize == 32) \ *(float*)pr = a; \ else if (osize == 64) \ From 71d062c83e388dd945b691d96195dbe64c699959 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sat, 11 Jun 2022 17:26:34 -0400 Subject: [PATCH 36/44] Define aliases to FP16 crt in the OJIT (cherry picked from commit ff360153dd70491c6ec7812a486c860c54a3f55c) --- src/jitlayers.cpp | 18 ++++++++++++++++-- src/jitlayers.h | 1 + test/intrinsics.jl | 24 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/jitlayers.cpp b/src/jitlayers.cpp index 93ae9b16d7f16..034cef516da5b 100644 --- a/src/jitlayers.cpp +++ b/src/jitlayers.cpp @@ -909,12 +909,26 @@ JuliaOJIT::JuliaOJIT(TargetMachine &TM, LLVMContext *LLVMCtx) } JD.addToLinkOrder(GlobalJD, orc::JITDylibLookupFlags::MatchExportedSymbolsOnly); + + orc::SymbolAliasMap jl_crt = { + { mangle("__gnu_h2f_ieee"), { mangle("julia__gnu_h2f_ieee"), JITSymbolFlags::Exported } }, + { mangle("__extendhfsf2"), { mangle("julia__gnu_h2f_ieee"), JITSymbolFlags::Exported } }, + { mangle("__gnu_f2h_ieee"), { mangle("julia__gnu_f2h_ieee"), JITSymbolFlags::Exported } }, + { mangle("__truncsfhf2"), { mangle("julia__gnu_f2h_ieee"), JITSymbolFlags::Exported } }, + { mangle("__truncdfhf2"), { mangle("julia__truncdfhf2"), JITSymbolFlags::Exported } } + }; + cantFail(GlobalJD.define(orc::symbolAliases(jl_crt))); } -void JuliaOJIT::addGlobalMapping(StringRef Name, uint64_t Addr) +orc::SymbolStringPtr JuliaOJIT::mangle(StringRef Name) { std::string MangleName = getMangledName(Name); - cantFail(JD.define(orc::absoluteSymbols({{ES.intern(MangleName), JITEvaluatedSymbol::fromPointer((void*)Addr)}}))); + return ES.intern(MangleName); +} + +void JuliaOJIT::addGlobalMapping(StringRef Name, uint64_t Addr) +{ + cantFail(JD.define(orc::absoluteSymbols({{mangle(Name), JITEvaluatedSymbol::fromPointer((void*)Addr)}}))); } void JuliaOJIT::addModule(std::unique_ptr M) diff --git a/src/jitlayers.h b/src/jitlayers.h index af47102173a7b..30e130f07273a 100644 --- a/src/jitlayers.h +++ b/src/jitlayers.h @@ -204,6 +204,7 @@ class JuliaOJIT { void RegisterJITEventListener(JITEventListener *L); #endif + orc::SymbolStringPtr mangle(StringRef Name); void addGlobalMapping(StringRef Name, uint64_t Addr); void addModule(std::unique_ptr M); diff --git a/test/intrinsics.jl b/test/intrinsics.jl index 2f2ef0cd505d5..ea373a9260d3a 100644 --- a/test/intrinsics.jl +++ b/test/intrinsics.jl @@ -164,6 +164,30 @@ end @test_intrinsic Core.Intrinsics.fptoui UInt Float16(3.3) UInt(3) end +if Sys.ARCH == :aarch64 + # On AArch64 we are following the `_Float16` ABI. Buthe these functions expect `Int16`. + # TODO: SHould we have `Chalf == Int16` and `Cfloat16 == Float16`? + extendhfsf2(x::Float16) = ccall("extern __extendhfsf2", llvmcall, Float32, (Int16,), reinterpret(Int16, x)) + gnu_h2f_ieee(x::Float16) = ccall("extern __gnu_h2f_ieee", llvmcall, Float32, (Int16,), reinterpret(Int16, x)) + truncsfhf2(x::Float32) = reinterpret(Float16, ccall("extern __truncsfhf2", llvmcall, Int16, (Float32,), x)) + gnu_f2h_ieee(x::Float32) = reinterpret(Float16, ccall("extern __gnu_f2h_ieee", llvmcall, Int16, (Float32,), x)) + truncdfhf2(x::Float64) = reinterpret(Float16, ccall("extern __truncdfhf2", llvmcall, Int16, (Float64,), x)) +else + extendhfsf2(x::Float16) = ccall("extern __extendhfsf2", llvmcall, Float32, (Float16,), x) + gnu_h2f_ieee(x::Float16) = ccall("extern __gnu_h2f_ieee", llvmcall, Float32, (Float16,), x) + truncsfhf2(x::Float32) = ccall("extern __truncsfhf2", llvmcall, Float16, (Float32,), x) + gnu_f2h_ieee(x::Float32) = ccall("extern __gnu_f2h_ieee", llvmcall, Float16, (Float32,), x) + truncdfhf2(x::Float64) = ccall("extern __truncdfhf2", llvmcall, Float16, (Float64,), x) +end + +@testset "Float16 intrinsics (crt)" begin + @test extendhfsf2(Float16(3.3)) == 3.3007812f0 + @test gnu_h2f_ieee(Float16(3.3)) == 3.3007812f0 + @test truncsfhf2(3.3f0) == Float16(3.3) + @test gnu_f2h_ieee(3.3f0) == Float16(3.3) + @test truncdfhf2(3.3) == Float16(3.3) +end + using Base.Experimental: @force_compile @test_throws ConcurrencyViolationError("invalid atomic ordering") (@force_compile; Core.Intrinsics.atomic_fence(:u)) === nothing @test_throws ConcurrencyViolationError("invalid atomic ordering") (@force_compile; Core.Intrinsics.atomic_fence(Symbol("u", "x"))) === nothing From 7ff795cae919e62f2269e3844aa9380bf28107b8 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sun, 12 Jun 2022 11:59:05 -0400 Subject: [PATCH 37/44] Emit aliases into the system image - Put the interposer in llvm.compiler.used. - Injecting the aliases after optimization: Our multiversioning pass interacts badly with the llvm.compiler.used gvar. - run `postopt` passes independent of optimization passes. (cherry picked from commit 3407fb3f7f93e4a372393ab81c7a985a99867c50) Co-authored-by: Tim Besard Co-authored-by: Valentin Churavy --- src/aotcompile.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp index 1c5ccbebcb0a7..4d21e307586dc 100644 --- a/src/aotcompile.cpp +++ b/src/aotcompile.cpp @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include #include #include @@ -31,6 +33,9 @@ #include #include #include +#include +#include +#include #if defined(USE_POLLY) #include #include @@ -431,6 +436,23 @@ static void reportWriterError(const ErrorInfoBase &E) jl_safe_printf("ERROR: failed to emit output file %s\n", err.c_str()); } +static void injectCRTAlias(Module &M, StringRef name, StringRef alias, FunctionType *FT) +{ + Function *target = M.getFunction(alias); + if (!target) { + target = Function::Create(FT, Function::ExternalLinkage, alias, M); + } + Function *interposer = Function::Create(FT, Function::WeakAnyLinkage, name, M); + appendToCompilerUsed(M, {interposer}); + + llvm::IRBuilder<> builder(BasicBlock::Create(M.getContext(), "top", interposer)); + SmallVector CallArgs; + for (auto &arg : interposer->args()) + CallArgs.push_back(&arg); + auto val = builder.CreateCall(target, CallArgs); + builder.CreateRet(val); +} + // takes the running content that has collected in the shadow module and dump it to disk // this builds the object file portion of the sysimage files for fast startup @@ -475,7 +497,7 @@ void jl_dump_native_impl(void *native_code, CodeGenOpt::Aggressive // -O3 TODO: respect command -O0 flag? )); - legacy::PassManager PM; + legacy::PassManager PM, postopt; addTargetPasses(&PM, TM.get()); // set up optimization passes @@ -500,12 +522,12 @@ void jl_dump_native_impl(void *native_code, addMachinePasses(&PM, TM.get(), jl_options.opt_level); } if (bc_fname) - PM.add(createBitcodeWriterPass(bc_OS)); + postopt.add(createBitcodeWriterPass(bc_OS)); if (obj_fname) - if (TM->addPassesToEmitFile(PM, obj_OS, nullptr, CGFT_ObjectFile, false)) + if (TM->addPassesToEmitFile(postopt, obj_OS, nullptr, CGFT_ObjectFile, false)) jl_safe_printf("ERROR: target does not support generation of object files\n"); if (asm_fname) - if (TM->addPassesToEmitFile(PM, asm_OS, nullptr, CGFT_AssemblyFile, false)) + if (TM->addPassesToEmitFile(postopt, asm_OS, nullptr, CGFT_AssemblyFile, false)) jl_safe_printf("ERROR: target does not support generation of object files\n"); // Reset the target triple to make sure it matches the new target machine @@ -539,6 +561,24 @@ void jl_dump_native_impl(void *native_code, // do the actual work auto add_output = [&] (Module &M, StringRef unopt_bc_Name, StringRef bc_Name, StringRef obj_Name, StringRef asm_Name) { PM.run(M); + + // We would like to emit an alias or an weakref alias to redirect these symbols + // but LLVM doesn't let us emit a GlobalAlias to a declaration... + // So for now we inject a definition of these functions that calls our runtime + // functions. We do so after optimization to avoid cloning these functions. + injectCRTAlias(M, "__gnu_h2f_ieee", "julia__gnu_h2f_ieee", + FunctionType::get(Type::getFloatTy(Context), { Type::getHalfTy(Context) }, false)); + injectCRTAlias(M, "__extendhfsf2", "julia__gnu_h2f_ieee", + FunctionType::get(Type::getFloatTy(Context), { Type::getHalfTy(Context) }, false)); + injectCRTAlias(M, "__gnu_f2h_ieee", "julia__gnu_f2h_ieee", + FunctionType::get(Type::getHalfTy(Context), { Type::getFloatTy(Context) }, false)); + injectCRTAlias(M, "__truncsfhf2", "julia__gnu_f2h_ieee", + FunctionType::get(Type::getHalfTy(Context), { Type::getFloatTy(Context) }, false)); + injectCRTAlias(M, "__truncdfhf2", "julia__truncdfhf2", + FunctionType::get(Type::getHalfTy(Context), { Type::getDoubleTy(Context) }, false)); + + postopt.run(M); + if (unopt_bc_fname) emit_result(unopt_bc_Archive, unopt_bc_Buffer, unopt_bc_Name, outputs); if (bc_fname) From 4b5ea08749b5b4b53d0882676496df39ea496046 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Mon, 25 Apr 2022 11:50:53 +0900 Subject: [PATCH 38/44] improve `cat` inferrability (#45028) Make `cat` inferrable even if its arguments are not fully constant: ```julia julia> r = rand(Float32, 56, 56, 64, 1); julia> f(r) = cat(r, r, dims=(3,)) f (generic function with 1 method) julia> @inferred f(r); julia> last(@code_typed f(r)) Array{Float32, 4} ``` After descending into its call graph, I found that constant propagation is prohibited at `cat_t(::Type{T}, X...; dims)` due to the method instance heuristic, i.e. its body is considered to be too complex for successful inlining although it's explicitly annotated as `@inline`. But for this case, the constant propagation is greatly helpful both for abstract interpretation and optimization since it can improve the return type inference. Since it is not an easy task to improve the method instance heuristic, which is our primary logic for constant propagation, this commit does a quick fix by helping inference with the `@constprop` annotation. There is another issue that currently there is no good way to properly apply `@constprop`/`@inline` effects to a keyword function (as a note, this is a general issue of macro annotations on a method definition). So this commit also changes some internal helper functions of `cat` so that now they are not keyword ones: the changes are also necessary for the `@inline` annotation on `cat_t` to be effective to trick the method instance heuristic. (cherry picked from commit 65b9be408674bd6b08ea302571b1ac0f52b7a9f7) --- base/abstractarray.jl | 33 +++++++++++++---------------- stdlib/LinearAlgebra/src/special.jl | 4 ++-- test/abstractarray.jl | 4 ++++ test/ambiguous.jl | 15 +++---------- 4 files changed, 24 insertions(+), 32 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 49aec27cb0a58..97c675b90e6d9 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -1716,13 +1716,7 @@ end _cs(d, a, b) = (a == b ? a : throw(DimensionMismatch( "mismatch in dimension $d (expected $a got $b)"))) -function dims2cat(::Val{dims}) where dims - if any(≤(0), dims) - throw(ArgumentError("All cat dimensions must be positive integers, but got $dims")) - end - ntuple(in(dims), maximum(dims)) -end - +dims2cat(::Val{dims}) where dims = dims2cat(dims) function dims2cat(dims) if any(≤(0), dims) throw(ArgumentError("All cat dimensions must be positive integers, but got $dims")) @@ -1730,9 +1724,8 @@ function dims2cat(dims) ntuple(in(dims), maximum(dims)) end -_cat(dims, X...) = cat_t(promote_eltypeof(X...), X...; dims=dims) +_cat(dims, X...) = _cat_t(dims, promote_eltypeof(X...), X...) -@inline cat_t(::Type{T}, X...; dims) where {T} = _cat_t(dims, T, X...) @inline function _cat_t(dims, ::Type{T}, X...) where {T} catdims = dims2cat(dims) shape = cat_size_shape(catdims, X...) @@ -1742,6 +1735,9 @@ _cat(dims, X...) = cat_t(promote_eltypeof(X...), X...; dims=dims) end return __cat(A, shape, catdims, X...) end +# this version of `cat_t` is not very kind for inference and so its usage should be avoided, +# nevertheless it is here just for compat after https://github.com/JuliaLang/julia/pull/45028 +@inline cat_t(::Type{T}, X...; dims) where {T} = _cat_t(dims, T, X...) # Why isn't this called `__cat!`? __cat(A, shape, catdims, X...) = __cat_offset!(A, shape, catdims, ntuple(zero, length(shape)), X...) @@ -1880,8 +1876,8 @@ julia> reduce(hcat, vs) """ hcat(X...) = cat(X...; dims=Val(2)) -typed_vcat(::Type{T}, X...) where T = cat_t(T, X...; dims=Val(1)) -typed_hcat(::Type{T}, X...) where T = cat_t(T, X...; dims=Val(2)) +typed_vcat(::Type{T}, X...) where T = _cat_t(Val(1), T, X...) +typed_hcat(::Type{T}, X...) where T = _cat_t(Val(2), T, X...) """ cat(A...; dims) @@ -1917,7 +1913,8 @@ julia> cat(true, trues(2,2), trues(4)', dims=(1,2)) ``` """ @inline cat(A...; dims) = _cat(dims, A...) -_cat(catdims, A::AbstractArray{T}...) where {T} = cat_t(T, A...; dims=catdims) +# `@constprop :aggressive` allows `catdims` to be propagated as constant improving return type inference +@constprop :aggressive _cat(catdims, A::AbstractArray{T}...) where {T} = _cat_t(catdims, T, A...) # The specializations for 1 and 2 inputs are important # especially when running with --inline=no, see #11158 @@ -1928,12 +1925,12 @@ hcat(A::AbstractArray) = cat(A; dims=Val(2)) hcat(A::AbstractArray, B::AbstractArray) = cat(A, B; dims=Val(2)) hcat(A::AbstractArray...) = cat(A...; dims=Val(2)) -typed_vcat(T::Type, A::AbstractArray) = cat_t(T, A; dims=Val(1)) -typed_vcat(T::Type, A::AbstractArray, B::AbstractArray) = cat_t(T, A, B; dims=Val(1)) -typed_vcat(T::Type, A::AbstractArray...) = cat_t(T, A...; dims=Val(1)) -typed_hcat(T::Type, A::AbstractArray) = cat_t(T, A; dims=Val(2)) -typed_hcat(T::Type, A::AbstractArray, B::AbstractArray) = cat_t(T, A, B; dims=Val(2)) -typed_hcat(T::Type, A::AbstractArray...) = cat_t(T, A...; dims=Val(2)) +typed_vcat(T::Type, A::AbstractArray) = _cat_t(Val(1), T, A) +typed_vcat(T::Type, A::AbstractArray, B::AbstractArray) = _cat_t(Val(1), T, A, B) +typed_vcat(T::Type, A::AbstractArray...) = _cat_t(Val(1), T, A...) +typed_hcat(T::Type, A::AbstractArray) = _cat_t(Val(2), T, A) +typed_hcat(T::Type, A::AbstractArray, B::AbstractArray) = _cat_t(Val(2), T, A, B) +typed_hcat(T::Type, A::AbstractArray...) = _cat_t(Val(2), T, A...) # 2d horizontal and vertical concatenation diff --git a/stdlib/LinearAlgebra/src/special.jl b/stdlib/LinearAlgebra/src/special.jl index beac0c524f2f4..1ead4826127c2 100644 --- a/stdlib/LinearAlgebra/src/special.jl +++ b/stdlib/LinearAlgebra/src/special.jl @@ -414,14 +414,14 @@ const _TypedDenseConcatGroup{T} = Union{Vector{T}, Adjoint{T,Vector{T}}, Transpo promote_to_array_type(::Tuple{Vararg{Union{_DenseConcatGroup,UniformScaling}}}) = Matrix -Base._cat(dims, xs::_DenseConcatGroup...) = Base.cat_t(promote_eltype(xs...), xs...; dims=dims) +Base._cat(dims, xs::_DenseConcatGroup...) = Base._cat_t(dims, promote_eltype(xs...), xs...) vcat(A::Vector...) = Base.typed_vcat(promote_eltype(A...), A...) vcat(A::_DenseConcatGroup...) = Base.typed_vcat(promote_eltype(A...), A...) hcat(A::Vector...) = Base.typed_hcat(promote_eltype(A...), A...) hcat(A::_DenseConcatGroup...) = Base.typed_hcat(promote_eltype(A...), A...) hvcat(rows::Tuple{Vararg{Int}}, xs::_DenseConcatGroup...) = Base.typed_hvcat(promote_eltype(xs...), rows, xs...) # For performance, specially handle the case where the matrices/vectors have homogeneous eltype -Base._cat(dims, xs::_TypedDenseConcatGroup{T}...) where {T} = Base.cat_t(T, xs...; dims=dims) +Base._cat(dims, xs::_TypedDenseConcatGroup{T}...) where {T} = Base._cat_t(dims, T, xs...) vcat(A::_TypedDenseConcatGroup{T}...) where {T} = Base.typed_vcat(T, A...) hcat(A::_TypedDenseConcatGroup{T}...) where {T} = Base.typed_hcat(T, A...) hvcat(rows::Tuple{Vararg{Int}}, xs::_TypedDenseConcatGroup{T}...) where {T} = Base.typed_hvcat(T, rows, xs...) diff --git a/test/abstractarray.jl b/test/abstractarray.jl index c811f0d11176f..f504af8a08247 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -733,6 +733,10 @@ function test_cat(::Type{TestAbstractArray}) cat3v(As) = cat(As...; dims=Val(3)) @test @inferred(cat3v(As)) == zeros(2, 2, 2) @test @inferred(cat(As...; dims=Val((1,2)))) == zeros(4, 4) + + r = rand(Float32, 56, 56, 64, 1); + f(r) = cat(r, r, dims=(3,)) + @inferred f(r); end function test_ind2sub(::Type{TestAbstractArray}) diff --git a/test/ambiguous.jl b/test/ambiguous.jl index e7b3b13fba0ff..8d8c3efab53b9 100644 --- a/test/ambiguous.jl +++ b/test/ambiguous.jl @@ -172,20 +172,11 @@ using LinearAlgebra, SparseArrays, SuiteSparse # not using isempty so this prints more information when it fails @testset "detect_ambiguities" begin let ambig = Set{Any}(((m1.sig, m2.sig) for (m1, m2) in detect_ambiguities(Core, Base; recursive=true, ambiguous_bottom=false, allowed_undefineds))) - @test isempty(ambig) - expect = [] good = true - while !isempty(ambig) - sigs = pop!(ambig) - i = findfirst(==(sigs), expect) - if i === nothing - println(stderr, "push!(expect, (", sigs[1], ", ", sigs[2], "))") - good = false - continue - end - deleteat!(expect, i) + for (sig1, sig2) in ambig + @test sig1 === sig2 # print this ambiguity + good = false end - @test isempty(expect) @test good end From 5cd84443d2d56cd12079bd0ad917cbaf2d059c3c Mon Sep 17 00:00:00 2001 From: N5N3 <2642243996@qq.com> Date: Tue, 26 Jul 2022 06:34:03 +0800 Subject: [PATCH 39/44] `copyto!` fix for `BitArray`/`AbstractArray`, fixes #25968 (#46161) 1. map `copyto!(::BitArray, n1, ::BitArray, n2, l)` to `Base.unsafe_copyto!` 2. add missing unaliasing in `copyto!` for `AbstractArray` (cherry picked from commit 0ea2b2d2d724a54f8531908e85857e2f5b72dc4a) --- base/abstractarray.jl | 15 ++++++++------- base/bitarray.jl | 5 +++-- test/bitarray.jl | 9 +++++---- test/copy.jl | 7 +++++++ 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 97c675b90e6d9..a27a9cd7271b5 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -879,13 +879,12 @@ See also [`copyto!`](@ref). is available from the `Future` standard library as `Future.copy!`. """ function copy!(dst::AbstractVector, src::AbstractVector) + firstindex(dst) == firstindex(src) || throw(ArgumentError( + "vectors must have the same offset for copy! (consider using `copyto!`)")) if length(dst) != length(src) resize!(dst, length(src)) end - for i in eachindex(dst, src) - @inbounds dst[i] = src[i] - end - dst + copyto!(dst, src) end function copy!(dst::AbstractArray, src::AbstractArray) @@ -1084,8 +1083,9 @@ function copyto!(dest::AbstractArray, dstart::Integer, destinds, srcinds = LinearIndices(dest), LinearIndices(src) (checkbounds(Bool, destinds, dstart) && checkbounds(Bool, destinds, dstart+n-1)) || throw(BoundsError(dest, dstart:dstart+n-1)) (checkbounds(Bool, srcinds, sstart) && checkbounds(Bool, srcinds, sstart+n-1)) || throw(BoundsError(src, sstart:sstart+n-1)) - @inbounds for i = 0:(n-1) - dest[dstart+i] = src[sstart+i] + src′ = unalias(dest, src) + @inbounds for i = 0:n-1 + dest[dstart+i] = src′[sstart+i] end return dest end @@ -1107,11 +1107,12 @@ function copyto!(B::AbstractVecOrMat{R}, ir_dest::AbstractRange{Int}, jr_dest::A end @boundscheck checkbounds(B, ir_dest, jr_dest) @boundscheck checkbounds(A, ir_src, jr_src) + A′ = unalias(B, A) jdest = first(jr_dest) for jsrc in jr_src idest = first(ir_dest) for isrc in ir_src - @inbounds B[idest,jdest] = A[isrc,jsrc] + @inbounds B[idest,jdest] = A′[isrc,jsrc] idest += step(ir_dest) end jdest += step(jr_dest) diff --git a/base/bitarray.jl b/base/bitarray.jl index 7dd337c15867f..b8a60c1afd35d 100644 --- a/base/bitarray.jl +++ b/base/bitarray.jl @@ -458,10 +458,11 @@ function unsafe_copyto!(dest::BitArray, doffs::Integer, src::Union{BitArray,Arra return dest end -copyto!(dest::BitArray, doffs::Integer, src::Array, soffs::Integer, n::Integer) = +copyto!(dest::BitArray, doffs::Integer, src::Union{BitArray,Array}, soffs::Integer, n::Integer) = _copyto_int!(dest, Int(doffs), src, Int(soffs), Int(n)) -function _copyto_int!(dest::BitArray, doffs::Int, src::Array, soffs::Int, n::Int) +function _copyto_int!(dest::BitArray, doffs::Int, src::Union{BitArray,Array}, soffs::Int, n::Int) n == 0 && return dest + n < 0 && throw(ArgumentError("Number of elements to copy must be nonnegative.")) soffs < 1 && throw(BoundsError(src, soffs)) doffs < 1 && throw(BoundsError(dest, doffs)) soffs+n-1 > length(src) && throw(BoundsError(src, length(src)+1)) diff --git a/test/bitarray.jl b/test/bitarray.jl index 2add644cb1caa..3ac9f655dffcc 100644 --- a/test/bitarray.jl +++ b/test/bitarray.jl @@ -15,12 +15,11 @@ bitcheck(x) = true bcast_setindex!(b, x, I...) = (b[I...] .= x; b) function check_bitop_call(ret_type, func, args...; kwargs...) - r1 = func(args...; kwargs...) r2 = func(map(x->(isa(x, BitArray) ? Array(x) : x), args)...; kwargs...) - ret_type ≢ nothing && !isa(r1, ret_type) && @show ret_type, typeof(r1) - ret_type ≢ nothing && @test isa(r1, ret_type) + r1 = func(args...; kwargs...) + ret_type ≢ nothing && (@test isa(r1, ret_type) || @show ret_type, typeof(r1)) @test tc(r1, r2) - @test isequal(r1, ret_type ≡ nothing ? r2 : r2) + @test isequal(r1, r2) @test bitcheck(r1) end macro check_bit_operation(ex, ret_type) @@ -499,12 +498,14 @@ timesofar("constructors") end end + self_copyto!(a, n1, n2, l) = copyto!(a, n1, a, n2, l) for p1 = [rand(1:v1) 1 63 64 65 191 192 193] for p2 = [rand(1:v1) 1 63 64 65 191 192 193] for n = 0 : min(v1 - p1 + 1, v1 - p2 + 1) b1 = bitrand(v1) b2 = bitrand(v1) @check_bit_operation copyto!(b1, p1, b2, p2, n) BitVector + @check_bit_operation self_copyto!(b1, p1, p2, n) BitVector end end end diff --git a/test/copy.jl b/test/copy.jl index 04fda36728e62..c4fcff40f2b3f 100644 --- a/test/copy.jl +++ b/test/copy.jl @@ -245,3 +245,10 @@ end @testset "deepcopy_internal arrays" begin @test (@inferred Base.deepcopy_internal(zeros(), IdDict())) == zeros() end + +@testset "`copyto!`'s unaliasing" begin + a = view([1:3;], :) + @test copyto!(a, 2, a, 1, 2) == [1;1:2;] + a = [1:3;] + @test copyto!(a, 2:3, 1:1, a, 1:2, 1:1) == [1;1:2;] +end From 2415a1487e6c73c397460b98667421fd82b52ab5 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 29 Jul 2022 20:01:39 -0400 Subject: [PATCH 40/44] dump: ensure we generate the whole backedge graph (#46171) The edge-restore algorithm here is pretty bad now, but this should hopefully fix #45444 (cherry picked from commit 6b51780a47b9dfe44462a1656d353ded2c960d38) --- src/dump.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/dump.c b/src/dump.c index f04a6b27d8099..44f6262f37d5c 100644 --- a/src/dump.c +++ b/src/dump.c @@ -257,6 +257,7 @@ static int has_backedge_to_worklist(jl_method_instance_t *mi, htable_t *visited) if (*bp != HT_NOTFOUND) return (char*)*bp - (char*)HT_NOTFOUND - 1; *bp = (void*)((char*)HT_NOTFOUND + 1); // preliminarily mark as "not found" + // TODO: this algorithm deals with cycles incorrectly jl_module_t *mod = mi->def.module; if (jl_is_method(mod)) mod = ((jl_method_t*)mod)->module; @@ -1122,7 +1123,7 @@ static void collect_backedges(jl_method_instance_t *callee) JL_GC_DISABLED // - if the method is owned by a worklist module, add it to the list of things to be // fully serialized // - otherwise (i.e., if it's an external method), check all of its specializations. -// Collect backedges from those that are not being fully serialized. +// Collect all external backedges (may be needed later when we invert this list). static int jl_collect_methcache_from_mod(jl_typemap_entry_t *ml, void *closure) JL_GC_DISABLED { jl_array_t *s = (jl_array_t*)closure; @@ -1136,7 +1137,7 @@ static int jl_collect_methcache_from_mod(jl_typemap_entry_t *ml, void *closure) size_t i, l = jl_svec_len(specializations); for (i = 0; i < l; i++) { jl_method_instance_t *callee = (jl_method_instance_t*)jl_svecref(specializations, i); - if ((jl_value_t*)callee != jl_nothing && !method_instance_in_queue(callee)) + if ((jl_value_t*)callee != jl_nothing) collect_backedges(callee); } } @@ -1199,6 +1200,8 @@ static void jl_collect_extext_methods_from_mod(jl_array_t *s, jl_module_t *m) JL // flatten the backedge map reachable from caller into callees static void jl_collect_backedges_to(jl_method_instance_t *caller, htable_t *all_callees) JL_GC_DISABLED { + if (module_in_worklist(caller->def.method->module) || method_instance_in_queue(caller)) + return; jl_array_t **pcallees = (jl_array_t**)ptrhash_bp(&edges_map, (void*)caller), *callees = *pcallees; if (callees != HT_NOTFOUND) { @@ -1227,7 +1230,10 @@ static void jl_collect_backedges( /* edges */ jl_array_t *s, /* ext_targets */ j for (i = 0; i < edges_map.size; i += 2) { jl_method_instance_t *caller = (jl_method_instance_t*)table[i]; jl_array_t *callees = (jl_array_t*)table[i + 1]; - if (callees != HT_NOTFOUND && (module_in_worklist(caller->def.method->module) || method_instance_in_queue(caller))) { + if (callees == HT_NOTFOUND) + continue; + assert(jl_is_method_instance(caller) && jl_is_method(caller->def.method)); + if (module_in_worklist(caller->def.method->module) || method_instance_in_queue(caller)) { size_t i, l = jl_array_len(callees); for (i = 0; i < l; i++) { jl_value_t *c = jl_array_ptr_ref(callees, i); From 4fa7980e065d50cc4e92e157d3b89f6b1fa08be7 Mon Sep 17 00:00:00 2001 From: Gautam Mishra Date: Mon, 25 Jul 2022 03:46:01 +0530 Subject: [PATCH 41/44] Fix rem2pi for NaN inputs, fixes #32888. (#36420) (cherry picked from commit 665b03e28248e8b6b5d4492887a9621e8107e522) --- base/math.jl | 8 ++++++++ test/numbers.jl | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/base/math.jl b/base/math.jl index 47f9512d4efff..681cd07453def 100644 --- a/base/math.jl +++ b/base/math.jl @@ -1131,6 +1131,8 @@ julia> rem2pi(7pi/4, RoundDown) """ function rem2pi end function rem2pi(x::Float64, ::RoundingMode{:Nearest}) + isnan(x) && return NaN + abs(x) < pi && return x n,y = rem_pio2_kernel(x) @@ -1154,6 +1156,8 @@ function rem2pi(x::Float64, ::RoundingMode{:Nearest}) end end function rem2pi(x::Float64, ::RoundingMode{:ToZero}) + isnan(x) && return NaN + ax = abs(x) ax <= 2*Float64(pi,RoundDown) && return x @@ -1179,6 +1183,8 @@ function rem2pi(x::Float64, ::RoundingMode{:ToZero}) copysign(z,x) end function rem2pi(x::Float64, ::RoundingMode{:Down}) + isnan(x) && return NaN + if x < pi4o2_h if x >= 0 return x @@ -1208,6 +1214,8 @@ function rem2pi(x::Float64, ::RoundingMode{:Down}) end end function rem2pi(x::Float64, ::RoundingMode{:Up}) + isnan(x) && return NaN + if x > -pi4o2_h if x <= 0 return x diff --git a/test/numbers.jl b/test/numbers.jl index 38c7c5c9b9e13..7520fbf3a2b2f 100644 --- a/test/numbers.jl +++ b/test/numbers.jl @@ -2611,6 +2611,13 @@ end @test rem2pi(T(-8), RoundUp) ≈ -8+2pi end +@testset "PR #36420 $T" for T in (Float16, Float32, Float64) + @test rem2pi(T(NaN), RoundToZero) === T(NaN) + @test rem2pi(T(NaN), RoundNearest) === T(NaN) + @test rem2pi(T(NaN), RoundDown) === T(NaN) + @test rem2pi(T(NaN), RoundUp) === T(NaN) +end + import Base.^ struct PR20530; end struct PR20889; x; end From 87d89f7af625b2596f30c40f4d5e8e32d73c7443 Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Mon, 25 Jul 2022 15:21:43 -0400 Subject: [PATCH 42/44] fix rem2pi for non-finite arguments (#46163) (cherry picked from commit 73c1eeba661f5482ef84a8e0f3e8f535c8cb13d6) --- base/math.jl | 8 ++++---- test/numbers.jl | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/base/math.jl b/base/math.jl index 681cd07453def..1f194f73ca7f9 100644 --- a/base/math.jl +++ b/base/math.jl @@ -1131,7 +1131,7 @@ julia> rem2pi(7pi/4, RoundDown) """ function rem2pi end function rem2pi(x::Float64, ::RoundingMode{:Nearest}) - isnan(x) && return NaN + isfinite(x) || return NaN abs(x) < pi && return x @@ -1156,7 +1156,7 @@ function rem2pi(x::Float64, ::RoundingMode{:Nearest}) end end function rem2pi(x::Float64, ::RoundingMode{:ToZero}) - isnan(x) && return NaN + isfinite(x) || return NaN ax = abs(x) ax <= 2*Float64(pi,RoundDown) && return x @@ -1183,7 +1183,7 @@ function rem2pi(x::Float64, ::RoundingMode{:ToZero}) copysign(z,x) end function rem2pi(x::Float64, ::RoundingMode{:Down}) - isnan(x) && return NaN + isfinite(x) || return NaN if x < pi4o2_h if x >= 0 @@ -1214,7 +1214,7 @@ function rem2pi(x::Float64, ::RoundingMode{:Down}) end end function rem2pi(x::Float64, ::RoundingMode{:Up}) - isnan(x) && return NaN + isfinite(x) || return NaN if x > -pi4o2_h if x <= 0 diff --git a/test/numbers.jl b/test/numbers.jl index 7520fbf3a2b2f..55729ca3d3b30 100644 --- a/test/numbers.jl +++ b/test/numbers.jl @@ -2612,10 +2612,12 @@ end end @testset "PR #36420 $T" for T in (Float16, Float32, Float64) - @test rem2pi(T(NaN), RoundToZero) === T(NaN) - @test rem2pi(T(NaN), RoundNearest) === T(NaN) - @test rem2pi(T(NaN), RoundDown) === T(NaN) - @test rem2pi(T(NaN), RoundUp) === T(NaN) + for r in (RoundToZero, RoundNearest, RoundDown, RoundUp) + for x in (Inf, -Inf, NaN, -NaN) + @test isnan(rem2pi(T(x), r)) + @test rem2pi(T(x), r) isa T + end + end end import Base.^ From 3e4646d33be63d762c549c87e177c539c07e4100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 22 Jul 2022 00:21:33 +0100 Subject: [PATCH 43/44] [LinearAlgebra] Support more env variables to set OpenBLAS threads (#46118) (cherry picked from commit 6009ae9ca25d7c63c8a449a83722b8d93849a29f) --- stdlib/LinearAlgebra/src/LinearAlgebra.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/LinearAlgebra/src/LinearAlgebra.jl b/stdlib/LinearAlgebra/src/LinearAlgebra.jl index 86e07e118c708..9e1e75126274b 100644 --- a/stdlib/LinearAlgebra/src/LinearAlgebra.jl +++ b/stdlib/LinearAlgebra/src/LinearAlgebra.jl @@ -582,7 +582,8 @@ function __init__() # register a hook to disable BLAS threading Base.at_disable_library_threading(() -> BLAS.set_num_threads(1)) - if !haskey(ENV, "OPENBLAS_NUM_THREADS") + # https://github.com/xianyi/OpenBLAS/blob/c43ec53bdd00d9423fc609d7b7ecb35e7bf41b85/README.md#setting-the-number-of-threads-using-environment-variables + if !haskey(ENV, "OPENBLAS_NUM_THREADS") && !haskey(ENV, "GOTO_NUM_THREADS") && !haskey(ENV, "OMP_NUM_THREADS") @static if Sys.isapple() && Base.BinaryPlatforms.arch(Base.BinaryPlatforms.HostPlatform()) == "aarch64" BLAS.set_num_threads(max(1, Sys.CPU_THREADS)) else From 50bbad7ecdf135a3ad67737d3e9a69550e6af93a Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sat, 6 Aug 2022 02:27:20 -0400 Subject: [PATCH 44/44] Lazily initialize Profile buffer (#46239) (cherry picked from commit 72473aecea477b3d9e01160ed0e9aa822657934f) --- src/signal-handling.c | 136 ++++++++++++++++---------------- src/signals-unix.c | 8 ++ stdlib/Profile/src/Profile.jl | 39 +++++++-- stdlib/Profile/test/runtests.jl | 2 + 4 files changed, 111 insertions(+), 74 deletions(-) diff --git a/src/signal-handling.c b/src/signal-handling.c index acaa934397485..290731a6efbb6 100644 --- a/src/signal-handling.c +++ b/src/signal-handling.c @@ -35,6 +35,74 @@ void jl_lock_profile(void); void jl_unlock_profile(void); void jl_shuffle_int_array_inplace(volatile uint64_t *carray, size_t size, uint64_t *seed); +/////////////////////// +// Utility functions // +/////////////////////// +JL_DLLEXPORT int jl_profile_init(size_t maxsize, uint64_t delay_nsec) +{ + bt_size_max = maxsize; + nsecprof = delay_nsec; + if (bt_data_prof != NULL) + free((void*)bt_data_prof); + if (profile_round_robin_thread_order == NULL) { + // NOTE: We currently only allocate this once, since jl_n_threads cannot change + // during execution of a julia process. If/when this invariant changes in the + // future, this will have to be adjusted. + profile_round_robin_thread_order = (uint64_t*) calloc(jl_n_threads, sizeof(uint64_t)); + for (int i = 0; i < jl_n_threads; i++) { + profile_round_robin_thread_order[i] = i; + } + } + profile_cong_rng_seed = jl_rand(); + unbias_cong(jl_n_threads, &profile_cong_rng_unbias); + bt_data_prof = (jl_bt_element_t*) calloc(maxsize, sizeof(jl_bt_element_t)); + if (bt_data_prof == NULL && maxsize > 0) + return -1; + bt_size_cur = 0; + return 0; +} + +void jl_shuffle_int_array_inplace(volatile uint64_t *carray, size_t size, uint64_t *seed) { + // The "modern Fisher–Yates shuffle" - O(n) algorithm + // https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm + for (size_t i = size - 1; i >= 1; --i) { + size_t j = cong(i, profile_cong_rng_unbias, seed); + uint64_t tmp = carray[j]; + carray[j] = carray[i]; + carray[i] = tmp; + } +} + +JL_DLLEXPORT uint8_t *jl_profile_get_data(void) +{ + return (uint8_t*) bt_data_prof; +} + +JL_DLLEXPORT size_t jl_profile_len_data(void) +{ + return bt_size_cur; +} + +JL_DLLEXPORT size_t jl_profile_maxlen_data(void) +{ + return bt_size_max; +} + +JL_DLLEXPORT uint64_t jl_profile_delay_nsec(void) +{ + return nsecprof; +} + +JL_DLLEXPORT void jl_profile_clear_data(void) +{ + bt_size_cur = 0; +} + +JL_DLLEXPORT int jl_profile_is_running(void) +{ + return running; +} + JL_DLLEXPORT int jl_profile_is_buffer_full(void) { // declare buffer full if there isn't enough room to take samples across all threads @@ -323,74 +391,6 @@ void jl_critical_error(int sig, bt_context_t *context, jl_task_t *ct) jl_gc_debug_critical_error(); } -/////////////////////// -// Utility functions // -/////////////////////// -JL_DLLEXPORT int jl_profile_init(size_t maxsize, uint64_t delay_nsec) -{ - bt_size_max = maxsize; - nsecprof = delay_nsec; - if (bt_data_prof != NULL) - free((void*)bt_data_prof); - if (profile_round_robin_thread_order == NULL) { - // NOTE: We currently only allocate this once, since jl_n_threads cannot change - // during execution of a julia process. If/when this invariant changes in the - // future, this will have to be adjusted. - profile_round_robin_thread_order = (uint64_t*) calloc(jl_n_threads, sizeof(uint64_t)); - for (int i = 0; i < jl_n_threads; i++) { - profile_round_robin_thread_order[i] = i; - } - } - profile_cong_rng_seed = jl_rand(); - unbias_cong(jl_n_threads, &profile_cong_rng_unbias); - bt_data_prof = (jl_bt_element_t*) calloc(maxsize, sizeof(jl_bt_element_t)); - if (bt_data_prof == NULL && maxsize > 0) - return -1; - bt_size_cur = 0; - return 0; -} - -void jl_shuffle_int_array_inplace(volatile uint64_t *carray, size_t size, uint64_t *seed) { - // The "modern Fisher–Yates shuffle" - O(n) algorithm - // https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm - for (size_t i = size - 1; i >= 1; --i) { - size_t j = cong(i, profile_cong_rng_unbias, seed); - uint64_t tmp = carray[j]; - carray[j] = carray[i]; - carray[i] = tmp; - } -} - -JL_DLLEXPORT uint8_t *jl_profile_get_data(void) -{ - return (uint8_t*) bt_data_prof; -} - -JL_DLLEXPORT size_t jl_profile_len_data(void) -{ - return bt_size_cur; -} - -JL_DLLEXPORT size_t jl_profile_maxlen_data(void) -{ - return bt_size_max; -} - -JL_DLLEXPORT uint64_t jl_profile_delay_nsec(void) -{ - return nsecprof; -} - -JL_DLLEXPORT void jl_profile_clear_data(void) -{ - bt_size_cur = 0; -} - -JL_DLLEXPORT int jl_profile_is_running(void) -{ - return running; -} - #ifdef __cplusplus } #endif diff --git a/src/signals-unix.c b/src/signals-unix.c index ca624c765303f..5dd414c1a9e15 100644 --- a/src/signals-unix.c +++ b/src/signals-unix.c @@ -673,6 +673,14 @@ void trigger_profile_peek(void) jl_safe_printf("\n======================================================================================\n"); jl_safe_printf("Information request received. A stacktrace will print followed by a %.1f second profile\n", profile_peek_duration); jl_safe_printf("======================================================================================\n"); + if (bt_size_max == 0){ + // If the buffer hasn't been initialized, initialize with default size + // Keep these values synchronized with Profile.default_init() + if (jl_profile_init(10000000 * jl_n_threads, 1000000) == -1){ + jl_safe_printf("ERROR: could not initialize the profile buffer"); + return; + } + } bt_size_cur = 0; // clear profile buffer if (jl_profile_start_timer() < 0) jl_safe_printf("ERROR: Could not start profile timer\n"); diff --git a/stdlib/Profile/src/Profile.jl b/stdlib/Profile/src/Profile.jl index e24544839fc5f..2a4c33228755c 100644 --- a/stdlib/Profile/src/Profile.jl +++ b/stdlib/Profile/src/Profile.jl @@ -23,10 +23,7 @@ appended to an internal buffer of backtraces. macro profile(ex) return quote try - status = start_timer() - if status < 0 - error(error_codes[status]) - end + start_timer() $(esc(ex)) finally stop_timer() @@ -98,6 +95,11 @@ using keywords or in the order `(n, delay)`. """ function init(; n::Union{Nothing,Integer} = nothing, delay::Union{Nothing,Real} = nothing, limitwarn::Bool = true) n_cur = ccall(:jl_profile_maxlen_data, Csize_t, ()) + if n_cur == 0 && isnothing(n) && isnothing(delay) + # indicates that the buffer hasn't been initialized at all, so set the default + default_init() + n_cur = ccall(:jl_profile_maxlen_data, Csize_t, ()) + end delay_cur = ccall(:jl_profile_delay_nsec, UInt64, ())/10^9 if n === nothing && delay === nothing nthreads = Sys.iswindows() ? 1 : Threads.nthreads() # windows only profiles the main thread @@ -126,7 +128,7 @@ function init(n::Integer, delay::Real; limitwarn::Bool = true) end end -function __init__() +function default_init() # init with default values # Use a max size of 10M profile samples, and fire timer every 1ms # (that should typically give around 100 seconds of record) @@ -136,10 +138,25 @@ function __init__() n = 1_000_000 delay = 0.01 else + # Keep these values synchronized with trigger_profile_peek n = 10_000_000 delay = 0.001 end init(n, delay, limitwarn = false) +end + +# Checks whether the profile buffer has been initialized. If not, initializes it with the default size. +function check_init() + buffer_size = @ccall jl_profile_maxlen_data()::Int + if buffer_size == 0 + default_init() + end +end + +function __init__() + # Note: The profile buffer is no longer initialized during __init__ because Profile is in the sysimage, + # thus __init__ is called every startup. The buffer is lazily initialized the first time `@profile` is + # used, if not manually initialized before that. @static if !Sys.iswindows() # triggering a profile via signals is not implemented on windows PROFILE_PRINT_COND[] = Base.AsyncCondition() @@ -567,7 +584,14 @@ Julia, and examine the resulting `*.mem` files. clear_malloc_data() = ccall(:jl_clear_malloc_data, Cvoid, ()) # C wrappers -start_timer() = ccall(:jl_profile_start_timer, Cint, ()) +function start_timer() + check_init() # if the profile buffer hasn't been initialized, initialize with default size + status = ccall(:jl_profile_start_timer, Cint, ()) + if status < 0 + error(error_codes[status]) + end +end + stop_timer() = ccall(:jl_profile_stop_timer, Cvoid, ()) @@ -599,6 +623,9 @@ By default metadata such as threadid and taskid is included. Set `include_meta` """ function fetch(;include_meta = true, limitwarn = true) maxlen = maxlen_data() + if maxlen == 0 + error("The profiling data buffer is not initialized. A profile has not been requested this session.") + end len = len_data() if limitwarn && is_buffer_full() @warn """The profile data buffer is full; profiling probably terminated diff --git a/stdlib/Profile/test/runtests.jl b/stdlib/Profile/test/runtests.jl index 058158023cd25..2b523ffa44f0e 100644 --- a/stdlib/Profile/test/runtests.jl +++ b/stdlib/Profile/test/runtests.jl @@ -3,6 +3,8 @@ using Test, Profile, Serialization, Logging using Base.StackTraces: StackFrame +@test_throws "The profiling data buffer is not initialized. A profile has not been requested this session." Profile.print() + Profile.clear() Profile.init()