What changed, and why it matters
This is a routine build-system and toolchain update for the BitBox02 firmware. It adds support for a new ARM processor target (Cortex-M33), upgrades the Rust compiler, LLVM, and the ARM GNU toolchain, and pulls in newer versions of some third-party Rust libraries. There is no direct evidence in the commit of a security vulnerability being fixed or introduced. The main risk is the usual one with large toolchain and dependency updates: a small chance that compiler, library, or behavior changes could introduce subtle bugs, but nothing in the diff points to an exploitable flaw.
Treat as a normal maintenance commit. Verify the updated container builds correctly and that firmware tests, including unit tests and simulator tests, pass with the new toolchain. Review release notes for the upgraded Rust/LLVM/Arm toolchain versions for any known security advisories, but no immediate security action is required based on this diff alone.
Security signals we found
Large dependency/vendor update with 423 files changed
Toolchain version bumps (Rust, LLVM, Arm GNU toolchain)
New Rust target added for Cortex-M33 (thumbv8m.main-none-eabihf)
No explicit security fix or vulnerability mention in commit message
No changes to cryptographic, authentication, or secret-handling code visible in diff
Evidence from the diff
The commit is a build infrastructure refresh: adds thumbv8m.main-none-eabihf Rust target, bumps clang/llvm from 18 to 21, Arm GNU toolchain from 14.2 to 15.2, rustc to a newer version, and vendors updated Rust crates (addr2line, cfg-if, dlmalloc, gimli, hashbrown, memchr, wit-bindgen, plus new foldhash and windows-* crates). It also adjusts .clang-tidy suppressions and formatting scripts. The firmware source changes are minimal (a few C files touched for style/tidy compatibility). No security-relevant code changes are visible in the supplied diff.
Changed components
Docker build environment (Dockerfile)Rust toolchain configuration (src/rust/rust-toolchain.toml)Vendored Rust dependencies under external/vendor/CI style/tidy scripts (.ci/check-style, .ci/check-tidy, .clang-tidy)Minor C source formatting in src/factorysetup.c, src/qtouch/qtouch.c, src/ui/ugui/ugui.c, test/simulator/simulator.c, test/unit-test filesInspect captured patch +162194 / −109761
diff --git a/.ci/check-style b/.ci/check-style
index 9da2c9a1..685fa7e7 100755
--- a/.ci/check-style
+++ b/.ci/check-style
@@ -8,7 +8,7 @@ set -e
# Exit on pipe fail
set -o pipefail
-CLANGFORMAT=${CLANGFORMAT:-clang-format-18}
+CLANGFORMAT=${CLANGFORMAT:-clang-format-21}
RUSTFMT=${RUSTFMT:-rustfmt}
command -v git >/dev/null 2>&1 || { echo >&2 "git is missing"; exit 1; }
diff --git a/.ci/check-tidy b/.ci/check-tidy
index 62fe4114..1b300ca0 100755
--- a/.ci/check-tidy
+++ b/.ci/check-tidy
@@ -8,7 +8,7 @@ set -e
# Exit on pipe fail
set -o pipefail
-CLANGTIDY=${CLANGTIDY:-clang-tidy-18}
+CLANGTIDY=${CLANGTIDY:-clang-tidy-21}
command -v git >/dev/null 2>&1 || { echo >&2 "git is missing"; exit 1; }
command -v xargs >/dev/null 2>&1 || { echo >&2 "xargs is missing"; exit 1; }
diff --git a/.clang-tidy b/.clang-tidy
index 090452d7..a98cb9aa 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -17,7 +17,11 @@ Checks: >-
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
-readability-avoid-unconditional-preprocessor-if,
-readability-suspicious-call-argument,
- -clang-diagnostic-incompatible-pointer-types-discards-qualifiers
+ -clang-diagnostic-incompatible-pointer-types-discards-qualifiers,
+ -readability-use-concise-preprocessor-directives,
+ -readability-math-missing-parentheses,
+ -clang-analyzer-core.FixedAddressDereference,
+ -clang-diagnostic-cast-qual
HeaderFilterRegex: '.*'
ExtraArgs:
- -Wno-unknown-warning-option
diff --git a/.containerversion b/.containerversion
index 82cced27..0691f67b 100644
--- a/.containerversion
+++ b/.containerversion
@@ -1 +1 @@
-51
+52
diff --git a/Dockerfile b/Dockerfile
index 8ac9b199..4bf0a7a5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,18 +14,18 @@ ARG TARGETARCH
RUN apt-get update && apt-get upgrade -y && apt-get install -y wget nano rsync curl gnupg2 jq unzip bzip2 xz-utils
-# for clang-*-15, see https://apt.llvm.org/
-RUN echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" >> /etc/apt/sources.list && \
- echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" >> /etc/apt/sources.list && \
+# for clang-*-21, see https://apt.llvm.org/
+RUN echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-21 main" >> /etc/apt/sources.list && \
+ echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-21 main" >> /etc/apt/sources.list && \
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
# Install gcc8-arm-none-eabi
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
- GNU_TOOLCHAIN=https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-aarch64-arm-none-eabi.tar.xz \
- GNU_TOOLCHAIN_HASH=87330bab085dd8749d4ed0ad633674b9dc48b237b61069e3b481abd364d0a684; \
+ GNU_TOOLCHAIN=https://developer.arm.com/-/media/Files/downloads/gnu/15.2.rel1/binrel/arm-gnu-toolchain-15.2.rel1-aarch64-arm-none-eabi.tar.xz \
+ GNU_TOOLCHAIN_HASH=d061559d814b205ed30c5b7c577c03317ec447ca51cd5a159d26b12a5bbeb20c; \
else \
- GNU_TOOLCHAIN=https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz \
- GNU_TOOLCHAIN_HASH=62a63b981fe391a9cbad7ef51b17e49aeaa3e7b0d029b36ca1e9c3b2a9b78823; \
+ GNU_TOOLCHAIN=https://developer.arm.com/-/media/Files/downloads/gnu/15.2.rel1/binrel/arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi.tar.xz \
+ GNU_TOOLCHAIN_HASH=597893282ac8c6ab1a4073977f2362990184599643b4c5ee34870a8215783a16; \
fi; \
curl -sSL -o gcc.tar.xz ${GNU_TOOLCHAIN} && \
echo "$GNU_TOOLCHAIN_HASH gcc.tar.xz" | sha256sum -c && \
@@ -35,7 +35,7 @@ RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
# Tools for building
RUN apt-get update && apt-get install -y \
make \
- llvm-18 \
+ llvm-21 \
gcc-10 \
binutils \
valgrind \
@@ -67,8 +67,8 @@ RUN update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-10 100
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
- clang-format-18 \
- clang-tidy-18
+ clang-format-21 \
+ clang-tidy-21
RUN python3 -m pip install --upgrade pip
@@ -132,6 +132,7 @@ ENV RUSTUP_HOME=/opt/rustup
COPY src/rust/rust-toolchain.toml /tmp/rust-toolchain.toml
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | CARGO_HOME=/opt/cargo sh -s -- --default-toolchain $(grep -oP '(?<=channel = ")[^"]+' /tmp/rust-toolchain.toml) -y
RUN rustup target add thumbv7em-none-eabi
+RUN rustup target add thumbv8m.main-none-eabihf
RUN rustup component add rustfmt
RUN rustup component add clippy
RUN rustup component add rust-src
diff --git a/external/vendor/addr2line/.cargo-checksum.json b/external/vendor/addr2line/.cargo-checksum.json
index c40559cb..e3bcc6a0 100644
--- a/external/vendor/addr2line/.cargo-checksum.json
+++ b/external/vendor/addr2line/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{".cargo_vcs_info.json":"61ea40c74a8ba6ecd523f8584b5e52454b0473bbb112e7cf4dce3d4d0f4f253a","CHANGELOG.md":"dc96b6ac3a534d948a55d17bf0144522e26cb6afaeafd79c3533b4988616ffea","Cargo.lock":"a5a5ca765a6f630c80e32310ffa92185a2805c7c364c07479bf2799524561807","Cargo.toml":"915a5053f0fe3a27a6e34a6f35e789ee09ac3bf3a7c4d07a62d68acd1d821104","Cargo.toml.orig":"fce3df826fb5d4229b290467e48252f8da5124213d5b8a5b1e7f0e953b01eef9","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"e99d88d232bf57d70f0fb87f6b496d44b6653f99f8a63d250a54c61ea4bcde40","README.md":"c635ed91d7b0c87ff2f0f311cd1a31336d2cbc4d011965d3b58afaca073538d9","src/bin/addr2line.rs":"147c07d761c845c5faf3e1e3904c33374bc84bc79b2b95ae892b1def5ce6ced6","src/frame.rs":"de3b23388c36a0874db5569d1f49ce6cc52ef2006b9ae9b9a3eba7654b201e2b","src/function.rs":"6e0aceeb826db8fcec78376ee72b5dca098ae3e409e9defc5f1af9bfb2c7f173","src/lib.rs":"0baa05211611d9d79c3162a3e59f2cfe3334a71bece99bb337a7a2326a93093e","src/line.rs":"374afffcd11e38dc1b093d38b16b42d33c2a5fa9e7dbb759ecf15c1f6c58a7a0","src/loader.rs":"10ce28775d65bb32ed2995fae240b4f38499a80b56cdf17c079d166c9f1153f3","src/lookup.rs":"0d28a2fd00f0696f8fb50cdc88cb7d55a910df8bf3052b7c74ae50a387346e67","src/unit.rs":"5f2035954d86aa8dcb4d552ee8fb93c7f792d9fa2b6aeafa62f78b066363c8f5"},"package":"9acbfca36652500c911ddb767ed433e3ed99b032b5d935be73c6923662db1d43"}
\ No newline at end of file
+{"files":{".cargo_vcs_info.json":"70f22e279a4a1b2697dfc1b53ead965a913faa3d2604545c439b28a24bf5eaf5","CHANGELOG.md":"2bfe37c8240577170e3e9122c2e17942e8b2aba73fee100eeeede47b1107f8b8","Cargo.lock":"c9e56108c9a0cadb122774fbe24b2085a521ac1252686dc3cb70ae165af6bdf2","Cargo.toml":"6c371cb14bed07740324acb5b126bd58cf87771be72d4d88366b000f138b8001","Cargo.toml.orig":"1ce22b0b31c6bd077501c96cd568a95ee894042d651b0db9245a2f4395d12872","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"e99d88d232bf57d70f0fb87f6b496d44b6653f99f8a63d250a54c61ea4bcde40","README.md":"c635ed91d7b0c87ff2f0f311cd1a31336d2cbc4d011965d3b58afaca073538d9","src/bin/addr2line.rs":"147c07d761c845c5faf3e1e3904c33374bc84bc79b2b95ae892b1def5ce6ced6","src/frame.rs":"de3b23388c36a0874db5569d1f49ce6cc52ef2006b9ae9b9a3eba7654b201e2b","src/function.rs":"6e0aceeb826db8fcec78376ee72b5dca098ae3e409e9defc5f1af9bfb2c7f173","src/lib.rs":"79fea2e8912719a0a4e30207839e7689e66f6c801a80dde3e81f0fed9c7fd3e8","src/line.rs":"374afffcd11e38dc1b093d38b16b42d33c2a5fa9e7dbb759ecf15c1f6c58a7a0","src/loader.rs":"d94f6ca760382a2f3260fa8e6382196eaba07aaced308f088e8957f94cd21479","src/lookup.rs":"0d28a2fd00f0696f8fb50cdc88cb7d55a910df8bf3052b7c74ae50a387346e67","src/unit.rs":"ec201e91333dc8919ab64f0144025521c46ac897679538432a84788af5244667"},"package":"1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"}
\ No newline at end of file
diff --git a/external/vendor/addr2line/.cargo_vcs_info.json b/external/vendor/addr2line/.cargo_vcs_info.json
index c261ad0e..1c33eaf6 100644
--- a/external/vendor/addr2line/.cargo_vcs_info.json
+++ b/external/vendor/addr2line/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "2f260d1f4e36cc658fd2e1502bc0d65309cddb2c"
+ "sha1": "f02db009deb9b441818afa49cb1b17453c1e4243"
},
"path_in_vcs": ""
}
\ No newline at end of file
diff --git a/external/vendor/addr2line/CHANGELOG.md b/external/vendor/addr2line/CHANGELOG.md
index 74deed56..5c2cc451 100644
--- a/external/vendor/addr2line/CHANGELOG.md
+++ b/external/vendor/addr2line/CHANGELOG.md
@@ -2,6 +2,18 @@
--------------------------------------------------------------------------------
+## 0.25.1 (2025/09/13)
+
+### Changed
+
+* Fixed line parsing for split DWARF.
+ [#353](https://github.com/gimli-rs/addr2line/pull/353)
+
+* Changed `.debug_aranges` parsing to skip invalid entries instead of failing.
+ [#355](https://github.com/gimli-rs/addr2line/pull/355)
+
+--------------------------------------------------------------------------------
+
## 0.25.0 (2025/06/11)
### Breaking changes
diff --git a/external/vendor/addr2line/Cargo.lock b/external/vendor/addr2line/Cargo.lock
index 76c8d44f..47feaae4 100644
--- a/external/vendor/addr2line/Cargo.lock
+++ b/external/vendor/addr2line/Cargo.lock
@@ -13,7 +13,7 @@ dependencies = [
[[package]]
name = "addr2line"
-version = "0.25.0"
+version = "0.25.1"
dependencies = [
"backtrace",
"clap",
@@ -21,10 +21,10 @@ dependencies = [
"criterion",
"fallible-iterator",
"findshlibs",
- "gimli 0.32.0",
+ "gimli 0.32.3",
"libtest-mimic",
"memmap2",
- "object 0.37.1",
+ "object 0.37.3",
"rustc-demangle",
"rustc-std-workspace-alloc",
"rustc-std-workspace-core",
@@ -55,9 +55,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
[[package]]
name = "anstream"
-version = "0.6.19"
+version = "0.6.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933"
+checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192"
dependencies = [
"anstyle",
"anstyle-parse",
@@ -85,29 +85,29 @@ dependencies = [
[[package]]
name = "anstyle-query"
-version = "1.1.3"
+version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9"
+checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2"
dependencies = [
- "windows-sys",
+ "windows-sys 0.60.2",
]
[[package]]
name = "anstyle-wincon"
-version = "3.0.9"
+version = "3.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882"
+checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a"
dependencies = [
"anstyle",
"once_cell_polyfill",
- "windows-sys",
+ "windows-sys 0.60.2",
]
[[package]]
name = "autocfg"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "backtrace"
@@ -121,20 +121,20 @@ dependencies = [
"miniz_oxide",
"object 0.36.7",
"rustc-demangle",
- "windows-targets",
+ "windows-targets 0.52.6",
]
[[package]]
name = "bitflags"
-version = "2.9.1"
+version = "2.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
+checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394"
[[package]]
name = "bumpalo"
-version = "3.18.1"
+version = "3.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee"
+checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
[[package]]
name = "cast"
@@ -144,18 +144,19 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
-version = "1.2.26"
+version = "1.2.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "956a5e21988b87f372569b66183b78babf23ebc2e744b733e4350a752c4dafac"
+checksum = "65193589c6404eb80b450d618eaf9a2cafaaafd57ecce47370519ef674a7bd44"
dependencies = [
+ "find-msvc-tools",
"shlex",
]
[[package]]
name = "cfg-if"
-version = "1.0.1"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
+checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9"
[[package]]
name = "ciborium"
@@ -186,9 +187,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.40"
+version = "4.5.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f"
+checksum = "7eac00902d9d136acd712710d71823fb8ac8004ca445a89e73a41d45aa712931"
dependencies = [
"clap_builder",
"clap_derive",
@@ -196,9 +197,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.5.40"
+version = "4.5.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e"
+checksum = "2ad9bbf750e73b5884fb8a211a9424a1906c1e156724260fdae972f31d70e1d6"
dependencies = [
"anstream",
"anstyle",
@@ -209,9 +210,9 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "4.5.40"
+version = "4.5.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce"
+checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c"
dependencies = [
"heck",
"proc-macro2",
@@ -242,25 +243,25 @@ dependencies = [
[[package]]
name = "crc32fast"
-version = "1.4.2"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
+checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
dependencies = [
"cfg-if",
]
[[package]]
name = "criterion"
-version = "0.6.0"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3bf7af66b0989381bd0be551bd7cc91912a655a58c6918420c9527b1fd8b4679"
+checksum = "e1c047a62b0cc3e145fa84415a3191f628e980b194c2755aa12300a4e6cbd928"
dependencies = [
"anes",
"cast",
"ciborium",
"clap",
"criterion-plot",
- "itertools 0.13.0",
+ "itertools",
"num-traits",
"oorandom",
"plotters",
@@ -274,12 +275,12 @@ dependencies = [
[[package]]
name = "criterion-plot"
-version = "0.5.0"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
+checksum = "9b1bcc0dc7dfae599d84ad0b1a55f80cde8af3725da8313b528da95ef783e338"
dependencies = [
"cast",
- "itertools 0.10.5",
+ "itertools",
]
[[package]]
@@ -309,9 +310,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crunchy"
-version = "0.2.3"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
+checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
[[package]]
name = "either"
@@ -321,12 +322,12 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
[[package]]
name = "errno"
-version = "0.3.12"
+version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18"
+checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
- "windows-sys",
+ "windows-sys 0.61.0",
]
[[package]]
@@ -341,6 +342,12 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
+[[package]]
+name = "find-msvc-tools"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d"
+
[[package]]
name = "findshlibs"
version = "0.10.2"
@@ -371,9 +378,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
[[package]]
name = "gimli"
-version = "0.32.0"
+version = "0.32.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93563d740bc9ef04104f9ed6f86f1e3275c2cdafb95664e26584b9ca807a8ffe"
+checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
dependencies = [
"fallible-iterator",
"rustc-std-workspace-alloc",
@@ -403,15 +410,6 @@ version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
-[[package]]
-name = "itertools"
-version = "0.10.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
-dependencies = [
- "either",
-]
-
[[package]]
name = "itertools"
version = "0.13.0"
@@ -429,9 +427,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
[[package]]
name = "js-sys"
-version = "0.3.77"
+version = "0.3.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
+checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738"
dependencies = [
"once_cell",
"wasm-bindgen",
@@ -445,9 +443,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
-version = "0.2.172"
+version = "0.2.175"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
+checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
[[package]]
name = "libtest-mimic"
@@ -463,27 +461,27 @@ dependencies = [
[[package]]
name = "linux-raw-sys"
-version = "0.9.4"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
+checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
[[package]]
name = "log"
-version = "0.4.27"
+version = "0.4.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
+checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
[[package]]
name = "memchr"
-version = "2.7.4"
+version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
[[package]]
name = "memmap2"
-version = "0.9.5"
+version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f"
+checksum = "843a98750cd611cc2965a8213b53b43e715f13c37a9e096c6408e69990961db7"
dependencies = [
"libc",
]
@@ -517,9 +515,9 @@ dependencies = [
[[package]]
name = "object"
-version = "0.37.1"
+version = "0.37.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03fd943161069e1768b4b3d050890ba48730e590f57e56d4aa04e7e090e61b4a"
+checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
dependencies = [
"flate2",
"memchr",
@@ -575,9 +573,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.95"
+version = "1.0.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
+checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
dependencies = [
"unicode-ident",
]
@@ -593,9 +591,9 @@ dependencies = [
[[package]]
name = "rayon"
-version = "1.10.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
+checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
dependencies = [
"either",
"rayon-core",
@@ -603,9 +601,9 @@ dependencies = [
[[package]]
name = "rayon-core"
-version = "1.12.1"
+version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
+checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
@@ -613,9 +611,9 @@ dependencies = [
[[package]]
name = "regex"
-version = "1.11.1"
+version = "1.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
+checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912"
dependencies = [
"aho-corasick",
"memchr",
@@ -625,9 +623,9 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.4.9"
+version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
+checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6"
dependencies = [
"aho-corasick",
"memchr",
@@ -636,15 +634,15 @@ dependencies = [
[[package]]
name = "regex-syntax"
-version = "0.8.5"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"
[[package]]
name = "rustc-demangle"
-version = "0.1.25"
+version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f"
+checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace"
[[package]]
name = "rustc-std-workspace-alloc"
@@ -660,22 +658,22 @@ checksum = "aa9c45b374136f52f2d6311062c7146bff20fec063c3f5d46a410bd937746955"
[[package]]
name = "rustix"
-version = "1.0.7"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266"
+checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e"
dependencies = [
"bitflags",
"errno",
"libc",
"linux-raw-sys",
- "windows-sys",
+ "windows-sys 0.61.0",
]
[[package]]
name = "rustversion"
-version = "1.0.21"
+version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d"
+checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
[[package]]
name = "ruzstd"
@@ -723,9 +721,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.140"
+version = "1.0.143"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
+checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a"
dependencies = [
"itoa",
"memchr",
@@ -759,9 +757,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
-version = "2.0.102"
+version = "2.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6397daf94fa90f058bd0fd88429dd9e5738999cca8d701813c80723add80462"
+checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
dependencies = [
"proc-macro2",
"quote",
@@ -770,12 +768,12 @@ dependencies = [
[[package]]
name = "terminal_size"
-version = "0.4.2"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed"
+checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0"
dependencies = [
"rustix",
- "windows-sys",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -790,9 +788,9 @@ dependencies = [
[[package]]
name = "twox-hash"
-version = "2.1.1"
+version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b907da542cbced5261bd3256de1b3a1bf340a3d37f93425a07362a1d687de56"
+checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c"
[[package]]
name = "typed-arena"
@@ -802,9 +800,9 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"
[[package]]
name = "unicode-ident"
-version = "1.0.18"
+version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
+checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
[[package]]
name = "utf8parse"
@@ -824,21 +822,22 @@ dependencies = [
[[package]]
name = "wasm-bindgen"
-version = "0.2.100"
+version = "0.2.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
+checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
+ "wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.100"
+version = "0.2.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
+checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb"
dependencies = [
"bumpalo",
"log",
@@ -850,9 +849,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.100"
+version = "0.2.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
+checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -860,9 +859,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.100"
+version = "0.2.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
+checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa"
dependencies = [
"proc-macro2",
"quote",
@@ -873,27 +872,27 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.100"
+version = "0.2.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
+checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1"
dependencies = [
"unicode-ident",
]
[[package]]
name = "wasmparser"
-version = "0.234.0"
+version = "0.236.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be22e5a8f600afce671dd53c8d2dd26b4b7aa810fd18ae27dfc49737f3e02fc5"
+checksum = "a9b1e81f3eb254cf7404a82cee6926a4a3ccc5aad80cc3d43608a070c67aa1d7"
dependencies = [
"bitflags",
]
[[package]]
name = "web-sys"
-version = "0.3.77"
+version = "0.3.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
+checksum = "77e4b637749ff0d92b8fad63aa1f7cff3cbe125fd49c175cd6345e7272638b12"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -917,11 +916,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
-version = "0.1.9"
+version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
+checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
- "windows-sys",
+ "windows-sys 0.61.0",
]
[[package]]
@@ -930,13 +929,34 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+[[package]]
+name = "windows-link"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
+
+[[package]]
+name = "windows-link"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65"
+
[[package]]
name = "windows-sys"
-version = "0.59.0"
+version = "0.60.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
dependencies = [
- "windows-targets",
+ "windows-targets 0.53.3",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.61.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa"
+dependencies = [
+ "windows-link 0.2.0",
]
[[package]]
@@ -945,14 +965,31 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
- "windows_aarch64_gnullvm",
- "windows_aarch64_msvc",
- "windows_i686_gnu",
- "windows_i686_gnullvm",
- "windows_i686_msvc",
- "windows_x86_64_gnu",
- "windows_x86_64_gnullvm",
- "windows_x86_64_msvc",
+ "windows_aarch64_gnullvm 0.52.6",
+ "windows_aarch64_msvc 0.52.6",
+ "windows_i686_gnu 0.52.6",
+ "windows_i686_gnullvm 0.52.6",
+ "windows_i686_msvc 0.52.6",
+ "windows_x86_64_gnu 0.52.6",
+ "windows_x86_64_gnullvm 0.52.6",
+ "windows_x86_64_msvc 0.52.6",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.53.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91"
+dependencies = [
+ "windows-link 0.1.3",
+ "windows_aarch64_gnullvm 0.53.0",
+ "windows_aarch64_msvc 0.53.0",
+ "windows_i686_gnu 0.53.0",
+ "windows_i686_gnullvm 0.53.0",
+ "windows_i686_msvc 0.53.0",
+ "windows_x86_64_gnu 0.53.0",
+ "windows_x86_64_gnullvm 0.53.0",
+ "windows_x86_64_msvc 0.53.0",
]
[[package]]
@@ -961,44 +998,92 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
+
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
+
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+[[package]]
+name = "windows_i686_gnu"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
+
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
+
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+[[package]]
+name = "windows_i686_msvc"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
+
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
+
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
+
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
diff --git a/external/vendor/addr2line/Cargo.toml b/external/vendor/addr2line/Cargo.toml
index 1c9c70bb..c734b4c6 100644
--- a/external/vendor/addr2line/Cargo.toml
+++ b/external/vendor/addr2line/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2018"
rust-version = "1.81"
name = "addr2line"
-version = "0.25.0"
+version = "0.25.1"
build = false
include = [
"/CHANGELOG.md",
@@ -148,7 +148,7 @@ optional = true
version = "0.3.13"
[dev-dependencies.criterion]
-version = "0.6.0"
+version = "0.7.0"
[dev-dependencies.findshlibs]
version = "0.10"
diff --git a/external/vendor/addr2line/Cargo.toml.orig b/external/vendor/addr2line/Cargo.toml.orig
index 58039350..d155a159 100644
--- a/external/vendor/addr2line/Cargo.toml.orig
+++ b/external/vendor/addr2line/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "addr2line"
-version = "0.25.0"
+version = "0.25.1"
description = "A cross-platform symbolication library written in Rust, using `gimli`"
documentation = "https://docs.rs/addr2line"
keywords = ["DWARF", "debug", "elf", "symbolicate", "atos"]
@@ -42,7 +42,7 @@ alloc = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-all
[dev-dependencies]
backtrace = "0.3.13"
-criterion = "0.6.0"
+criterion = "0.7.0"
findshlibs = "0.10"
libtest-mimic = "0.8.1"
auxiliary = { path = "tests/auxiliary" }
diff --git a/external/vendor/addr2line/src/lib.rs b/external/vendor/addr2line/src/lib.rs
index 5e67e72d..ac458dea 100644
--- a/external/vendor/addr2line/src/lib.rs
+++ b/external/vendor/addr2line/src/lib.rs
@@ -167,7 +167,8 @@ impl<R: gimli::Reader> Context<R> {
pub fn find_dwarf_and_unit(
&self,
probe: u64,
- ) -> LookupResult<impl LookupContinuation<Output = Option<gimli::UnitRef<R>>, Buf = R>> {
+ ) -> LookupResult<impl LookupContinuation<Output = Option<gimli::UnitRef<'_, R>>, Buf = R>>
+ {
let mut units_iter = self.units.find(probe);
if let Some(unit) = units_iter.next() {
return LoopingLookup::new_lookup(
diff --git a/external/vendor/addr2line/src/loader.rs b/external/vendor/addr2line/src/loader.rs
index e0265b18..a006ee59 100644
--- a/external/vendor/addr2line/src/loader.rs
+++ b/external/vendor/addr2line/src/loader.rs
@@ -111,7 +111,7 @@ impl Loader {
&self,
probe_low: u64,
probe_high: u64,
- ) -> Result<LocationRangeIter<'_, LoaderReader>> {
+ ) -> Result<LocationRangeIter<'_, LoaderReader<'_>>> {
self.borrow_internal(|i, data, mmap| {
i.find_location_range(probe_low, probe_high, data, mmap)
})
@@ -132,7 +132,7 @@ impl Loader {
}
/// Find the symbol table entry corresponding to the given virtual memory address.
- pub fn find_symbol_info(&self, probe: u64) -> Option<Symbol> {
+ pub fn find_symbol_info(&self, probe: u64) -> Option<Symbol<'_>> {
self.borrow_internal(|i, _data, _mmap| i.find_symbol_info(probe))
}
@@ -294,7 +294,7 @@ impl<'a> LoaderInternal<'a> {
object_context.ctx(symbol.name(), probe - symbol.address())
}
- fn find_symbol_info(&self, probe: u64) -> Option<Symbol> {
+ fn find_symbol_info(&self, probe: u64) -> Option<Symbol<'a>> {
self.symbols.get(probe).map(|x| Symbol {
name: x.name(),
address: x.address(),
@@ -327,7 +327,7 @@ impl<'a> LoaderInternal<'a> {
probe_high: u64,
arena_data: &'a Arena<Vec<u8>>,
arena_mmap: &'a Arena<Mmap>,
- ) -> Result<LocationRangeIter<'a, LoaderReader>> {
+ ) -> Result<LocationRangeIter<'_, LoaderReader<'a>>> {
let (ctx, probe) = self.ctx(probe_low, arena_data, arena_mmap);
// TODO: handle ranges that cover multiple objects
let probe_high = probe + (probe_high - probe_low);
@@ -339,7 +339,7 @@ impl<'a> LoaderInternal<'a> {
probe: u64,
arena_data: &'a Arena<Vec<u8>>,
arena_mmap: &'a Arena<Mmap>,
- ) -> Result<FrameIter<'a, LoaderReader>> {
+ ) -> Result<FrameIter<'_, LoaderReader<'a>>> {
let (ctx, probe) = self.ctx(probe, arena_data, arena_mmap);
let mut frames = ctx.find_frames(probe);
loop {
diff --git a/external/vendor/addr2line/src/unit.rs b/external/vendor/addr2line/src/unit.rs
index 946d2488..ef0bca24 100644
--- a/external/vendor/addr2line/src/unit.rs
+++ b/external/vendor/addr2line/src/unit.rs
@@ -187,7 +187,7 @@ impl<R: gimli::Reader> ResUnit<R> {
}
None => None,
};
- let location = self.find_location(probe, unit.dwarf)?;
+ let location = self.find_location(probe, &ctx.sections)?;
Ok((function, location))
})
}
@@ -302,7 +302,16 @@ impl<R: gimli::Reader> ResUnits<R> {
for (_, aranges_offset) in aranges[i..].iter().take_while(|x| x.0 == offset) {
let aranges_header = sections.debug_aranges.header(*aranges_offset)?;
let mut aranges = aranges_header.entries();
- while let Some(arange) = aranges.next()? {
+ while let Some(arange) = aranges.next().transpose() {
+ let Ok(arange) = arange else {
+ // Ignore errors. In particular, this will ignore address overflow.
+ // This has been seen for a unit that had a single variable
+ // with rustc 1.89.0.
+ //
+ // This relies on `ArangeEntryIter::next` fusing for errors that
+ // can't be ignored.
+ continue;
+ };
if arange.length() != 0 {
unit_ranges.push(UnitRange {
range: arange.range(),
@@ -313,8 +322,9 @@ impl<R: gimli::Reader> ResUnits<R> {
}
}
}
- } else {
- need_unit_range &= !ranges.for_each_range(dw_unit_ref, |range| {
+ }
+ if need_unit_range {
+ need_unit_range = !ranges.for_each_range(dw_unit_ref, |range| {
unit_ranges.push(UnitRange {
range,
unit_id,
@@ -468,7 +478,7 @@ struct DwoUnit<R: gimli::Reader> {
}
impl<R: gimli::Reader> DwoUnit<R> {
- fn unit_ref(&self) -> gimli::UnitRef<R> {
+ fn unit_ref(&self) -> gimli::UnitRef<'_, R> {
gimli::UnitRef::new(&self.sections, &self.dw_unit)
}
}
diff --git a/external/vendor/cfg-if/.cargo-checksum.json b/external/vendor/cfg-if/.cargo-checksum.json
index fdf9bf82..78d3f3fb 100644
--- a/external/vendor/cfg-if/.cargo-checksum.json
+++ b/external/vendor/cfg-if/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{".cargo_vcs_info.json":"27a8d34991deecbe49f4bf0968a297140ef020e074a9e60ae108ed4864b0657f",".github/dependabot.yml":"828e3ecefdc555a5210a5bdffd5621ef3625ceb35c7fc91a0b4faef6f9921b75",".github/workflows/main.yaml":"491f6c08acc6d9999e161ee2f639af2ae309123686760393a3796d80e9fe55de",".github/workflows/publish.yaml":"992bec7e266a0d386f21f3b1ebc9fcad687db3d1ed407aca7d00b843b228264c","CHANGELOG.md":"930ef322253b606d0df9898fa8d9e3dde074d62b1f1627fc5a6e2a9615432870","Cargo.lock":"0c86c6b6596fa7ff58ac3c9b7a59ae072d6534e058e5a59296a28e5ea69fdb5b","Cargo.toml":"12cbe2bc73befa821815ffcd4b686f56f97e52ac919cb90ea47e70d43739c7c1","Cargo.toml.orig":"586990748062c9de6ff67fb64e2380e82e833ac27ce44c986216ae276e7eb1f5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"cd565d563a2c70d197bb6fee1678e122214e22af7bdb046b80f52c1d953cd72f","src/lib.rs":"95a7a9e1e0ff8f12028ebe278bde9e427a0a049fd7fd098b17c513a4d811a12b","tests/xcrate.rs":"bcec148e69db81b1a618bdd6f96a25d9a0442e6ecc692fe28f1206d9bffc006a"},"package":"9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"}
\ No newline at end of file
+{"files":{".cargo_vcs_info.json":"65840ba044457862e25b2d7d53f4a2de232adf933bd31aba8f2bd6a1f51a6881",".github/dependabot.yml":"828e3ecefdc555a5210a5bdffd5621ef3625ceb35c7fc91a0b4faef6f9921b75",".github/workflows/main.yaml":"6612a51b1f1479eabac7d3bd14aa609811d4afd2df2d454b9a1f6d6f3748f5b2",".github/workflows/publish.yaml":"1417805078704eecbaeea8611c5a44df575bfe1908d6969d909224a6e5e26ca8","CHANGELOG.md":"08ba7340057565b338afaa29b36bd2a1c46f5495b043bc49d12230a6a82d5f76","Cargo.lock":"26922b9384045e5a3d496f21ec7c355da585d0caa1d13b887b634527d36fc450","Cargo.toml":"281d508beb1fe3927cf03d3f2f8c9a5117b1e4fe97ae21b9026cf318e8c35273","Cargo.toml.orig":"5a17ee17da78f5179373b8324a1180e71efe2bcf3e3c9ca18c1bdb1e3faa9792","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"cd565d563a2c70d197bb6fee1678e122214e22af7bdb046b80f52c1d953cd72f","src/lib.rs":"c09723e0890d15810374009e96b20bf0eb2f65f383006516f34db36240835c85","tests/xcrate.rs":"bcec148e69db81b1a618bdd6f96a25d9a0442e6ecc692fe28f1206d9bffc006a"},"package":"9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"}
\ No newline at end of file
diff --git a/external/vendor/cfg-if/.cargo_vcs_info.json b/external/vendor/cfg-if/.cargo_vcs_info.json
index c82198ce..d4bec315 100644
--- a/external/vendor/cfg-if/.cargo_vcs_info.json
+++ b/external/vendor/cfg-if/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "dbfd66354537a7d47d84c95ea28b9a6f169ba9d1"
+ "sha1": "3510ca6abea34cbbc702509a4e50ea9709925eda"
},
"path_in_vcs": ""
}
\ No newline at end of file
diff --git a/external/vendor/cfg-if/.github/workflows/main.yaml b/external/vendor/cfg-if/.github/workflows/main.yaml
index 06ccbd6a..7288a62d 100644
--- a/external/vendor/cfg-if/.github/workflows/main.yaml
+++ b/external/vendor/cfg-if/.github/workflows/main.yaml
@@ -4,15 +4,23 @@ on: [push, pull_request]
permissions:
contents: read
+env:
+ RUSTDOCFLAGS: -Dwarnings
+ RUSTFLAGS: -Dwarnings
+
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
- rust: [stable, beta, nightly]
+ rust:
+ - "1.32" # msrv
+ - stable
+ - beta
+ - nightly
steps:
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install Rust ${{ matrix.rust }}
run: |
rustup self update
@@ -20,13 +28,17 @@ jobs:
rustup default ${{ matrix.rust }}
rustc -vV
- name: Run tests
- run: cargo test
+ run: |
+ set -eux
+ # Remove `-Dwarnings` at the MSRV since lints may be different
+ [ "${{ matrix.rust }}" = "1.32" ] && export RUSTFLAGS="--cfg msrv_test"
+ cargo test
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install Rust Stable
run: |
rustup update stable
diff --git a/external/vendor/cfg-if/.github/workflows/publish.yaml b/external/vendor/cfg-if/.github/workflows/publish.yaml
index d6f1dc39..248e3ccd 100644
--- a/external/vendor/cfg-if/.github/workflows/publish.yaml
+++ b/external/vendor/cfg-if/.github/workflows/publish.yaml
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install Rust (rustup)
diff --git a/external/vendor/cfg-if/CHANGELOG.md b/external/vendor/cfg-if/CHANGELOG.md
index 3ccfb8db..55b54ece 100644
--- a/external/vendor/cfg-if/CHANGELOG.md
+++ b/external/vendor/cfg-if/CHANGELOG.md
@@ -7,9 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
-## [1.0.1](https://github.com/rust-lang/cfg-if/compare/v1.0.0...v1.0.1) - 2025-06-09
+## [1.0.4](https://github.com/rust-lang/cfg-if/compare/v1.0.3...v1.0.4) - 2025-10-15
+
+- Support `cfg(true)` and `cfg(false)` ([#99](https://github.com/rust-lang/cfg-if/pull/99))
+- Set and test a MSRV of 1.32
+- Have a single top-level rule
+
+## [1.0.3](https://github.com/rust-lang/cfg-if/compare/v1.0.2...v1.0.3) - 2025-08-19
+
+- Revert "Remove `@__identity` rule."
-### Other
+## [1.0.2](https://github.com/rust-lang/cfg-if/compare/v1.0.1...v1.0.2) - 2025-08-19
+
+- Remove `@__identity` rule.
+
+## [1.0.1](https://github.com/rust-lang/cfg-if/compare/v1.0.0...v1.0.1) - 2025-06-09
- Remove `compiler-builtins` from `rustc-dep-of-std` dependencies
- Remove redundant configuration from Cargo.toml
diff --git a/external/vendor/cfg-if/Cargo.lock b/external/vendor/cfg-if/Cargo.lock
index 1ebc32e2..57166796 100644
--- a/external/vendor/cfg-if/Cargo.lock
+++ b/external/vendor/cfg-if/Cargo.lock
@@ -1,16 +1,16 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 4
-
[[package]]
name = "cfg-if"
-version = "1.0.1"
+version = "1.0.4"
dependencies = [
- "rustc-std-workspace-core",
+ "rustc-std-workspace-core 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rustc-std-workspace-core"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa9c45b374136f52f2d6311062c7146bff20fec063c3f5d46a410bd937746955"
+
+[metadata]
+"checksum rustc-std-workspace-core 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa9c45b374136f52f2d6311062c7146bff20fec063c3f5d46a410bd937746955"
diff --git a/external/vendor/cfg-if/Cargo.toml b/external/vendor/cfg-if/Cargo.toml
index 9af087c0..450f7a2d 100644
--- a/external/vendor/cfg-if/Cargo.toml
+++ b/external/vendor/cfg-if/Cargo.toml
@@ -11,8 +11,9 @@
[package]
edition = "2018"
+rust-version = "1.32"
name = "cfg-if"
-version = "1.0.1"
+version = "1.0.4"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
build = false
autolib = false
diff --git a/external/vendor/cfg-if/Cargo.toml.orig b/external/vendor/cfg-if/Cargo.toml.orig
index ef853a4f..6a98924e 100644
--- a/external/vendor/cfg-if/Cargo.toml.orig
+++ b/external/vendor/cfg-if/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "cfg-if"
-version = "1.0.1"
+version = "1.0.4"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0"
readme = "README.md"
@@ -11,6 +11,7 @@ parameters. Structured like an if-else chain, the first matching branch is the
item that gets emitted.
"""
edition = "2018"
+rust-version = "1.32"
[dependencies]
core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" }
diff --git a/external/vendor/cfg-if/src/lib.rs b/external/vendor/cfg-if/src/lib.rs
index 9cbd4147..2c7414eb 100644
--- a/external/vendor/cfg-if/src/lib.rs
+++ b/external/vendor/cfg-if/src/lib.rs
@@ -26,42 +26,30 @@
#![no_std]
#![doc(html_root_url = "https://docs.rs/cfg-if")]
#![deny(missing_docs)]
-#![cfg_attr(test, deny(warnings))]
#![cfg_attr(test, allow(unexpected_cfgs))] // we test with features that do not exist
/// The main macro provided by this crate. See crate documentation for more
/// information.
#[macro_export]
macro_rules! cfg_if {
- // match if/else chains with a final `else`
(
+ if #[cfg( $($i_meta:tt)+ )] { $( $i_tokens:tt )* }
$(
- if #[cfg( $i_meta:meta )] { $( $i_tokens:tt )* }
- ) else+
- else { $( $e_tokens:tt )* }
- ) => {
- $crate::cfg_if! {
- @__items () ;
- $(
- (( $i_meta ) ( $( $i_tokens )* )) ,
- )+
- (() ( $( $e_tokens )* )) ,
- }
- };
-
- // match if/else chains lacking a final `else`
- (
- if #[cfg( $i_meta:meta )] { $( $i_tokens:tt )* }
- $(
- else if #[cfg( $e_meta:meta )] { $( $e_tokens:tt )* }
+ else if #[cfg( $($ei_meta:tt)+ )] { $( $ei_tokens:tt )* }
)*
+ $(
+ else { $( $e_tokens:tt )* }
+ )?
) => {
$crate::cfg_if! {
@__items () ;
- (( $i_meta ) ( $( $i_tokens )* )) ,
+ (( $($i_meta)+ ) ( $( $i_tokens )* )),
$(
- (( $e_meta ) ( $( $e_tokens )* )) ,
+ (( $($ei_meta)+ ) ( $( $ei_tokens )* )),
)*
+ $(
+ (() ( $( $e_tokens )* )),
+ )?
}
};
@@ -69,33 +57,40 @@ macro_rules! cfg_if {
//
// Collects all the previous cfgs in a list at the beginning, so they can be
// negated. After the semicolon are all the remaining items.
- (@__items ( $( $_:meta , )* ) ; ) => {};
+ (@__items ( $( ($($_:tt)*) , )* ) ; ) => {};
(
- @__items ( $( $no:meta , )* ) ;
- (( $( $yes:meta )? ) ( $( $tokens:tt )* )) ,
+ @__items ( $( ($($no:tt)+) , )* ) ;
+ (( $( $($yes:tt)+ )? ) ( $( $tokens:tt )* )),
$( $rest:tt , )*
) => {
// Emit all items within one block, applying an appropriate #[cfg]. The
// #[cfg] will require all `$yes` matchers specified and must also negate
// all previous matchers.
#[cfg(all(
- $( $yes , )?
- not(any( $( $no ),* ))
+ $( $($yes)+ , )?
+ not(any( $( $($no)+ ),* ))
))]
- $crate::cfg_if! { @__identity $( $tokens )* }
+ // Subtle: You might think we could put `$( $tokens )*` here. But if
+ // that contains multiple items then the `#[cfg(all(..))]` above would
+ // only apply to the first one. By wrapping `$( $tokens )*` in this
+ // macro call, we temporarily group the items into a single thing (the
+ // macro call) that will be included/excluded by the `#[cfg(all(..))]`
+ // as appropriate. If the `#[cfg(all(..))]` succeeds, the macro call
+ // will be included, and then evaluated, producing `$( $tokens )*`. See
+ // also the "issue #90" test below.
+ $crate::cfg_if! { @__temp_group $( $tokens )* }
// Recurse to emit all other items in `$rest`, and when we do so add all
// our `$yes` matchers to the list of `$no` matchers as future emissions
// will have to negate everything we just matched as well.
$crate::cfg_if! {
- @__items ( $( $no , )* $( $yes , )? ) ;
+ @__items ( $( ($($no)+) , )* $( ($($yes)+) , )? ) ;
$( $rest , )*
}
};
- // Internal macro to make __apply work out right for different match types,
- // because of how macros match/expand stuff.
- (@__identity $( $tokens:tt )* ) => {
+ // See the "Subtle" comment above.
+ (@__temp_group $( $tokens:tt )* ) => {
$( $tokens )*
};
}
@@ -144,6 +139,32 @@ mod tests {
}
}
+ // In issue #90 there was a bug that caused only the first item within a
+ // block to be annotated with the produced `#[cfg(...)]`. In this example,
+ // it meant that the first `type _B` wasn't being omitted as it should have
+ // been, which meant we had two `type _B`s, which caused an error. See also
+ // the "Subtle" comment above.
+ cfg_if!(
+ if #[cfg(target_os = "no-such-operating-system-good-sir!")] {
+ type _A = usize;
+ type _B = usize;
+ } else {
+ type _A = i32;
+ type _B = i32;
+ }
+ );
+
+ #[cfg(not(msrv_test))]
+ cfg_if! {
+ if #[cfg(false)] {
+ fn works6() -> bool { false }
+ } else if #[cfg(true)] {
+ fn works6() -> bool { true }
+ } else if #[cfg(false)] {
+ fn works6() -> bool { false }
+ }
+ }
+
#[test]
fn it_works() {
assert!(works1().is_some());
@@ -151,20 +172,24 @@ mod tests {
assert!(works3());
assert!(works4().is_some());
assert!(works5());
+ #[cfg(not(msrv_test))]
+ assert!(works6());
}
#[test]
#[allow(clippy::assertions_on_constants)]
fn test_usage_within_a_function() {
- cfg_if! {if #[cfg(debug_assertions)] {
- // we want to put more than one thing here to make sure that they
- // all get configured properly.
- assert!(cfg!(debug_assertions));
- assert_eq!(4, 2+2);
- } else {
- assert!(works1().is_some());
- assert_eq!(10, 5+5);
- }}
+ cfg_if! {
+ if #[cfg(debug_assertions)] {
+ // we want to put more than one thing here to make sure that they
+ // all get configured properly.
+ assert!(cfg!(debug_assertions));
+ assert_eq!(4, 2 + 2);
+ } else {
+ assert!(works1().is_some());
+ assert_eq!(10, 5 + 5);
+ }
+ }
}
#[allow(dead_code)]
@@ -178,13 +203,9 @@ mod tests {
impl Trait for Struct {
cfg_if! {
if #[cfg(feature = "blah")] {
- fn blah(&self) {
- unimplemented!();
- }
+ fn blah(&self) { unimplemented!(); }
} else {
- fn blah(&self) {
- unimplemented!();
- }
+ fn blah(&self) { unimplemented!(); }
}
}
}
diff --git a/external/vendor/dlmalloc/.cargo-checksum.json b/external/vendor/dlmalloc/.cargo-checksum.json
index 3ea95c08..8d3eac29 100644
--- a/external/vendor/dlmalloc/.cargo-checksum.json
+++ b/external/vendor/dlmalloc/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{".cargo_vcs_info.json":"54c9df4703cbedb0f0af808656898e42676c787ac5cc5dcdd6342f21b3d7276e",".github/workflows/main.yml":"643bd1888de6b6c62ad5e8760e1c81e6b1f165b96c44046f1f4db234fa32f286","Cargo.lock":"e0fabd059bc4aba2ca1caf52b248ca2119f836ebe3fa5d65e950ac5a39a28f6b","Cargo.toml":"1c307c7657143a648312fca81edfebd9f87d5dfe7878e5a39d628bd8ddf59b2a","Cargo.toml.orig":"53a2341157f4cd1e7e12d99ceb5029f75fbc04e9df22d8fdd1196173a37aa2de","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"97852fca5cb6bcabfa438404355bd13cb45b228a1527f0e441b05161b6704f03","src/dlmalloc.c":"103602c3fcbe200d5e257cdd7353d84bcc033d887bea3b245321319bf5401f47","src/dlmalloc.rs":"ffe57f78deba6460d8d03ddda069b78429372fb2f523f70845f11043427bf6ca","src/dummy.rs":"31b838ec75742c6c199e9ed2247c2eaf74d41caddcd1466eb3d646598d8ba34e","src/global.rs":"3655196d03b8518e0f4d6ff58a524068df996d87291b5f8b3ea63516d7951d71","src/lib.rs":"903ae6d6d3266ba8f65c9f74108260ada798d594d4bce606f83e94ac9f828c78","src/unix.rs":"890e0079d8286c6334b193479f2cf686d6f99f7b5d0e06fe54a10f9a74f0d77d","src/wasm.rs":"30051da2d422253897ff54dd25e9972cd4066ae70233a60cc2844fc0d041b886","src/windows.rs":"dc37a4c06e24288f9ab6a1990afc5f9efcf0e0938c3f17520548a11aeba011d3","src/xous.rs":"09939afb4f9b1082d8ca89e625a5429508040854a0aeb2b56525a1dcfaacb74f","tests/eat_memory.rs":"bc9dad6e3ef35b4558286bd4fa1931ca8b92fb3537bb9c073f1fd5ccd52d0adf","tests/global.rs":"48a4abff15c8d2b14f55538861ebe67d7df83732edcee36e4a3ac4083e08b5a0","tests/smoke.rs":"c723cf69db87da795fda9d7c3f91c85d892857f07b13484eaec1c8a3e2fcd0ae"},"package":"fa3a2dbee57b69fbb5dbe852fa9c0925697fb0c7fbcb1593e90e5ffaedf13d51"}
\ No newline at end of file
+{"files":{".cargo_vcs_info.json":"4ba863caa1ef77327e8bdd9f6f95300351beca138415cd8387f7d4fb08690779",".github/workflows/main.yml":"643bd1888de6b6c62ad5e8760e1c81e6b1f165b96c44046f1f4db234fa32f286","Cargo.lock":"efe6ee6e6d6cb4c81da3cdad31f2b38513e225f08a1315f30d629e3aa2070f49","Cargo.toml":"20a8cb09c46b5229cac573ab25be3b3fc25b68014b59759a48157dc0ecffdf93","Cargo.toml.orig":"441ca60ad69fa1dddc7ff3d571c924c19860aeecd279cae11fbe55f12f25e379","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"97852fca5cb6bcabfa438404355bd13cb45b228a1527f0e441b05161b6704f03","src/dlmalloc.c":"103602c3fcbe200d5e257cdd7353d84bcc033d887bea3b245321319bf5401f47","src/dlmalloc.rs":"ffe57f78deba6460d8d03ddda069b78429372fb2f523f70845f11043427bf6ca","src/dummy.rs":"31b838ec75742c6c199e9ed2247c2eaf74d41caddcd1466eb3d646598d8ba34e","src/global.rs":"3655196d03b8518e0f4d6ff58a524068df996d87291b5f8b3ea63516d7951d71","src/lib.rs":"903ae6d6d3266ba8f65c9f74108260ada798d594d4bce606f83e94ac9f828c78","src/unix.rs":"890e0079d8286c6334b193479f2cf686d6f99f7b5d0e06fe54a10f9a74f0d77d","src/wasm.rs":"30051da2d422253897ff54dd25e9972cd4066ae70233a60cc2844fc0d041b886","src/windows.rs":"dc37a4c06e24288f9ab6a1990afc5f9efcf0e0938c3f17520548a11aeba011d3","src/xous.rs":"09939afb4f9b1082d8ca89e625a5429508040854a0aeb2b56525a1dcfaacb74f","tests/eat_memory.rs":"bc9dad6e3ef35b4558286bd4fa1931ca8b92fb3537bb9c073f1fd5ccd52d0adf","tests/global.rs":"48a4abff15c8d2b14f55538861ebe67d7df83732edcee36e4a3ac4083e08b5a0","tests/smoke.rs":"c723cf69db87da795fda9d7c3f91c85d892857f07b13484eaec1c8a3e2fcd0ae"},"package":"06cdfe340b16dd990c54cce79743613fa09fbb16774f33a77c9fd196f8f3fa30"}
\ No newline at end of file
diff --git a/external/vendor/dlmalloc/.cargo_vcs_info.json b/external/vendor/dlmalloc/.cargo_vcs_info.json
index 9c5efe4c..09484dca 100644
--- a/external/vendor/dlmalloc/.cargo_vcs_info.json
+++ b/external/vendor/dlmalloc/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "1463e22a64002db7a0d37ca7149a624309da99a1"
+ "sha1": "0795db6f9d1ae722c4e52e2844ec0394dd6f9db2"
},
"path_in_vcs": ""
}
\ No newline at end of file
diff --git a/external/vendor/dlmalloc/Cargo.lock b/external/vendor/dlmalloc/Cargo.lock
index d00bd1a1..fe26be39 100644
--- a/external/vendor/dlmalloc/Cargo.lock
+++ b/external/vendor/dlmalloc/Cargo.lock
@@ -16,7 +16,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "dlmalloc"
-version = "0.2.10"
+version = "0.2.11"
dependencies = [
"arbitrary",
"cfg-if",
diff --git a/external/vendor/dlmalloc/Cargo.toml b/external/vendor/dlmalloc/Cargo.toml
index ca476c4b..b9babb41 100644
--- a/external/vendor/dlmalloc/Cargo.toml
+++ b/external/vendor/dlmalloc/Cargo.toml
@@ -12,7 +12,7 @@
[package]
edition = "2021"
name = "dlmalloc"
-version = "0.2.10"
+version = "0.2.11"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
build = false
autolib = false
@@ -74,7 +74,7 @@ version = "0.2"
default-features = false
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
-version = ">=0.52.0, <=0.59.*"
+version = ">=0.52.0, <=0.60.*"
features = [
"Win32_Foundation",
"Win32_System_Memory",
diff --git a/external/vendor/dlmalloc/Cargo.toml.orig b/external/vendor/dlmalloc/Cargo.toml.orig
index d2dfc4dc..05ac6c37 100644
--- a/external/vendor/dlmalloc/Cargo.toml.orig
+++ b/external/vendor/dlmalloc/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "dlmalloc"
-version = "0.2.10"
+version = "0.2.11"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT/Apache-2.0"
readme = "README.md"
@@ -34,7 +34,7 @@ core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core
cfg-if = "1.0"
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
-version = ">=0.52.0, <=0.59.*"
+version = ">=0.52.0, <=0.60.*"
features = [
"Win32_Foundation",
"Win32_System_Memory",
diff --git a/external/vendor/foldhash/.cargo-checksum.json b/external/vendor/foldhash/.cargo-checksum.json
new file mode 100644
index 00000000..36cf68e3
--- /dev/null
+++ b/external/vendor/foldhash/.cargo-checksum.json
@@ -0,0 +1 @@
+{"files":{".cargo_vcs_info.json":"5fe3916c8cc3fa6dab42352cec91217e071ece146a4c10d38b8c608de2d2925d","Cargo.lock":"3bddb04a5cd4ee4b4f45de88c49f57af71ed19a2d4882ba48f160c4adea7a5cb","Cargo.toml":"0a76cc29da1c33f4bdb505f5828ecdc20859c4cb9faa402e000f5f10511a27cc","Cargo.toml.orig":"04350078f390441844a35994ad83f2873b685a023c433ecb14eda200a5cb2f90","LICENSE":"b1181a40b2a7b25cf66fd01481713bc1005df082c53ef73e851e55071b102744","README.md":"e96613be984ff637c725f3f9abba366eb2d03a772695bed2d49dc61d330027ac","src/convenience.rs":"60338e1ca7bfc781724819cd82ef4a9bd61f4f5c17772b3c0f776fb2257c60dc","src/fast.rs":"807f098a619303f9e4d5cf582e0eb3b25c14451a36fa4e7a4ab440d3c95bf29e","src/lib.rs":"777319e7f2919bede856e13594169cfc4bdbaf2e541463da58c86e7e832dc45f","src/quality.rs":"33073e1869642a0c8689cfe3e8a1ecdc0a5c939b4e0a9ba03c111babf5b92849","src/seed.rs":"d4abbbbd7ca41f1dec07c0da3463b767ebdd953c0140eb94db617a7e3151cbe3"},"package":"77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"}
\ No newline at end of file
diff --git a/external/vendor/foldhash/.cargo_vcs_info.json b/external/vendor/foldhash/.cargo_vcs_info.json
new file mode 100644
index 00000000..23aaf2af
--- /dev/null
+++ b/external/vendor/foldhash/.cargo_vcs_info.json
@@ -0,0 +1,6 @@
+{
+ "git": {
+ "sha1": "8f878c636fda9c9e93384824ea45e06d03f009f5"
+ },
+ "path_in_vcs": ""
+}
\ No newline at end of file
diff --git a/external/vendor/foldhash/Cargo.lock b/external/vendor/foldhash/Cargo.lock
new file mode 100644
index 00000000..f62aa0e2
--- /dev/null
+++ b/external/vendor/foldhash/Cargo.lock
@@ -0,0 +1,943 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "ahash"
+version = "0.8.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
+dependencies = [
+ "cfg-if",
+ "getrandom 0.3.3",
+ "once_cell",
+ "version_check",
+ "zerocopy",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "allocator-api2"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
+
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anes"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
+
+[[package]]
+name = "anstyle"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd"
+
+[[package]]
+name = "autocfg"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
+
+[[package]]
+name = "bitflags"
+version = "2.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
+
+[[package]]
+name = "bumpalo"
+version = "3.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "cast"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
+
+[[package]]
+name = "cc"
+version = "1.2.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2"
+dependencies = [
+ "shlex",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
+
+[[package]]
+name = "chrono"
+version = "0.4.41"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "wasm-bindgen",
+ "windows-link",
+]
+
+[[package]]
+name = "ciborium"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e"
+dependencies = [
+ "ciborium-io",
+ "ciborium-ll",
+ "serde",
+]
+
+[[package]]
+name = "ciborium-io"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757"
+
+[[package]]
+name = "ciborium-ll"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9"
+dependencies = [
+ "ciborium-io",
+ "half",
+]
+
+[[package]]
+name = "clap"
+version = "4.3.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb690e81c7840c0d7aade59f242ea3b41b9bc27bcd5997890e7702ae4b32e487"
+dependencies = [
+ "clap_builder",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.3.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ed2e96bc16d8d740f6f48d663eddf4b8a0983e79210fd55479b7bcd0a69860e"
+dependencies = [
+ "anstyle",
+ "clap_lex",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961"
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
+[[package]]
+name = "criterion"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f"
+dependencies = [
+ "anes",
+ "cast",
+ "ciborium",
+ "clap",
+ "criterion-plot",
+ "is-terminal",
+ "itertools",
+ "num-traits",
+ "once_cell",
+ "oorandom",
+ "plotters",
+ "rayon",
+ "regex",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "tinytemplate",
+ "walkdir",
+]
+
+[[package]]
+name = "criterion-plot"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
+dependencies = [
+ "cast",
+ "itertools",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
+dependencies = [
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
+
+[[package]]
+name = "crunchy"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
+
+[[package]]
+name = "either"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
+
+[[package]]
+name = "equivalent"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
+
+[[package]]
+name = "foldhash"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
+
+[[package]]
+name = "foldhash"
+version = "0.2.0"
+dependencies = [
+ "ahash",
+ "chrono",
+ "criterion",
+ "fxhash",
+ "hashbrown",
+ "rand",
+ "rapidhash",
+ "uuid",
+]
+
+[[package]]
+name = "fxhash"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.11.1+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "r-efi",
+ "wasi 0.14.2+wasi-0.2.4",
+]
+
+[[package]]
+name = "half"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
+dependencies = [
+ "cfg-if",
+ "crunchy",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.15.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
+dependencies = [
+ "allocator-api2",
+ "equivalent",
+ "foldhash 0.1.5",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.63"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "log",
+ "wasm-bindgen",
+ "windows-core",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "is-terminal"
+version = "0.4.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "itertools"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
+
+[[package]]
+name = "js-sys"
+version = "0.3.77"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
+dependencies = [
+ "once_cell",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.174"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
+
+[[package]]
+name = "log"
+version = "0.4.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
+
+[[package]]
+name = "memchr"
+version = "2.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.21.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
+
+[[package]]
+name = "oorandom"
+version = "11.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
+
+[[package]]
+name = "plotters"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747"
+dependencies = [
+ "num-traits",
+ "plotters-backend",
+ "plotters-svg",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "plotters-backend"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a"
+
+[[package]]
+name = "plotters-svg"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670"
+dependencies = [
+ "plotters-backend",
+]
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
+dependencies = [
+ "zerocopy",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "r-efi"
+version = "5.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom 0.2.16",
+]
+
+[[package]]
+name = "rapidhash"
+version = "3.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "efee4b7317469c6c6e7fdeee3d094313af846a97678d6ed971d83a852d730083"
+
+[[package]]
+name = "rayon"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
+dependencies = [
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
+dependencies = [
+ "crossbeam-deque",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "regex"
+version = "1.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+
+[[package]]
+name = "rustversion"
+version = "1.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d"
+
+[[package]]
+name = "ryu"
+version = "1.0.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.219"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.219"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.142"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7"
+dependencies = [
+ "itoa",
+ "memchr",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "syn"
+version = "2.0.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "tinytemplate"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
+
+[[package]]
+name = "uuid"
+version = "1.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "walkdir"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "wasi"
+version = "0.11.1+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
+
+[[package]]
+name = "wasi"
+version = "0.14.2+wasi-0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
+dependencies = [
+ "wit-bindgen-rt",
+]
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "rustversion",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
+dependencies = [
+ "bumpalo",
+ "log",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.77"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "winapi-util"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.61.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-link",
+ "windows-result",
+ "windows-strings",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.60.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.59.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "windows-link"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
+
+[[package]]
+name = "windows-result"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "wit-bindgen-rt"
+version = "0.39.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.8.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.8.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
diff --git a/external/vendor/foldhash/Cargo.toml b/external/vendor/foldhash/Cargo.toml
new file mode 100644
index 00000000..64cc1fe2
--- /dev/null
+++ b/external/vendor/foldhash/Cargo.toml
@@ -0,0 +1,80 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g., crates.io) dependencies.
+#
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
+
+[package]
+edition = "2021"
+rust-version = "1.60"
+name = "foldhash"
+version = "0.2.0"
+authors = ["Orson Peters <orsonpeters@gmail.com>"]
+build = false
+exclude = [
+ "benches",
+ "tools",
+ "assets",
+]
+autolib = false
+autobins = false
+autoexamples = false
+autotests = false
+autobenches = false
+description = "A fast, non-cryptographic, minimally DoS-resistant hashing algorithm."
+readme = "README.md"
+keywords = [
+ "hash",
+ "hasher",
+ "no-std",
+]
+categories = [
+ "algorithms",
+ "no-std",
+]
+license = "Zlib"
+repository = "https://github.com/orlp/foldhash"
+
+[features]
+default = ["std"]
+nightly = []
+std = []
+
+[lib]
+name = "foldhash"
+path = "src/lib.rs"
+bench = false
+
+[dependencies]
+
+[dev-dependencies.ahash]
+version = "0.8"
+
+[dev-dependencies.chrono]
+version = "0.4"
+
+[dev-dependencies.criterion]
+version = "0.5"
+
+[dev-dependencies.fxhash]
+version = "0.2"
+
+[dev-dependencies.hashbrown]
+version = "0.15"
+
+[dev-dependencies.rand]
+version = "0.8"
+
+[dev-dependencies.rapidhash]
+version = "3.1.0"
+
+[dev-dependencies.uuid]
+version = "1.8"
+
+[profile.release]
+lto = "thin"
diff --git a/external/vendor/foldhash/Cargo.toml.orig b/external/vendor/foldhash/Cargo.toml.orig
new file mode 100644
index 00000000..a0a0c58d
--- /dev/null
+++ b/external/vendor/foldhash/Cargo.toml.orig
@@ -0,0 +1,46 @@
+[package]
+name = "foldhash"
+version = "0.2.0"
+authors = ["Orson Peters <orsonpeters@gmail.com>"]
+license = "Zlib"
+repository = "https://github.com/orlp/foldhash"
+readme = "README.md"
+keywords = ["hash", "hasher", "no-std"]
+categories = ["algorithms", "no-std"]
+description = "A fast, non-cryptographic, minimally DoS-resistant hashing algorithm."
+edition = "2021"
+exclude = ["benches", "tools", "assets"]
+rust-version = "1.60"
+
+[features]
+default = ["std"]
+std = []
+nightly = []
+
+[dependencies]
+
+[dev-dependencies]
+criterion = "0.5"
+hashbrown = "0.15"
+uuid = "1.8"
+rand = "0.8"
+ahash = "0.8"
+fxhash = "0.2"
+rapidhash = "3.1.0"
+chrono = "0.4"
+
+[lib]
+bench = false
+
+[[bench]]
+name = "bench"
+path = "benches/bench.rs"
+harness = false
+
+[[bench]]
+name = "avalanche"
+path = "benches/avalanche.rs"
+harness = false
+
+[profile.release]
+lto = "thin"
diff --git a/external/vendor/foldhash/LICENSE b/external/vendor/foldhash/LICENSE
new file mode 100644
index 00000000..2f65b0a3
--- /dev/null
+++ b/external/vendor/foldhash/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2024 Orson Peters
+
+This software is provided 'as-is', without any express or implied warranty. In
+no event will the authors be held liable for any damages arising from the use of
+this software.
+
+Permission is granted to anyone to use this software for any purpose, including
+commercial applications, and to alter it and redistribute it freely, subject to
+the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim
+ that you wrote the original software. If you use this software in a product,
+ an acknowledgment in the product documentation would be appreciated but is
+ not required.
+
+2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source distribution.
\ No newline at end of file
diff --git a/external/vendor/foldhash/README.md b/external/vendor/foldhash/README.md
new file mode 100644
index 00000000..4fe9d6e4
--- /dev/null
+++ b/external/vendor/foldhash/README.md
@@ -0,0 +1,283 @@
+# Foldhash
+
+This repository contains foldhash, a fast, non-cryptographic, minimally
+DoS-resistant hashing algorithm implemented in Rust designed for computational
+uses such as hash maps, bloom filters, count sketching, etc.
+
+When should you **not** use foldhash:
+
+- You are afraid of people studying your long-running program's behavior to
+ reverse engineer its internal random state and using this knowledge to create
+ many colliding inputs for computational complexity attacks. For more details
+ see the section "HashDoS resistance".
+
+- You expect foldhash to have a consistent output across versions or
+ platforms, such as for persistent file formats or communication protocols.
+
+- You are relying on foldhash's properties for any kind of security.
+ Foldhash is **not appropriate for any cryptographic purpose**.
+
+Foldhash has two variants, one optimized for speed which is ideal for data
+structures such as hash maps and bloom filters, and one optimized for
+statistical quality which is ideal for algorithms such as
+[HyperLogLog](https://en.wikipedia.org/wiki/HyperLogLog) and
+[MinHash](https://en.wikipedia.org/wiki/MinHash).
+
+Foldhash can be used in a `#![no_std]` environment by disabling its default
+`"std"` feature.
+
+
+## Performance
+
+We evaluated foldhash against three commonly used hashes in Rust:
+[aHash](https://github.com/tkaitchuck/aHash) v0.8.11,
+[fxhash](https://github.com/cbreeden/fxhash) v0.2.1, and
+[SipHash-1-3](https://en.wikipedia.org/wiki/SipHash), the default hash algorithm
+in Rust at the time of writing. We evaluated both variants foldhash provides,
+`foldhash-f` and `foldhash-q`, which correspond to `foldhash::fast` and
+`foldhash::quality` in the crate respectively.
+
+First we note that hashers with random state inflate the size of your `HashMap`,
+which may or may not be important for your performance:
+```rust
+std::mem::size_of::<foldhash::HashMap<u32, u32>>() = 40 // (both variants)
+std::mem::size_of::<ahash::HashMap<u32, u32>>() = 64
+std::mem::size_of::<fxhash::FxHashMap<u32, u32>>() = 32
+std::mem::size_of::<std::collections::HashMap<u32, u32>>() = 48
+```
+
+We tested runtime performance on two machines, one with a 2023 Apple M2 CPU, one
+with a 2023 Intel Xeon Platinum 8481C server CPU, both with stable Rust 1.80.1.
+Since one of our competitors (aHash) is reliant on AES-based instructions for
+optimal performance we have included both a benchmark with and without
+`-C target-cpu=native` for the Intel machine.
+
+We tested across a wide variety of data types we consider representative of
+types / distributions one might hash in the real world, in the context of a hash
+table key:
+
+- `u32` - random 32-bit unsigned integers,
+- `u32pair` - pairs of random 32-bit unsigned integers,
+- `u64` - random 64-bit unsigned integers,
+- `u64pair` - pairs of random 64-bit unsigned integers,
+- `u64lobits` - 64-bit unsigned integers where only the bottom 16 bits vary,
+- `u64hibits` - 64-bit unsigned integers where only the top 16 bits vary,
+- `ipv4` - [`std::net::Ipv4Addr`](https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html), which is equivalent to `[u8; 4]`,
+- `ipv6` - [`std::net::Ipv6Addr`](https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html), which is equivalent to `[u8; 16]`,
+- `rgba` - random `(u8, u8, u8, u8)` tuples,
+- `strenglishword` - strings containing words sampled uniformly from the top 10,000 most common English words,
+- `struuid` - random UUIDs, hashed in string representation,
+- `strurl` - strings containing URLs sampled uniformly from a corpus of 10,000 URLs,
+- `strdate` - random `YYYY-MM-DD` date strings,
+- `accesslog` - `(u128, u32, chrono::NaiveDate, bool)`, meant to simulate a typical
+ larger compound type, in this case `(resource_id, user_id, date, success)`
+ for an access log.
+- `kilobyte` - random bytestrings one kilobyte in length,
+- `tenkilobyte` - random bytestrings ten kilobytes in length.
+
+We tested the performance of hashing the above data types in the following four contexts:
+
+- `hashonly` - only the time it takes to hash the value,
+- `lookupmiss` - the time it takes to do a lookup in a 1,000 element hash map
+of random elements, only sampling keys of which we know that are not in the hash map,
+- `lookuphit` - similar to `lookupmiss`, except the keys are sampled from keys
+known to be in the hash map,
+- `setbuild` - the time it takes to construct a `HashSet` of 1,000 elements
+from 1,000 randomly sampled elements each repeated 10 times (so 10,000 inserts,
+with ~90% duplicates).
+
+All times are reported as expected time per operation, so one hash, one lookup,
+or one insert respectively. The full results [can be found
+here](https://gist.github.com/orlp/1271ad5b8b775c651cc55773888858eb). To
+summarize, we will only show the results for `u64` and `strenglishword` here, as
+well as the observed geometric mean and average rank over the full benchmark.
+
+```
+Xeon 8481c
+
+┌────────────────┬────────────┬────────────┬────────────┬─────────┬─────────┬─────────┐
+│ avg_rank ┆ 1.58 ┆ 2.66 ┆ 2.09 ┆ 3.70 ┆ 4.97 │
+│ geometric_mean ┆ 6.21 ┆ 7.01 ┆ 7.56 ┆ 8.74 ┆ 28.70 │
+╞════════════════╪════════════╪════════════╪════════════╪═════════╪═════════╪═════════╡
+│ distr ┆ bench ┆ foldhash-f ┆ foldhash-q ┆ fxhash ┆ ahash ┆ siphash │
+╞════════════════╪════════════╪════════════╪════════════╪═════════╪═════════╪═════════╡
+│ u64 ┆ hashonly ┆ 0.79 ┆ 1.03 ┆ 0.67 ┆ 1.23 ┆ 9.09 │
+│ u64 ┆ lookupmiss ┆ 2.01 ┆ 2.44 ┆ 1.73 ┆ 2.73 ┆ 12.03 │
+│ u64 ┆ lookuphit ┆ 3.04 ┆ 3.59 ┆ 2.64 ┆ 3.84 ┆ 12.65 │
+│ u64 ┆ setbuild ┆ 6.13 ┆ 6.52 ┆ 4.88 ┆ 6.66 ┆ 17.80 │
+| ... ┆ ... ┆ ... ┆ ... ┆ ... ┆ ... ┆ ... |
+│ strenglishword ┆ hashonly ┆ 2.63 ┆ 2.98 ┆ 3.24 ┆ 3.57 ┆ 11.87 │
+│ strenglishword ┆ lookupmiss ┆ 4.63 ┆ 5.03 ┆ 4.51 ┆ 5.86 ┆ 15.19 │
+│ strenglishword ┆ lookuphit ┆ 8.62 ┆ 9.25 ┆ 8.28 ┆ 10.06 ┆ 21.35 │
+│ strenglishword ┆ setbuild ┆ 14.77 ┆ 15.57 ┆ 18.86 ┆ 15.72 ┆ 35.36 │
+└────────────────┴────────────┴────────────┴────────────┴─────────┴─────────┴─────────┘
+
+Xeon 8481c with RUSTFLAGS="-C target-cpu=native"
+
+┌────────────────┬────────────┬────────────┬────────────┬─────────┬─────────┬─────────┐
+│ avg_rank ┆ 1.89 ┆ 3.12 ┆ 2.25 ┆ 2.77 ┆ 4.97 │
+│ geometric_mean ┆ 6.00 ┆ 6.82 ┆ 7.39 ┆ 6.94 ┆ 29.49 │
+╞════════════════╪════════════╪════════════╪════════════╪═════════╪═════════╪═════════╡
+│ distr ┆ bench ┆ foldhash-f ┆ foldhash-q ┆ fxhash ┆ ahash ┆ siphash │
+╞════════════════╪════════════╪════════════╪════════════╪═════════╪═════════╪═════════╡
+│ u64 ┆ hashonly ┆ 0.79 ┆ 1.01 ┆ 0.67 ┆ 1.34 ┆ 9.24 │
+│ u64 ┆ lookupmiss ┆ 1.68 ┆ 2.12 ┆ 1.62 ┆ 1.96 ┆ 12.04 │
+│ u64 ┆ lookuphit ┆ 2.68 ┆ 3.19 ┆ 2.28 ┆ 3.16 ┆ 13.09 │
+│ u64 ┆ setbuild ┆ 6.16 ┆ 6.42 ┆ 4.75 ┆ 7.03 ┆ 18.88 │
+| ... ┆ ... ┆ ... ┆ ... ┆ ... ┆ ... ┆ ... |
+│ strenglishword ┆ hashonly ┆ 2.60 ┆ 2.97 ┆ 3.25 ┆ 3.04 ┆ 11.58 │
+│ strenglishword ┆ lookupmiss ┆ 4.41 ┆ 4.96 ┆ 4.82 ┆ 4.79 ┆ 32.31 │
+│ strenglishword ┆ lookuphit ┆ 8.68 ┆ 9.35 ┆ 8.46 ┆ 8.63 ┆ 21.48 │
+│ strenglishword ┆ setbuild ┆ 15.01 ┆ 16.34 ┆ 19.34 ┆ 15.37 ┆ 35.22 │
+└────────────────┴────────────┴────────────┴────────────┴─────────┴─────────┴─────────┘
+
+Apple M2
+
+┌────────────────┬────────────┬────────────┬────────────┬─────────┬─────────┬─────────┐
+│ avg_rank ┆ 1.62 ┆ 2.81 ┆ 2.02 ┆ 3.58 ┆ 4.97 │
+│ geometric_mean ┆ 4.41 ┆ 4.86 ┆ 5.39 ┆ 5.71 ┆ 21.94 │
+╞════════════════╪════════════╪════════════╪════════════╪═════════╪═════════╪═════════╡
+│ distr ┆ bench ┆ foldhash-f ┆ foldhash-q ┆ fxhash ┆ ahash ┆ siphash │
+╞════════════════╪════════════╪════════════╪════════════╪═════════╪═════════╪═════════╡
+│ u64 ┆ hashonly ┆ 0.60 ┆ 0.70 ┆ 0.41 ┆ 0.78 ┆ 6.61 │
+│ u64 ┆ lookupmiss ┆ 1.50 ┆ 1.61 ┆ 1.23 ┆ 1.65 ┆ 8.28 │
+│ u64 ┆ lookuphit ┆ 1.78 ┆ 2.10 ┆ 1.57 ┆ 2.25 ┆ 8.53 │
+│ u64 ┆ setbuild ┆ 4.74 ┆ 5.19 ┆ 3.61 ┆ 5.38 ┆ 15.36 │
+| ... ┆ ... ┆ ... ┆ ... ┆ ... ┆ ... ┆ ... |
+│ strenglishword ┆ hashonly ┆ 1.84 ┆ 2.13 ┆ 1.85 ┆ 2.13 ┆ 11.61 │
+│ strenglishword ┆ lookupmiss ┆ 2.71 ┆ 2.96 ┆ 2.47 ┆ 2.99 ┆ 9.27 │
+│ strenglishword ┆ lookuphit ┆ 7.54 ┆ 8.77 ┆ 7.83 ┆ 8.77 ┆ 18.65 │
+│ strenglishword ┆ setbuild ┆ 16.61 ┆ 17.09 ┆ 14.83 ┆ 16.52 ┆ 26.42 │
+└────────────────┴────────────┴────────────┴────────────┴─────────┴─────────┴─────────┘
+```
+
+We note from the above benchmark that for hash table performance the extra
+quality that `foldhash-q` provides is almost never actually worth the small but
+also non-negligible computational overhead it has over `foldhash-f`. This is our
+justification for providing `foldhash::fast` as a default choice for hash
+tables, even though it has measurable biases (see also the "Quality" section).
+
+fxhash generally does fairly well for small inputs on the benchmarks, however it
+has structural weaknesses as a hash which makes it ill-advised to use as a
+general-purpose hash function in our opinion. For example the `lookuphit`
+benchmark on Apple M2 for `u64hibits` takes 1.77 nanoseconds per lookup for
+foldhash, but 67.72 nanoseconds for fxhash (due to everything colliding - the
+effects would be even worse with a larger hash map). In our opinion foldhash-f
+strikes the right balance between quality and performance for hash tables,
+whereas fxhash flies a bit too close to the sun.
+
+aHash is faster than foldhash for medium-long strings when compiled with
+AES instruction support, but is slower in almost every other scenario or when
+AES instructions are unavailable.
+
+
+## Quality
+
+Foldhash-f is a fairly strong hash in terms of collisions *on its full 64-bit
+output*. However, statistical tests such as
+[SMHasher3](https://gitlab.com/fwojcik/smhasher3) can distinguish it from an ideal
+hash function in tests that focus on the relationship between individual
+input/output bits. One such property is avalanching: changing a single bit in
+the input does not flip every other bit with 50% probability when using
+foldhash-f like it should if it behaved like a proper random oracle.
+
+As the benchmarks above show, spending more effort in foldhash-f to improve the
+hash quality does not lead to better hash table performance. However, there are
+also use cases for hash functions where it is important that (each bit of) the
+hash is unbiased and a random function of all bits of the input, such as in
+algorithms as HyperLogLog or MinHash.
+
+For this purpose we also provide foldhash-q, which is simply a post-processed
+version of foldhash-f to properly avalanche all the bits. Foldhash-q passes the
+[SMHasher3](https://gitlab.com/fwojcik/smhasher3) test suite [without any
+failures](https://github.com/orlp/foldhash_smhasher3). You can also plot the
+worst-case probability (where 50% is ideal) that any particular output bit flips
+if you flip an input bit, which nicely visualizes how fxhash and foldhash-f
+fail this avalanche property but foldhash-q and SipHash-1-3 pass:
+
+
+| FxHash | Foldhash-f | Foldhash-q | SipHash-1-3 |
+|--------|------------|------------|-------------|
+| <img src="assets/avalanche-fxhash.png" width=300> | <img src="assets/avalanche-foldhash-fast.png" width=300> | <img src="assets/avalanche-foldhash-quality.png" width=300> | <img src="assets/avalanche-siphash.png" width=300>
+
+
+## Background
+
+The name foldhash is derived from the *folded multiply*. This technique
+compresses two 64-bit words into a single 64-bit word while simultaneously
+thoroughly mixing the bits. It does this using a 64 x 64 bit -> 128 bit
+multiplication followed by folding the two halves of the 128-bit product
+together using a XOR operation:
+
+```rust
+let full = (x as u128) * (y as u128);
+let lo = full as u64;
+let hi = (full >> 64) as u64;
+let folded = lo ^ hi;
+```
+
+We're not aware of a formal analysis of this operation, but empirically it works
+very well. An informal intuition for why it should work is that multiplication
+can be seen as the sum of many shifted copies of one of the arguments, only
+including those shifted copies where the other argument has set bits, e.g. for
+multiplying 4-bit words `abcd` and `efgh`:
+
+```
+abcd * efgh =
+
+ abcd * e
+ abcd * f
+ abcd * g
+ abcd * h
+--------------- +
+```
+
+Note that the middle bits of the product are a function of many of the input
+bits, whereas the top-most and bottom-most bits are impacted by fewer of the
+input bits. By folding the top half back onto the bottom half these effects
+compensate each other, making all the output bits affected by much of the input.
+
+We did not invent the folded multiply, it was previously used in essentially the
+same way in [aHash](https://github.com/tkaitchuck/aHash),
+[wyhash](https://github.com/wangyi-fudan/wyhash), and
+[xxhash3](https://github.com/Cyan4973/xxHash). The operation was also used
+in [mum-hash](https://github.com/vnmakarov/mum-hash), and probably others.
+We do not know who originally invented it, the earliest reference
+we could find was Steven Fuerst [blogging about it](https://web.archive.org/web/20121213174842/http://locklessinc.com/articles/crypto_hash/)
+in 2012.
+
+
+## HashDoS resistance
+
+The folded multiply has a fairly glaring flaw: if one of the halves is zero, the
+output is zero. This makes it trivial to create a large number of hash
+collisions (even by accident, as zeroes are a common input to hashes). To combat
+this, every folded multiply in foldhash has the following form:
+
+```rust
+folded_multiply(input1 ^ secret1, input2 ^ secret2)
+```
+
+Here `secret1` or `secret2` are either secret random numbers generated by
+foldhash beforehand, or partial hash results influenced by such a secret prior.
+This (plus other careful design throughout the hash function) ensures that it is
+not possible to create a list of inputs that collide for every instance of
+foldhash, and also prevents certain access patterns on hash tables going
+quadratric by ensuring that each hash table uses a different seed and thus a
+different access pattern. It is these two properties that we refer to when we
+claim foldhash is "minimally DoS-resistant": it does the bare minimum to defeat
+very simple attacks.
+
+However, to be crystal clear, **foldhash does not claim to provide HashDoS
+resistance against interactive attackers**. For a student of cryptography it
+should be trivial to derive the secret values from direct observation of hash
+outputs, and feasible to derive the secret values from indirect observation of
+hashes, such as through timing attacks or hash table iteration. Once an attacker
+knows the secret values, they can once again create infinite hash collisions
+with ease.
+
+
+## Acknowledgements
+
+We thank Liam Gray for their suggestions on improving string hashing
+performance.
diff --git a/external/vendor/foldhash/src/convenience.rs b/external/vendor/foldhash/src/convenience.rs
new file mode 100644
index 00000000..dd1dd4e2
--- /dev/null
+++ b/external/vendor/foldhash/src/convenience.rs
@@ -0,0 +1,73 @@
+use super::fast::{FixedState, RandomState};
+
+/// Type alias for [`std::collections::HashMap<K, V, foldhash::fast::RandomState>`].
+pub type HashMap<K, V> = std::collections::HashMap<K, V, RandomState>;
+
+/// Type alias for [`std::collections::HashSet<T, foldhash::fast::RandomState>`].
+pub type HashSet<T> = std::collections::HashSet<T, RandomState>;
+
+/// A convenience extension trait to enable [`HashMap::new`] for hash maps that use `foldhash`.
+pub trait HashMapExt {
+ /// Creates an empty `HashMap`.
+ fn new() -> Self;
+
+ /// Creates an empty `HashMap` with at least the specified capacity.
+ fn with_capacity(capacity: usize) -> Self;
+}
+
+impl<K, V> HashMapExt for std::collections::HashMap<K, V, RandomState> {
+ #[inline(always)]
+ fn new() -> Self {
+ Self::with_hasher(RandomState::default())
+ }
+
+ #[inline(always)]
+ fn with_capacity(capacity: usize) -> Self {
+ Self::with_capacity_and_hasher(capacity, RandomState::default())
+ }
+}
+
+impl<K, V> HashMapExt for std::collections::HashMap<K, V, FixedState> {
+ #[inline(always)]
+ fn new() -> Self {
+ Self::with_hasher(FixedState::default())
+ }
+
+ #[inline(always)]
+ fn with_capacity(capacity: usize) -> Self {
+ Self::with_capacity_and_hasher(capacity, FixedState::default())
+ }
+}
+
+/// A convenience extension trait to enable [`HashSet::new`] for hash sets that use `foldhash`.
+pub trait HashSetExt {
+ /// Creates an empty `HashSet`.
+ fn new() -> Self;
+
+ /// Creates an empty `HashSet` with at least the specified capacity.
+ fn with_capacity(capacity: usize) -> Self;
+}
+
+impl<T> HashSetExt for std::collections::HashSet<T, RandomState> {
+ #[inline(always)]
+ fn new() -> Self {
+ Self::with_hasher(RandomState::default())
+ }
+
+ #[inline(always)]
+ fn with_capacity(capacity: usize) -> Self {
+ Self::with_capacity_and_hasher(capacity, RandomState::default())
+ }
+}
+
+impl<T> HashSetExt for std::collections::HashSet<T, FixedState> {
+ #[inline(always)]
+ fn new() -> Self {
+ Self::with_hasher(FixedState::default())
+ }
+
+ #[inline(always)]
+ fn with_capacity(capacity: usize) -> Self {
+ Self::with_capacity_and_hasher(capacity, FixedState::default())
+ }
+}
diff --git a/external/vendor/foldhash/src/fast.rs b/external/vendor/foldhash/src/fast.rs
new file mode 100644
index 00000000..4307a158
--- /dev/null
+++ b/external/vendor/foldhash/src/fast.rs
@@ -0,0 +1,244 @@
+//! The foldhash implementation optimized for speed.
+
+use core::hash::{BuildHasher, Hasher};
+
+use crate::seed::{gen_per_hasher_seed, GlobalSeed, SharedSeed};
+use crate::{folded_multiply, hash_bytes_long, hash_bytes_short, rotate_right, ARBITRARY3};
+
+/// A [`Hasher`] instance implementing foldhash, optimized for speed.
+///
+/// While you can create one directly with [`FoldHasher::with_seed`], you
+/// most likely want to use [`RandomState`], [`SeedableRandomState`] or
+/// [`FixedState`] to create [`FoldHasher`]s.
+#[derive(Clone)]
+pub struct FoldHasher<'a> {
+ accumulator: u64,
+ sponge: u128,
+ sponge_len: u8,
+ seeds: &'a [u64; 6],
+}
+
+impl<'a> FoldHasher<'a> {
+ /// Initializes this [`FoldHasher`] with the given per-hasher seed and
+ /// [`SharedSeed`].
+ #[inline]
+ pub const fn with_seed(per_hasher_seed: u64, shared_seed: &'a SharedSeed) -> FoldHasher<'a> {
+ FoldHasher {
+ accumulator: per_hasher_seed,
+ sponge: 0,
+ sponge_len: 0,
+ seeds: &shared_seed.seeds,
+ }
+ }
+
+ #[inline(always)]
+ fn write_num<T: Into<u128>>(&mut self, x: T) {
+ let bits: usize = 8 * core::mem::size_of::<T>();
+ if self.sponge_len as usize + bits > 128 {
+ let lo = self.sponge as u64;
+ let hi = (self.sponge >> 64) as u64;
+ self.accumulator = folded_multiply(lo ^ self.accumulator, hi ^ self.seeds[0]);
+ self.sponge = x.into();
+ self.sponge_len = bits as u8;
+ } else {
+ self.sponge |= x.into() << self.sponge_len;
+ self.sponge_len += bits as u8;
+ }
+ }
+}
+
+impl<'a> Hasher for FoldHasher<'a> {
+ #[inline(always)]
+ fn write(&mut self, bytes: &[u8]) {
+ // We perform overlapping reads in the byte hash which could lead to
+ // trivial length-extension attacks. These should be defeated by
+ // adding a length-dependent rotation on our unpredictable seed
+ // which costs only a single cycle (or none if executed with
+ // instruction-level parallelism).
+ let len = bytes.len();
+ self.accumulator = rotate_right(self.accumulator, len as u32);
+ if len <= 16 {
+ self.accumulator = hash_bytes_short(bytes, self.accumulator, self.seeds);
+ } else {
+ unsafe {
+ // SAFETY: we checked that the length is > 16 bytes.
+ self.accumulator = hash_bytes_long(bytes, self.accumulator, self.seeds);
+ }
+ }
+ }
+
+ #[inline(always)]
+ fn write_u8(&mut self, i: u8) {
+ self.write_num(i);
+ }
+
+ #[inline(always)]
+ fn write_u16(&mut self, i: u16) {
+ self.write_num(i);
+ }
+
+ #[inline(always)]
+ fn write_u32(&mut self, i: u32) {
+ self.write_num(i);
+ }
+
+ #[inline(always)]
+ fn write_u64(&mut self, i: u64) {
+ self.write_num(i);
+ }
+
+ #[inline(always)]
+ fn write_u128(&mut self, i: u128) {
+ let lo = i as u64;
+ let hi = (i >> 64) as u64;
+ self.accumulator = folded_multiply(lo ^ self.accumulator, hi ^ self.seeds[0]);
+ }
+
+ #[inline(always)]
+ fn write_usize(&mut self, i: usize) {
+ // u128 doesn't implement From<usize>.
+ #[cfg(target_pointer_width = "32")]
+ self.write_num(i as u32);
+ #[cfg(target_pointer_width = "64")]
+ self.write_num(i as u64);
+ }
+
+ #[cfg(feature = "nightly")]
+ #[inline(always)]
+ fn write_str(&mut self, s: &str) {
+ // Our write function already handles length differences.
+ self.write(s.as_bytes())
+ }
+
+ #[inline(always)]
+ fn finish(&self) -> u64 {
+ if self.sponge_len > 0 {
+ let lo = self.sponge as u64;
+ let hi = (self.sponge >> 64) as u64;
+ folded_multiply(lo ^ self.accumulator, hi ^ self.seeds[0])
+ } else {
+ self.accumulator
+ }
+ }
+}
+
+/// A [`BuildHasher`] for [`fast::FoldHasher`](FoldHasher) that is randomly initialized.
+#[derive(Clone, Debug)]
+pub struct RandomState {
+ per_hasher_seed: u64,
+ global_seed: GlobalSeed,
+}
+
+impl Default for RandomState {
+ #[inline(always)]
+ fn default() -> Self {
+ Self {
+ per_hasher_seed: gen_per_hasher_seed(),
+ global_seed: GlobalSeed::new(),
+ }
+ }
+}
+
+impl BuildHasher for RandomState {
+ type Hasher = FoldHasher<'static>;
+
+ #[inline(always)]
+ fn build_hasher(&self) -> FoldHasher<'static> {
+ FoldHasher::with_seed(self.per_hasher_seed, self.global_seed.get())
+ }
+}
+
+/// A [`BuildHasher`] for [`fast::FoldHasher`](FoldHasher) that is randomly
+/// initialized by default, but can also be initialized with a specific seed.
+///
+/// This can be useful for e.g. testing, but the downside is that this type
+/// has a size of 16 bytes rather than the 8 bytes [`RandomState`] is.
+#[derive(Clone, Debug)]
+pub struct SeedableRandomState {
+ per_hasher_seed: u64,
+ shared_seed: &'static SharedSeed,
+}
+
+impl Default for SeedableRandomState {
+ #[inline(always)]
+ fn default() -> Self {
+ Self::random()
+ }
+}
+
+impl SeedableRandomState {
+ /// Generates a random [`SeedableRandomState`], similar to [`RandomState`].
+ #[inline(always)]
+ pub fn random() -> Self {
+ Self {
+ per_hasher_seed: gen_per_hasher_seed(),
+ shared_seed: SharedSeed::global_random(),
+ }
+ }
+
+ /// Generates a fixed [`SeedableRandomState`], similar to [`FixedState`].
+ #[inline(always)]
+ pub fn fixed() -> Self {
+ Self {
+ per_hasher_seed: ARBITRARY3,
+ shared_seed: SharedSeed::global_fixed(),
+ }
+ }
+
+ /// Generates a [`SeedableRandomState`] with the given per-hasher seed
+ /// and [`SharedSeed`].
+ #[inline(always)]
+ pub fn with_seed(per_hasher_seed: u64, shared_seed: &'static SharedSeed) -> Self {
+ // XOR with ARBITRARY3 such that with_seed(0) matches default.
+ Self {
+ per_hasher_seed: per_hasher_seed ^ ARBITRARY3,
+ shared_seed,
+ }
+ }
+}
+
+impl BuildHasher for SeedableRandomState {
+ type Hasher = FoldHasher<'static>;
+
+ #[inline(always)]
+ fn build_hasher(&self) -> FoldHasher<'static> {
+ FoldHasher::with_seed(self.per_hasher_seed, self.shared_seed)
+ }
+}
+
+/// A [`BuildHasher`] for [`fast::FoldHasher`](FoldHasher) that always has the same fixed seed.
+///
+/// Not recommended unless you absolutely need determinism.
+#[derive(Clone, Debug)]
+pub struct FixedState {
+ per_hasher_seed: u64,
+}
+
+impl FixedState {
+ /// Creates a [`FixedState`] with the given per-hasher-seed.
+ #[inline(always)]
+ pub const fn with_seed(per_hasher_seed: u64) -> Self {
+ // XOR with ARBITRARY3 such that with_seed(0) matches default.
+ Self {
+ per_hasher_seed: per_hasher_seed ^ ARBITRARY3,
+ }
+ }
+}
+
+impl Default for FixedState {
+ #[inline(always)]
+ fn default() -> Self {
+ Self {
+ per_hasher_seed: ARBITRARY3,
+ }
+ }
+}
+
+impl BuildHasher for FixedState {
+ type Hasher = FoldHasher<'static>;
+
+ #[inline(always)]
+ fn build_hasher(&self) -> FoldHasher<'static> {
+ FoldHasher::with_seed(self.per_hasher_seed, SharedSeed::global_fixed())
+ }
+}
diff --git a/external/vendor/foldhash/src/lib.rs b/external/vendor/foldhash/src/lib.rs
new file mode 100644
index 00000000..5ebb5fe2
--- /dev/null
+++ b/external/vendor/foldhash/src/lib.rs
@@ -0,0 +1,350 @@
+//! This crate provides foldhash, a fast, non-cryptographic, minimally
+//! DoS-resistant hashing algorithm designed for computational uses such as
+//! hashmaps, bloom filters, count sketching, etc.
+//!
+//! When should you **not** use foldhash:
+//!
+//! - You are afraid of people studying your long-running program's behavior
+//! to reverse engineer its internal random state and using this knowledge to
+//! create many colliding inputs for computational complexity attacks.
+//!
+//! - You expect foldhash to have a consistent output across versions or
+//! platforms, such as for persistent file formats or communication protocols.
+//!
+//! - You are relying on foldhash's properties for any kind of security.
+//! Foldhash is **not appropriate for any cryptographic purpose**.
+//!
+//! Foldhash has two variants, one optimized for speed which is ideal for data
+//! structures such as hash maps and bloom filters, and one optimized for
+//! statistical quality which is ideal for algorithms such as
+//! [HyperLogLog](https://en.wikipedia.org/wiki/HyperLogLog) and
+//! [MinHash](https://en.wikipedia.org/wiki/MinHash).
+//!
+//! Foldhash can be used in a `#![no_std]` environment by disabling its default
+//! `"std"` feature.
+//!
+//! # Usage
+//!
+//! The easiest way to use this crate with the standard library [`HashMap`] or
+//! [`HashSet`] is to import them from `foldhash` instead, along with the
+//! extension traits to make [`HashMap::new`] and [`HashMap::with_capacity`]
+//! work out-of-the-box:
+//!
+//! ```rust
+//! use foldhash::{HashMap, HashMapExt};
+//!
+//! let mut hm = HashMap::new();
+//! hm.insert(42, "hello");
+//! ```
+//!
+//! You can also avoid the convenience types and do it manually by initializing
+//! a [`RandomState`](fast::RandomState), for example if you are using a different hash map
+//! implementation like [`hashbrown`](https://docs.rs/hashbrown/):
+//!
+//! ```rust
+//! use hashbrown::HashMap;
+//! use foldhash::fast::RandomState;
+//!
+//! let mut hm = HashMap::with_hasher(RandomState::default());
+//! hm.insert("foo", "bar");
+//! ```
+//!
+//! The above methods are the recommended way to use foldhash, which will
+//! automatically generate a randomly generated hasher instance for you. If you
+//! absolutely must have determinism you can use [`FixedState`](fast::FixedState)
+//! instead, but note that this makes you trivially vulnerable to HashDoS
+//! attacks and might lead to quadratic runtime when moving data from one
+//! hashmap/set into another:
+//!
+//! ```rust
+//! use std::collections::HashSet;
+//! use foldhash::fast::FixedState;
+//!
+//! let mut hm = HashSet::with_hasher(FixedState::with_seed(42));
+//! hm.insert([1, 10, 100]);
+//! ```
+//!
+//! If you rely on statistical properties of the hash for the correctness of
+//! your algorithm, such as in [HyperLogLog](https://en.wikipedia.org/wiki/HyperLogLog),
+//! it is suggested to use the [`RandomState`](quality::RandomState)
+//! or [`FixedState`](quality::FixedState) from the [`quality`] module instead
+//! of the [`fast`] module. The latter is optimized purely for speed in hash
+//! tables and has known statistical imperfections.
+//!
+//! Finally, you can also directly use the [`RandomState`](quality::RandomState)
+//! or [`FixedState`](quality::FixedState) to manually hash items using the
+//! [`BuildHasher`](std::hash::BuildHasher) trait:
+//! ```rust
+//! use std::hash::BuildHasher;
+//! use foldhash::quality::RandomState;
+//!
+//! let random_state = RandomState::default();
+//! let hash = random_state.hash_one("hello world");
+//! ```
+//!
+//! ## Seeding
+//!
+//! Foldhash relies on a single 8-byte per-hasher seed which should be ideally
+//! be different from each instance to instance, and also a larger
+//! [`SharedSeed`] which may be shared by many different instances.
+//!
+//! To reduce overhead, this [`SharedSeed`] is typically initialized once and
+//! stored. To prevent each hashmap unnecessarily containing a reference to this
+//! value there are three kinds of [`BuildHasher`](core::hash::BuildHasher)s
+//! foldhash provides (both for [`fast`] and [`quality`]):
+//!
+//! 1. [`RandomState`](fast::RandomState), which always generates a
+//! random per-hasher seed and implicitly stores a reference to [`SharedSeed::global_random`].
+//! 2. [`FixedState`](fast::FixedState), which by default uses a fixed
+//! per-hasher seed and implicitly stores a reference to [`SharedSeed::global_fixed`].
+//! 3. [`SeedableRandomState`](fast::SeedableRandomState), which works like
+//! [`RandomState`](fast::RandomState) by default but can be seeded in any manner.
+//! This state must include an explicit reference to a [`SharedSeed`], and thus
+//! this struct is 16 bytes as opposed to just 8 bytes for the previous two.
+//!
+//! ## Features
+//!
+//! This crate has the following features:
+//! - `nightly`, this feature improves string hashing performance
+//! slightly using the nightly-only Rust feature
+//! [`hasher_prefixfree_extras`](https://github.com/rust-lang/rust/issues/96762),
+//! - `std`, this enabled-by-default feature offers convenient aliases for `std`
+//! containers, but can be turned off for `#![no_std]` crates.
+
+#![cfg_attr(all(not(test), not(feature = "std")), no_std)]
+#![cfg_attr(feature = "nightly", feature(hasher_prefixfree_extras))]
+#![warn(missing_docs)]
+
+pub mod fast;
+pub mod quality;
+mod seed;
+pub use seed::SharedSeed;
+
+#[cfg(feature = "std")]
+mod convenience;
+#[cfg(feature = "std")]
+pub use convenience::*;
+
+// Arbitrary constants with high entropy. Hexadecimal digits of pi were used.
+const ARBITRARY0: u64 = 0x243f6a8885a308d3;
+const ARBITRARY1: u64 = 0x13198a2e03707344;
+const ARBITRARY2: u64 = 0xa4093822299f31d0;
+const ARBITRARY3: u64 = 0x082efa98ec4e6c89;
+const ARBITRARY4: u64 = 0x452821e638d01377;
+const ARBITRARY5: u64 = 0xbe5466cf34e90c6c;
+const ARBITRARY6: u64 = 0xc0ac29b7c97c50dd;
+const ARBITRARY7: u64 = 0x3f84d5b5b5470917;
+const ARBITRARY8: u64 = 0x9216d5d98979fb1b;
+const ARBITRARY9: u64 = 0xd1310ba698dfb5ac;
+const ARBITRARY10: u64 = 0x2ffd72dbd01adfb7;
+const ARBITRARY11: u64 = 0xb8e1afed6a267e96;
+
+#[inline(always)]
+const fn folded_multiply(x: u64, y: u64) -> u64 {
+ // The following code path is only fast if 64-bit to 128-bit widening
+ // multiplication is supported by the architecture. Most 64-bit
+ // architectures except SPARC64 and Wasm64 support it. However, the target
+ // pointer width doesn't always indicate that we are dealing with a 64-bit
+ // architecture, as there are ABIs that reduce the pointer width, especially
+ // on AArch64 and x86-64. WebAssembly (regardless of pointer width) supports
+ // 64-bit to 128-bit widening multiplication with the `wide-arithmetic`
+ // proposal.
+ #[cfg(any(
+ all(
+ target_pointer_width = "64",
+ not(any(target_arch = "sparc64", target_arch = "wasm64")),
+ ),
+ target_arch = "aarch64",
+ target_arch = "x86_64",
+ all(target_family = "wasm", target_feature = "wide-arithmetic"),
+ ))]
+ {
+ // We compute the full u64 x u64 -> u128 product, this is a single mul
+ // instruction on x86-64, one mul plus one mulhi on ARM64.
+ let full = (x as u128).wrapping_mul(y as u128);
+ let lo = full as u64;
+ let hi = (full >> 64) as u64;
+
+ // The middle bits of the full product fluctuate the most with small
+ // changes in the input. This is the top bits of lo and the bottom bits
+ // of hi. We can thus make the entire output fluctuate with small
+ // changes to the input by XOR'ing these two halves.
+ lo ^ hi
+ }
+
+ #[cfg(not(any(
+ all(
+ target_pointer_width = "64",
+ not(any(target_arch = "sparc64", target_arch = "wasm64")),
+ ),
+ target_arch = "aarch64",
+ target_arch = "x86_64",
+ all(target_family = "wasm", target_feature = "wide-arithmetic"),
+ )))]
+ {
+ // u64 x u64 -> u128 product is quite expensive on 32-bit.
+ // We approximate it by expanding the multiplication and eliminating
+ // carries by replacing additions with XORs:
+ // (2^32 hx + lx)*(2^32 hy + ly) =
+ // 2^64 hx*hy + 2^32 (hx*ly + lx*hy) + lx*ly ~=
+ // 2^64 hx*hy ^ 2^32 (hx*ly ^ lx*hy) ^ lx*ly
+ // Which when folded becomes:
+ // (hx*hy ^ lx*ly) ^ (hx*ly ^ lx*hy).rotate_right(32)
+
+ let lx = x as u32;
+ let ly = y as u32;
+ let hx = (x >> 32) as u32;
+ let hy = (y >> 32) as u32;
+
+ let ll = (lx as u64).wrapping_mul(ly as u64);
+ let lh = (lx as u64).wrapping_mul(hy as u64);
+ let hl = (hx as u64).wrapping_mul(ly as u64);
+ let hh = (hx as u64).wrapping_mul(hy as u64);
+
+ (hh ^ ll) ^ (hl ^ lh).rotate_right(32)
+ }
+}
+
+#[inline(always)]
+const fn rotate_right(x: u64, r: u32) -> u64 {
+ #[cfg(any(
+ target_pointer_width = "64",
+ target_arch = "aarch64",
+ target_arch = "x86_64",
+ target_family = "wasm",
+ ))]
+ {
+ x.rotate_right(r)
+ }
+
+ #[cfg(not(any(
+ target_pointer_width = "64",
+ target_arch = "aarch64",
+ target_arch = "x86_64",
+ target_family = "wasm",
+ )))]
+ {
+ // On platforms without 64-bit arithmetic rotation can be slow, rotate
+ // each 32-bit half independently.
+ let lo = (x as u32).rotate_right(r);
+ let hi = ((x >> 32) as u32).rotate_right(r);
+ ((hi as u64) << 32) | lo as u64
+ }
+}
+
+#[cold]
+fn cold_path() {}
+
+/// Hashes strings <= 16 bytes, has unspecified behavior when bytes.len() > 16.
+#[inline(always)]
+fn hash_bytes_short(bytes: &[u8], accumulator: u64, seeds: &[u64; 6]) -> u64 {
+ let len = bytes.len();
+ let mut s0 = accumulator;
+ let mut s1 = seeds[1];
+ // XOR the input into s0, s1, then multiply and fold.
+ if len >= 8 {
+ s0 ^= u64::from_ne_bytes(bytes[0..8].try_into().unwrap());
+ s1 ^= u64::from_ne_bytes(bytes[len - 8..].try_into().unwrap());
+ } else if len >= 4 {
+ s0 ^= u32::from_ne_bytes(bytes[0..4].try_into().unwrap()) as u64;
+ s1 ^= u32::from_ne_bytes(bytes[len - 4..].try_into().unwrap()) as u64;
+ } else if len > 0 {
+ let lo = bytes[0];
+ let mid = bytes[len / 2];
+ let hi = bytes[len - 1];
+ s0 ^= lo as u64;
+ s1 ^= ((hi as u64) << 8) | mid as u64;
+ }
+ folded_multiply(s0, s1)
+}
+
+/// Load 8 bytes into a u64 word at the given offset.
+///
+/// # Safety
+/// You must ensure that offset + 8 <= bytes.len().
+#[inline(always)]
+unsafe fn load(bytes: &[u8], offset: usize) -> u64 {
+ // In most (but not all) cases this unsafe code is not necessary to avoid
+ // the bounds checks in the below code, but the register allocation became
+ // worse if I replaced those calls which could be replaced with safe code.
+ unsafe { bytes.as_ptr().add(offset).cast::<u64>().read_unaligned() }
+}
+
+/// Hashes strings > 16 bytes.
+///
+/// # Safety
+/// v.len() must be > 16 bytes.
+#[cold]
+#[inline(never)]
+unsafe fn hash_bytes_long(mut v: &[u8], accumulator: u64, seeds: &[u64; 6]) -> u64 {
+ let mut s0 = accumulator;
+ let mut s1 = s0.wrapping_add(seeds[1]);
+
+ if v.len() > 128 {
+ cold_path();
+ let mut s2 = s0.wrapping_add(seeds[2]);
+ let mut s3 = s0.wrapping_add(seeds[3]);
+
+ if v.len() > 256 {
+ cold_path();
+ let mut s4 = s0.wrapping_add(seeds[4]);
+ let mut s5 = s0.wrapping_add(seeds[5]);
+ loop {
+ unsafe {
+ // SAFETY: we checked the length is > 256, we index at most v[..96].
+ s0 = folded_multiply(load(v, 0) ^ s0, load(v, 48) ^ seeds[0]);
+ s1 = folded_multiply(load(v, 8) ^ s1, load(v, 56) ^ seeds[0]);
+ s2 = folded_multiply(load(v, 16) ^ s2, load(v, 64) ^ seeds[0]);
+ s3 = folded_multiply(load(v, 24) ^ s3, load(v, 72) ^ seeds[0]);
+ s4 = folded_multiply(load(v, 32) ^ s4, load(v, 80) ^ seeds[0]);
+ s5 = folded_multiply(load(v, 40) ^ s5, load(v, 88) ^ seeds[0]);
+ }
+ v = &v[96..];
+ if v.len() <= 256 {
+ break;
+ }
+ }
+ s0 ^= s4;
+ s1 ^= s5;
+ }
+
+ loop {
+ unsafe {
+ // SAFETY: we checked the length is > 128, we index at most v[..64].
+ s0 = folded_multiply(load(v, 0) ^ s0, load(v, 32) ^ seeds[0]);
+ s1 = folded_multiply(load(v, 8) ^ s1, load(v, 40) ^ seeds[0]);
+ s2 = folded_multiply(load(v, 16) ^ s2, load(v, 48) ^ seeds[0]);
+ s3 = folded_multiply(load(v, 24) ^ s3, load(v, 56) ^ seeds[0]);
+ }
+ v = &v[64..];
+ if v.len() <= 128 {
+ break;
+ }
+ }
+ s0 ^= s2;
+ s1 ^= s3;
+ }
+
+ let len = v.len();
+ unsafe {
+ // SAFETY: our precondition ensures our length is at least 16, and the
+ // above loops do not reduce the length under that. This protects our
+ // first iteration of this loop, the further iterations are protected
+ // directly by the checks on len.
+ s0 = folded_multiply(load(v, 0) ^ s0, load(v, len - 16) ^ seeds[0]);
+ s1 = folded_multiply(load(v, 8) ^ s1, load(v, len - 8) ^ seeds[0]);
+ if len >= 32 {
+ s0 = folded_multiply(load(v, 16) ^ s0, load(v, len - 32) ^ seeds[0]);
+ s1 = folded_multiply(load(v, 24) ^ s1, load(v, len - 24) ^ seeds[0]);
+ if len >= 64 {
+ s0 = folded_multiply(load(v, 32) ^ s0, load(v, len - 48) ^ seeds[0]);
+ s1 = folded_multiply(load(v, 40) ^ s1, load(v, len - 40) ^ seeds[0]);
+ if len >= 96 {
+ s0 = folded_multiply(load(v, 48) ^ s0, load(v, len - 64) ^ seeds[0]);
+ s1 = folded_multiply(load(v, 56) ^ s1, load(v, len - 56) ^ seeds[0]);
+ }
+ }
+ }
+ }
+ s0 ^ s1
+}
diff --git a/external/vendor/foldhash/src/quality.rs b/external/vendor/foldhash/src/quality.rs
new file mode 100644
index 00000000..2dd43461
--- /dev/null
+++ b/external/vendor/foldhash/src/quality.rs
@@ -0,0 +1,180 @@
+//! The foldhash implementation optimized for quality.
+
+use core::hash::{BuildHasher, Hasher};
+
+use crate::seed::SharedSeed;
+
+use crate::{fast, folded_multiply, ARBITRARY0, ARBITRARY4};
+
+/// A [`Hasher`] instance implementing foldhash, optimized for quality.
+///
+/// While you can create one directly with [`FoldHasher::with_seed`], you
+/// most likely want to use [`RandomState`], [`SeedableRandomState`] or
+/// [`FixedState`] to create [`FoldHasher`]s.
+#[derive(Clone)]
+pub struct FoldHasher<'a> {
+ pub(crate) inner: fast::FoldHasher<'a>,
+}
+
+impl<'a> FoldHasher<'a> {
+ /// Initializes this [`FoldHasher`] with the given per-hasher seed and
+ /// [`SharedSeed`].
+ #[inline(always)]
+ pub const fn with_seed(per_hasher_seed: u64, shared_seed: &'a SharedSeed) -> FoldHasher<'a> {
+ FoldHasher {
+ inner: fast::FoldHasher::with_seed(per_hasher_seed, shared_seed),
+ }
+ }
+}
+
+impl<'a> Hasher for FoldHasher<'a> {
+ #[inline(always)]
+ fn write(&mut self, bytes: &[u8]) {
+ self.inner.write(bytes);
+ }
+
+ #[inline(always)]
+ fn write_u8(&mut self, i: u8) {
+ self.inner.write_u8(i);
+ }
+
+ #[inline(always)]
+ fn write_u16(&mut self, i: u16) {
+ self.inner.write_u16(i);
+ }
+
+ #[inline(always)]
+ fn write_u32(&mut self, i: u32) {
+ self.inner.write_u32(i);
+ }
+
+ #[inline(always)]
+ fn write_u64(&mut self, i: u64) {
+ self.inner.write_u64(i);
+ }
+
+ #[inline(always)]
+ fn write_u128(&mut self, i: u128) {
+ self.inner.write_u128(i);
+ }
+
+ #[inline(always)]
+ fn write_usize(&mut self, i: usize) {
+ self.inner.write_usize(i);
+ }
+
+ #[cfg(feature = "nightly")]
+ #[inline(always)]
+ fn write_str(&mut self, s: &str) {
+ self.inner.write_str(s);
+ }
+
+ #[inline(always)]
+ fn finish(&self) -> u64 {
+ folded_multiply(self.inner.finish(), ARBITRARY0)
+ }
+}
+
+/// A [`BuildHasher`] for [`quality::FoldHasher`](FoldHasher) that is randomly initialized.
+#[derive(Clone, Default, Debug)]
+pub struct RandomState {
+ inner: fast::RandomState,
+}
+
+impl BuildHasher for RandomState {
+ type Hasher = FoldHasher<'static>;
+
+ #[inline(always)]
+ fn build_hasher(&self) -> FoldHasher<'static> {
+ FoldHasher {
+ inner: self.inner.build_hasher(),
+ }
+ }
+}
+
+/// A [`BuildHasher`] for [`quality::FoldHasher`](FoldHasher) that is randomly
+/// initialized by default, but can also be initialized with a specific seed.
+///
+/// This can be useful for e.g. testing, but the downside is that this type
+/// has a size of 16 bytes rather than the 8 bytes [`RandomState`] is.
+#[derive(Clone, Default, Debug)]
+pub struct SeedableRandomState {
+ inner: fast::SeedableRandomState,
+}
+
+impl SeedableRandomState {
+ /// Generates a random [`SeedableRandomState`], similar to [`RandomState`].
+ #[inline(always)]
+ pub fn random() -> Self {
+ Self {
+ inner: fast::SeedableRandomState::random(),
+ }
+ }
+
+ /// Generates a fixed [`SeedableRandomState`], similar to [`FixedState`].
+ #[inline(always)]
+ pub fn fixed() -> Self {
+ Self {
+ inner: fast::SeedableRandomState::fixed(),
+ }
+ }
+
+ /// Generates a [`SeedableRandomState`] with the given per-hasher seed
+ /// and [`SharedSeed`].
+ #[inline(always)]
+ pub fn with_seed(per_hasher_seed: u64, shared_seed: &'static SharedSeed) -> Self {
+ Self {
+ // We do an additional folded multiply with the seed here for
+ // the quality hash to ensure better independence between seed
+ // and hash.
+ inner: fast::SeedableRandomState::with_seed(
+ folded_multiply(per_hasher_seed, ARBITRARY4),
+ shared_seed,
+ ),
+ }
+ }
+}
+
+impl BuildHasher for SeedableRandomState {
+ type Hasher = FoldHasher<'static>;
+
+ #[inline(always)]
+ fn build_hasher(&self) -> FoldHasher<'static> {
+ FoldHasher {
+ inner: self.inner.build_hasher(),
+ }
+ }
+}
+
+/// A [`BuildHasher`] for [`quality::FoldHasher`](FoldHasher) that always has the same fixed seed.
+///
+/// Not recommended unless you absolutely need determinism.
+#[derive(Clone, Default, Debug)]
+pub struct FixedState {
+ inner: fast::FixedState,
+}
+
+impl FixedState {
+ /// Creates a [`FixedState`] with the given per-hasher seed.
+ #[inline(always)]
+ pub const fn with_seed(per_hasher_seed: u64) -> Self {
+ Self {
+ // We do an additional folded multiply with the seed here for
+ // the quality hash to ensure better independence between seed
+ // and hash. If the seed is zero the folded multiply is zero,
+ // preserving with_seed(0) == default().
+ inner: fast::FixedState::with_seed(folded_multiply(per_hasher_seed, ARBITRARY4)),
+ }
+ }
+}
+
+impl BuildHasher for FixedState {
+ type Hasher = FoldHasher<'static>;
+
+ #[inline(always)]
+ fn build_hasher(&self) -> FoldHasher<'static> {
+ FoldHasher {
+ inner: self.inner.build_hasher(),
+ }
+ }
+}
diff --git a/external/vendor/foldhash/src/seed.rs b/external/vendor/foldhash/src/seed.rs
new file mode 100644
index 00000000..257c4451
--- /dev/null
+++ b/external/vendor/foldhash/src/seed.rs
@@ -0,0 +1,281 @@
+// These constants may end up unused depending on platform support.
+#[allow(unused)]
+use crate::{ARBITRARY1, ARBITRARY5};
+
+use super::{
+ folded_multiply, ARBITRARY10, ARBITRARY11, ARBITRARY2, ARBITRARY6, ARBITRARY7, ARBITRARY8,
+ ARBITRARY9,
+};
+
+/// Used for FixedState, and RandomState if atomics for dynamic init are unavailable.
+const FIXED_GLOBAL_SEED: SharedSeed = SharedSeed {
+ seeds: [
+ ARBITRARY6,
+ ARBITRARY7,
+ ARBITRARY8,
+ ARBITRARY9,
+ ARBITRARY10,
+ ARBITRARY11,
+ ],
+};
+
+pub(crate) fn gen_per_hasher_seed() -> u64 {
+ // We initialize the per-hasher seed with the stack pointer to ensure
+ // different threads have different seeds, with as side benefit that
+ // stack address randomization gives us further non-determinism.
+ let mut per_hasher_seed = 0;
+ let stack_ptr = core::ptr::addr_of!(per_hasher_seed) as u64;
+ per_hasher_seed = stack_ptr;
+
+ // If we have the standard library available we use a thread-local
+ // state to ensure RandomStates are different with high probability,
+ // even if the call stack is the same.
+ #[cfg(feature = "std")]
+ {
+ use std::cell::Cell;
+ thread_local! {
+ static PER_HASHER_NONDETERMINISM: Cell<u64> = const { Cell::new(0) };
+ }
+
+ PER_HASHER_NONDETERMINISM.with(|cell| {
+ let nondeterminism = cell.get();
+ per_hasher_seed = folded_multiply(per_hasher_seed, ARBITRARY1 ^ nondeterminism);
+ cell.set(per_hasher_seed);
+ })
+ };
+
+ // If we don't have the standard library we instead use a global
+ // atomic instead of a thread-local state.
+ //
+ // PER_HASHER_NONDETERMINISM is loaded and updated in a racy manner,
+ // but this doesn't matter in practice - it is impossible that two
+ // different threads have the same stack location, so they'll almost
+ // surely generate different seeds, and provide a different possible
+ // update for PER_HASHER_NONDETERMINISM. If we would use a proper
+ // fetch_add atomic update then there is a larger chance of
+ // problematic contention.
+ //
+ // We use usize instead of 64-bit atomics for best platform support.
+ #[cfg(not(feature = "std"))]
+ {
+ use core::sync::atomic::{AtomicUsize, Ordering};
+ static PER_HASHER_NONDETERMINISM: AtomicUsize = AtomicUsize::new(0);
+
+ let nondeterminism = PER_HASHER_NONDETERMINISM.load(Ordering::Relaxed) as u64;
+ per_hasher_seed = folded_multiply(per_hasher_seed, ARBITRARY1 ^ nondeterminism);
+ PER_HASHER_NONDETERMINISM.store(per_hasher_seed as usize, Ordering::Relaxed);
+ }
+
+ // One extra mixing step to ensure good random bits.
+ folded_multiply(per_hasher_seed, ARBITRARY2)
+}
+
+/// A random seed intended to be shared by many different foldhash instances.
+///
+/// This seed is consumed by [`FoldHasher::with_seed`](crate::fast::FoldHasher::with_seed),
+/// and [`SeedableRandomState::with_seed`](crate::fast::SeedableRandomState::with_seed).
+#[derive(Clone, Debug)]
+pub struct SharedSeed {
+ pub(crate) seeds: [u64; 6],
+}
+
+impl SharedSeed {
+ /// Returns the globally shared randomly initialized [`SharedSeed`] as used
+ /// by [`RandomState`](crate::fast::RandomState).
+ #[inline(always)]
+ pub fn global_random() -> &'static SharedSeed {
+ global::GlobalSeed::new().get()
+ }
+
+ /// Returns the globally shared fixed [`SharedSeed`] as used
+ /// by [`FixedState`](crate::fast::FixedState).
+ #[inline(always)]
+ pub const fn global_fixed() -> &'static SharedSeed {
+ &FIXED_GLOBAL_SEED
+ }
+
+ /// Generates a new [`SharedSeed`] from a single 64-bit seed.
+ ///
+ /// Note that this is somewhat expensive so it is suggested to re-use the
+ /// [`SharedSeed`] as much as possible, using the per-hasher seed to
+ /// differentiate between hash instances.
+ pub const fn from_u64(seed: u64) -> Self {
+ macro_rules! mix {
+ ($x: expr) => {
+ folded_multiply($x, ARBITRARY5)
+ };
+ }
+
+ let seed_a = mix!(mix!(mix!(seed)));
+ let seed_b = mix!(mix!(mix!(seed_a)));
+ let seed_c = mix!(mix!(mix!(seed_b)));
+ let seed_d = mix!(mix!(mix!(seed_c)));
+ let seed_e = mix!(mix!(mix!(seed_d)));
+ let seed_f = mix!(mix!(mix!(seed_e)));
+
+ // Zeroes form a weak-point for the multiply-mix, and zeroes tend to be
+ // a common input. So we want our global seeds that are XOR'ed with the
+ // input to always be non-zero. To also ensure there is always a good spread
+ // of bits, we give up 3 bits of entropy and simply force some bits on.
+ const FORCED_ONES: u64 = (1 << 63) | (1 << 31) | 1;
+ Self {
+ seeds: [
+ seed_a | FORCED_ONES,
+ seed_b | FORCED_ONES,
+ seed_c | FORCED_ONES,
+ seed_d | FORCED_ONES,
+ seed_e | FORCED_ONES,
+ seed_f | FORCED_ONES,
+ ],
+ }
+ }
+}
+
+#[cfg(target_has_atomic = "8")]
+mod global {
+ use super::*;
+ use core::cell::UnsafeCell;
+ use core::sync::atomic::{AtomicU8, Ordering};
+
+ fn generate_global_seed() -> SharedSeed {
+ let mix = |seed: u64, x: u64| folded_multiply(seed ^ x, ARBITRARY5);
+
+ // Use address space layout randomization as our main randomness source.
+ // This isn't great, but we don't advertise HashDoS resistance in the first
+ // place. This is a whole lot better than nothing, at near zero cost with
+ // no dependencies.
+ let mut seed = 0;
+ let stack_ptr = &seed as *const _;
+ let func_ptr = generate_global_seed;
+ let static_ptr = &GLOBAL_SEED_STORAGE as *const _;
+ seed = mix(seed, stack_ptr as usize as u64);
+ seed = mix(seed, func_ptr as usize as u64);
+ seed = mix(seed, static_ptr as usize as u64);
+
+ // If we have the standard library available, augment entropy with the
+ // current time and an address from the allocator.
+ #[cfg(feature = "std")]
+ {
+ #[cfg(not(any(
+ miri,
+ all(target_family = "wasm", target_os = "unknown"),
+ target_os = "zkvm"
+ )))]
+ if let Ok(duration) = std::time::UNIX_EPOCH.elapsed() {
+ seed = mix(seed, duration.subsec_nanos() as u64);
+ seed = mix(seed, duration.as_secs());
+ }
+
+ let box_ptr = &*Box::new(0u8) as *const _;
+ seed = mix(seed, box_ptr as usize as u64);
+ }
+
+ SharedSeed::from_u64(seed)
+ }
+
+ // Now all the below code purely exists to cache the above seed as
+ // efficiently as possible. Even if we weren't a no_std crate and had access to
+ // OnceLock, we don't want to check whether the global is set each time we
+ // hash an object, so we hand-roll a global storage where type safety allows us
+ // to assume the storage is initialized after construction.
+ struct GlobalSeedStorage {
+ state: AtomicU8,
+ seed: UnsafeCell<SharedSeed>,
+ }
+
+ const UNINIT: u8 = 0;
+ const LOCKED: u8 = 1;
+ const INIT: u8 = 2;
+
+ // SAFETY: we only mutate the UnsafeCells when state is in the thread-exclusive
+ // LOCKED state, and only read the UnsafeCells when state is in the
+ // once-achieved-eternally-preserved state INIT.
+ unsafe impl Sync for GlobalSeedStorage {}
+
+ static GLOBAL_SEED_STORAGE: GlobalSeedStorage = GlobalSeedStorage {
+ state: AtomicU8::new(UNINIT),
+ seed: UnsafeCell::new(SharedSeed { seeds: [0; 6] }),
+ };
+
+ /// An object representing an initialized global seed.
+ ///
+ /// Does not actually store the seed inside itself, it is a zero-sized type.
+ /// This prevents inflating the RandomState size and in turn HashMap's size.
+ #[derive(Copy, Clone, Debug)]
+ pub struct GlobalSeed {
+ // So we can't accidentally type GlobalSeed { } within this crate.
+ _no_accidental_unsafe_init: (),
+ }
+
+ impl GlobalSeed {
+ #[inline(always)]
+ pub fn new() -> Self {
+ if GLOBAL_SEED_STORAGE.state.load(Ordering::Acquire) != INIT {
+ Self::init_slow()
+ }
+ Self {
+ _no_accidental_unsafe_init: (),
+ }
+ }
+
+ #[cold]
+ #[inline(never)]
+ fn init_slow() {
+ // Generate seed outside of critical section.
+ let seed = generate_global_seed();
+
+ loop {
+ match GLOBAL_SEED_STORAGE.state.compare_exchange_weak(
+ UNINIT,
+ LOCKED,
+ Ordering::Acquire,
+ Ordering::Acquire,
+ ) {
+ Ok(_) => unsafe {
+ // SAFETY: we just acquired an exclusive lock.
+ *GLOBAL_SEED_STORAGE.seed.get() = seed;
+ GLOBAL_SEED_STORAGE.state.store(INIT, Ordering::Release);
+ return;
+ },
+
+ Err(INIT) => return,
+
+ // Yes, it's a spin loop. We need to support no_std (so no easy
+ // access to proper locks), this is a one-time-per-program
+ // initialization, and the critical section is only a few
+ // store instructions, so it'll be fine.
+ _ => core::hint::spin_loop(),
+ }
+ }
+ }
+
+ #[inline(always)]
+ pub fn get(self) -> &'static SharedSeed {
+ // SAFETY: our constructor ensured we are in the INIT state and thus
+ // this raw read does not race with any write.
+ unsafe { &*GLOBAL_SEED_STORAGE.seed.get() }
+ }
+ }
+}
+
+#[cfg(not(target_has_atomic = "8"))]
+mod global {
+ use super::*;
+
+ #[derive(Copy, Clone, Debug)]
+ pub struct GlobalSeed {}
+
+ impl GlobalSeed {
+ #[inline(always)]
+ pub fn new() -> Self {
+ Self {}
+ }
+
+ #[inline(always)]
+ pub fn get(self) -> &'static SharedSeed {
+ &super::FIXED_GLOBAL_SEED
+ }
+ }
+}
+
+pub(crate) use global::GlobalSeed;
diff --git a/external/vendor/gimli/.cargo-checksum.json b/external/vendor/gimli/.cargo-checksum.json
index 18b2a0a2..f0d7b132 100644
--- a/external/vendor/gimli/.cargo-checksum.json
+++ b/external/vendor/gimli/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{".cargo_vcs_info.json":"75144e5a12dd8af6ccb2cf6cd00dc2cb1b016d078e82c8c2bcca59fe6e3135bc","CHANGELOG.md":"9182d3725b6bbe5462e6375c53a946d06995a142c47572ff42c0a84b0fce2d71","Cargo.lock":"eaf93a1f1f66a5fea901c2cc69215d786a491b4497895ea047e3777089f87e38","Cargo.toml":"097214138f308115724f5045afa0c41cda85085f83f7ebcf3b78e54887906819","Cargo.toml.orig":"cc391c4017aade1bfcf997b17771ace147cd63ecf544ba586c4c1d882be0e503","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"7b63ecd5f1902af1b63729947373683c32745c16a10e8e6292e2e2dcd7e90ae0","README.md":"7c22fe8b1f9cd84c5a4078ee9f3312ee6c7f91da4b688281fe7ae22520d0f232","src/arch.rs":"64f37bf74cb82beaa467a2641be2d976e36fb505ef0bec52ca23301a14d4f5bc","src/common.rs":"18d6857c4c03b873a14a15a0e024cc8f3ecbf95226c17356a075ff96a54ac1fe","src/constants.rs":"78deeff8b53d6d615fa4728c8afa34791a6c8cd2490301a217016879723dac52","src/endianity.rs":"1f7e62ae34f540c06bedf1e7948739211556eea7dd83731a5ca52c7d687ed0fc","src/leb128.rs":"81a0ca0e8ba56e749af4588fe76179611234062f79be1e9fb8ea8a27516b372f","src/lib.rs":"8f6016f5664fcbc085d69fc957245c805fc55d425d1a848f8b25413670235d10","src/read/abbrev.rs":"f937e45d151ac5073f2c526b792e86e5ba96d3d36cb0377682a596c272be589a","src/read/addr.rs":"1b3c52e7b2a6f77ed3817e0f1d6b402e00072bd632a1654f39fb667b8e184925","src/read/aranges.rs":"4c526af254d9f6a2ee2b2fd7957b143f790854b40bed54092443f1ce75ea8c71","src/read/cfi.rs":"d93d04d81abce8fbfb8ba164c151c3c6415d7cdc6e13489939bb407ca0bcd8d6","src/read/dwarf.rs":"7b49c04cab4ff2ed68042970588aacc08318109952208af1bc958a7754a1ce76","src/read/endian_reader.rs":"6e7bf5b26719b1a5e396159387bb10666b218c10e603a4552882ec9d4d5cb8be","src/read/endian_slice.rs":"5b44661714967780b8c9f52fdaf655a53e309c38cbd3daf11bf6b1d5f6d067bb","src/read/index.rs":"42c9aae82e87cf7451d4434f68cd5d84e6bb482e51742af213a711b053633085","src/read/line.rs":"ff5e90c8df392af5814400acdc0c95282282d08554e5c9d67c554e561dcfc7d6","src/read/lists.rs":"5a4e33038ceedb48a8332a7713ee67a1be9b7a4031881a2ccb9b9259ba29356b","src/read/loclists.rs":"2c8f4c7b5823a59d1f05f86481cfb78cf6444230324f3444edbcd78f11bc679b","src/read/lookup.rs":"0cf89ba12b9d48b1fe035dd3a497730323acb9427a9457abbc2f7c58c4c71165","src/read/macros.rs":"3ad6e6387351804c4376b6c8390b7744cdef7b7afcc7e7f3c0f829e9eacfd762","src/read/mod.rs":"a18f0259c2e7f572ddc4aaa8b59136a2590bac0db1debfe7a631985ecf176f78","src/read/op.rs":"99f976309f4da7ea07aa2b09b4c26e97c8e78ba8c7b3016be22ab02869003c05","src/read/pubnames.rs":"ed752ee1a7017e6d3be42d81e4ddaaac960ef08081463a19106c9f041526d4a3","src/read/pubtypes.rs":"5e75b32c0923e827aff0bb2db456797a0e8d38ba46be992558a7990b3196bcf5","src/read/reader.rs":"502b303d33e2cb93fba54c97b487bf3f2216d645ab1c6eae8f4cad9c2e8f27e2","src/read/relocate.rs":"6844b113eb8218152e29912accc54b26bc2498e97bfe4af824472ddb69b8601c","src/read/rnglists.rs":"b376ca630f124fb92eca171bd6d80ff518d73fc33ad987d41abd399f61855aa0","src/read/str.rs":"4dd98cc8d93ce6f06c194eae034bfe0a3d45a9f06fbeaca38d8f29a9c7cf15a5","src/read/unit.rs":"f2fc760be1337a6a0351e9921e6e2e6290b17b6cfada6db96e0ebb3fdee68c90","src/read/util.rs":"f15a2bfa2d46e90eeb72b29de5ec3a7f69c871fbbde8bcbc2b0192e4802176f2","src/read/value.rs":"1c0db3759c65ffda3520fcecd36118367dfb46845035d5d97fcba2f0ea780380","src/test_util.rs":"291eefa6b51c6d934ba2f4a4c9bc7c403046fc1cccf4d43487820f0154bb89e2","src/write/abbrev.rs":"fa02163389e92e804d139cf84f833ab6af932083f0eb2d74464b4a70bd3237ff","src/write/cfi.rs":"22e93c21552d8d6329f5d9ea1c515fbe3820a23e89fff1b38d9478fa2bbab723","src/write/dwarf.rs":"8a1a0893e31134ad68993994594f3024ad0c8af7c1188b29e0ffc26b42edef21","src/write/endian_vec.rs":"1d5811986648816a677580b22630f5059757a381487d73e9adbb3008c9ae0c58","src/write/line.rs":"bb18a855464de995f8727c46bba92018ce7eb18463ae9d6b1a9cb4adab502e15","src/write/loc.rs":"5d304049503286df914bb87c521aa5d042af650dd7d64e28c003fc9421581b8d","src/write/mod.rs":"7ebf0af9d4b558e1c24c7e6b84ae9c75b7e75c83d09a03ef8608973052d31913","src/write/op.rs":"13e59affa4e18ee44f0164115160209f6ccb3bd7e45ad4ebfc74eccf3ea132cd","src/write/range.rs":"b92959825e33984df2bb26bc562413027638f013920701df1ceb050a2ea43c46","src/write/relocate.rs":"117b97eae3ca2aad9d5b242652ebbdb333440e877be37873a7ef5ba1a39ced43","src/write/section.rs":"ea0e7e77650ef4c8972b409ef945c98bfa771712b6887591140d3e7baca9c599","src/write/str.rs":"4850cc2fee55980f9cbb6b4169f9861ab9d05c2b28a85c2b790480b83a66f514","src/write/unit.rs":"95805aba9163468615601c9851980b9812ea1d19dc89f1985ce781b1b897e5ac","src/write/writer.rs":"c7696a3c2cff032ad6ada696132e4bbef92c4af76c7370c9ce82dedf2cf3716b"},"package":"93563d740bc9ef04104f9ed6f86f1e3275c2cdafb95664e26584b9ca807a8ffe"}
\ No newline at end of file
+{"files":{".cargo_vcs_info.json":"bae9b5923acc9a419e4bc7060b19314aac48dc12f7ba31b7b0cb42edae19eb80","CHANGELOG.md":"29c98006f14bd25b1a6593518da388be81ddb7f0ca89413836f6ae296e4c18ea","Cargo.lock":"ec7efa297c5a89fa7849f276dfe5f64bede52a266660fa77608b100e6caf2854","Cargo.toml":"2b0d60ffc8705bf1de535e36ffa090511284747388d84056d5d96a5acbb0704a","Cargo.toml.orig":"96b821d1b85daa2afbbdd21c1260dbbc5dce9ee72e53eff1a8bfc11ee12c8a01","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"7b63ecd5f1902af1b63729947373683c32745c16a10e8e6292e2e2dcd7e90ae0","README.md":"79fc2aa247ebf7b8a3562632aa2bfc466cd655a0886717d47e4bc693166e9745","src/arch.rs":"332ca34941a35a73eabfdcb0071709ae4ec7a745a9f5cbe539bb6438904628c6","src/common.rs":"18d6857c4c03b873a14a15a0e024cc8f3ecbf95226c17356a075ff96a54ac1fe","src/constants.rs":"40d3e2684774dbffd0f27cdfa0ee6f378d04dc74b2adb821fa7a68acd0772313","src/endianity.rs":"1f7e62ae34f540c06bedf1e7948739211556eea7dd83731a5ca52c7d687ed0fc","src/leb128.rs":"81a0ca0e8ba56e749af4588fe76179611234062f79be1e9fb8ea8a27516b372f","src/lib.rs":"8f6016f5664fcbc085d69fc957245c805fc55d425d1a848f8b25413670235d10","src/read/abbrev.rs":"a8e35c70c66ee05ee38fed73ee951caec055a6cacdd017cb5e077d24e89d9aa3","src/read/addr.rs":"1b3c52e7b2a6f77ed3817e0f1d6b402e00072bd632a1654f39fb667b8e184925","src/read/aranges.rs":"2cac0260f26001d3f674b45cf40540ccbb9a5f3474a002c2f49cc62f826faedb","src/read/cfi.rs":"d93d04d81abce8fbfb8ba164c151c3c6415d7cdc6e13489939bb407ca0bcd8d6","src/read/dwarf.rs":"7b49c04cab4ff2ed68042970588aacc08318109952208af1bc958a7754a1ce76","src/read/endian_reader.rs":"6e7bf5b26719b1a5e396159387bb10666b218c10e603a4552882ec9d4d5cb8be","src/read/endian_slice.rs":"5b44661714967780b8c9f52fdaf655a53e309c38cbd3daf11bf6b1d5f6d067bb","src/read/index.rs":"42c9aae82e87cf7451d4434f68cd5d84e6bb482e51742af213a711b053633085","src/read/line.rs":"1014bb445d478111fe030702d1cbebb11235660c71cbed1bf0e3af77514fdb2e","src/read/lists.rs":"5a4e33038ceedb48a8332a7713ee67a1be9b7a4031881a2ccb9b9259ba29356b","src/read/loclists.rs":"6b3e0faea833c264794914189ac301f68bca96c66ad4f7bebae3f2252fd86621","src/read/lookup.rs":"0cf89ba12b9d48b1fe035dd3a497730323acb9427a9457abbc2f7c58c4c71165","src/read/macros.rs":"3ad6e6387351804c4376b6c8390b7744cdef7b7afcc7e7f3c0f829e9eacfd762","src/read/mod.rs":"0b3da9dcbca295da73bd8182a98511fa6ea6a60a26f33e4615c0dcf34cfcb0dd","src/read/op.rs":"99f976309f4da7ea07aa2b09b4c26e97c8e78ba8c7b3016be22ab02869003c05","src/read/pubnames.rs":"ed752ee1a7017e6d3be42d81e4ddaaac960ef08081463a19106c9f041526d4a3","src/read/pubtypes.rs":"5e75b32c0923e827aff0bb2db456797a0e8d38ba46be992558a7990b3196bcf5","src/read/reader.rs":"c9d5f303d4799b923bb24cc995c43e96725dc7d8bdd179af2dc420c8801254e4","src/read/relocate.rs":"6844b113eb8218152e29912accc54b26bc2498e97bfe4af824472ddb69b8601c","src/read/rnglists.rs":"8eb44055c8d782152503ff62fdaa165c947b2d9fc950e20e03880f1f1801808d","src/read/str.rs":"4dd98cc8d93ce6f06c194eae034bfe0a3d45a9f06fbeaca38d8f29a9c7cf15a5","src/read/unit.rs":"f2fc760be1337a6a0351e9921e6e2e6290b17b6cfada6db96e0ebb3fdee68c90","src/read/util.rs":"f15a2bfa2d46e90eeb72b29de5ec3a7f69c871fbbde8bcbc2b0192e4802176f2","src/read/value.rs":"1c0db3759c65ffda3520fcecd36118367dfb46845035d5d97fcba2f0ea780380","src/test_util.rs":"291eefa6b51c6d934ba2f4a4c9bc7c403046fc1cccf4d43487820f0154bb89e2","src/write/abbrev.rs":"fa02163389e92e804d139cf84f833ab6af932083f0eb2d74464b4a70bd3237ff","src/write/cfi.rs":"964321050337db6a9ff160e048806e9a60e1ba12ecc1f031b7845ec6d5f31159","src/write/dwarf.rs":"75e18ceb108828d987a406bbd51fa55e3f44a4e9e540745539938fe7f6331791","src/write/endian_vec.rs":"1d5811986648816a677580b22630f5059757a381487d73e9adbb3008c9ae0c58","src/write/line.rs":"47f46b86c57786d19efae0d9077fe83ee9dd6915d66a7f3bccbf6686221b7665","src/write/loc.rs":"106544af89213151490d1f5314f9deb13a3527007c1bb1642057213c6b4b178b","src/write/mod.rs":"7ebf0af9d4b558e1c24c7e6b84ae9c75b7e75c83d09a03ef8608973052d31913","src/write/op.rs":"a9bda7a0137b7d8dc96c259cca6559500d3da55227dc0db398d13133395cbdb7","src/write/range.rs":"b92959825e33984df2bb26bc562413027638f013920701df1ceb050a2ea43c46","src/write/relocate.rs":"117b97eae3ca2aad9d5b242652ebbdb333440e877be37873a7ef5ba1a39ced43","src/write/section.rs":"ea0e7e77650ef4c8972b409ef945c98bfa771712b6887591140d3e7baca9c599","src/write/str.rs":"8fac921da9a17b2428cc3982886a2e4c7ab9873574ec698b3a3b0c45bd97af98","src/write/unit.rs":"8284dd27a5bfe13486c64fec65d87f7975c1ef4b7704308b3bef55e2adfdc024","src/write/writer.rs":"c7696a3c2cff032ad6ada696132e4bbef92c4af76c7370c9ce82dedf2cf3716b"},"package":"e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"}
\ No newline at end of file
diff --git a/external/vendor/gimli/.cargo_vcs_info.json b/external/vendor/gimli/.cargo_vcs_info.json
index 36717970..1f7dc465 100644
--- a/external/vendor/gimli/.cargo_vcs_info.json
+++ b/external/vendor/gimli/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "71720829ef6f61ea5b0d4e1b9315534d2c8b9264"
+ "sha1": "8bc8e622fcb9be20fc9f03c96bc6335d936b869d"
},
"path_in_vcs": ""
}
\ No newline at end of file
diff --git a/external/vendor/gimli/CHANGELOG.md b/external/vendor/gimli/CHANGELOG.md
index 904ad20c..a7a2b7ef 100644
--- a/external/vendor/gimli/CHANGELOG.md
+++ b/external/vendor/gimli/CHANGELOG.md
@@ -2,6 +2,59 @@
--------------------------------------------------------------------------------
+## 0.32.3
+
+Released 2025/09/13.
+
+### Changed
+
+* Changed parsing to accept -2 for tombstone values in `.debug_line`,
+ `.debug_aranges`, `.debug_loclists`, and `.debug_rnglists`.
+ [#791](https://github.com/gimli-rs/gimli/pull/791)
+
+### Added
+
+* Added more x86-64 register definitions.
+ [#794](https://github.com/gimli-rs/gimli/pull/794)
+
+--------------------------------------------------------------------------------
+
+## 0.32.2
+
+Released 2025/08/26.
+
+### Changed
+
+* Removed `PartialEq<Debug*Offset>` implementations for `UnitSectionOffset`.
+ These were an unintended breaking change.
+ [#789](https://github.com/gimli-rs/gimli/pull/789)
+
+--------------------------------------------------------------------------------
+
+## 0.32.1
+
+Released 2025/08/22.
+
+### Changed
+
+* Improved handling of invalid DIE references during writing.
+ [#777](https://github.com/gimli-rs/gimli/pull/777)
+ [#779](https://github.com/gimli-rs/gimli/pull/779)
+
+* Changed abbreviation parsing to allow a missing null terminator.
+ [#781](https://github.com/gimli-rs/gimli/pull/781)
+
+* Changed `write::LineProgram` to support any form for file source code.
+ [#784](https://github.com/gimli-rs/gimli/pull/784)
+ [#786](https://github.com/gimli-rs/gimli/pull/786)
+
+### Added
+
+* Added DWARF version 1.1 constant definitions.
+ [#775](https://github.com/gimli-rs/gimli/pull/775)
+
+--------------------------------------------------------------------------------
+
## 0.32.0
Released 2025/06/11.
diff --git a/external/vendor/gimli/Cargo.lock b/external/vendor/gimli/Cargo.lock
index b26d3bc3..d81e77c0 100644
--- a/external/vendor/gimli/Cargo.lock
+++ b/external/vendor/gimli/Cargo.lock
@@ -22,7 +22,7 @@ checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
[[package]]
name = "gimli"
-version = "0.32.0"
+version = "0.32.3"
dependencies = [
"fallible-iterator",
"indexmap",
diff --git a/external/vendor/gimli/Cargo.toml b/external/vendor/gimli/Cargo.toml
index 5e05f099..2041bdb9 100644
--- a/external/vendor/gimli/Cargo.toml
+++ b/external/vendor/gimli/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2018"
rust-version = "1.60"
name = "gimli"
-version = "0.32.0"
+version = "0.32.3"
build = false
include = [
"/CHANGELOG.md",
diff --git a/external/vendor/gimli/Cargo.toml.orig b/external/vendor/gimli/Cargo.toml.orig
index d56c63c7..6baee9c6 100644
--- a/external/vendor/gimli/Cargo.toml.orig
+++ b/external/vendor/gimli/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "gimli"
-version = "0.32.0"
+version = "0.32.3"
categories = ["development-tools::debugging", "development-tools::profiling", "parser-implementations"]
description = "A library for reading and writing the DWARF debugging format."
documentation = "https://docs.rs/gimli"
diff --git a/external/vendor/gimli/README.md b/external/vendor/gimli/README.md
index 4a7757ce..03bf6b8c 100644
--- a/external/vendor/gimli/README.md
+++ b/external/vendor/gimli/README.md
@@ -26,11 +26,9 @@
## Install
-Add this to your `Cargo.toml`:
-
-```toml
-[dependencies]
-gimli = "0.32.0"
+To add a `gimli` dependency to your `Cargo.toml`, run:
+```console
+$ cargo add gimli
```
The minimum supported Rust version is:
@@ -48,6 +46,11 @@ The minimum supported Rust version is:
* [A simple `.debug_line` parser](./crates/examples/src/bin/simple_line.rs)
+ * [A simple DWARF writer](./crates/examples/src/bin/simple_write.rs)
+
+ * [A simple DWARF converter](./crates/examples/src/bin/simple_convert.rs)
+ to read DWARF sections then write them back out again.
+
* [A `dwarfdump` clone](./crates/examples/src/bin/dwarfdump.rs)
* [An `addr2line` clone](https://github.com/gimli-rs/addr2line)
diff --git a/external/vendor/gimli/src/arch.rs b/external/vendor/gimli/src/arch.rs
index 548c3447..a005a16f 100644
--- a/external/vendor/gimli/src/arch.rs
+++ b/external/vendor/gimli/src/arch.rs
@@ -765,7 +765,7 @@ aliases {
/// Intel i386 architecture specific definitions.
///
-/// See Intel386 psABi version 1.1 at the [X86 psABI wiki](https://github.com/hjl-tools/x86-psABI/wiki/X86-psABI).
+/// See section 2.4.2 of the [i386 psABI](https://gitlab.com/x86-psABIs/i386-ABI).
#[derive(Debug, Clone, Copy)]
pub struct X86;
@@ -827,7 +827,7 @@ registers!(X86, {
/// AMD64 architecture specific definitions.
///
-/// See x86-64 psABI version 1.0 at the [X86 psABI wiki](https://github.com/hjl-tools/x86-psABI/wiki/X86-psABI).
+/// See section 3.6.2 of the [x86-64 psABI](https://gitlab.com/x86-psABIs/x86-64-ABI).
#[derive(Debug, Clone, Copy)]
pub struct X86_64;
@@ -931,6 +931,33 @@ registers!(X86_64, {
K5 = (123, "k5"),
K6 = (124, "k6"),
K7 = (125, "k7"),
+
+ R16 = (130, "r16"),
+ R17 = (131, "r17"),
+ R18 = (132, "r18"),
+ R19 = (133, "r19"),
+ R20 = (134, "r20"),
+ R21 = (135, "r21"),
+ R22 = (136, "r22"),
+ R23 = (137, "r23"),
+ R24 = (138, "r24"),
+ R25 = (139, "r25"),
+ R26 = (140, "r26"),
+ R27 = (141, "r27"),
+ R28 = (142, "r28"),
+ R29 = (143, "r29"),
+ R30 = (144, "r30"),
+ R31 = (145, "r31"),
+
+ TMM0 = (146, "tmm0"),
+ TMM1 = (147, "tmm1"),
+ TMM2 = (148, "tmm2"),
+ TMM3 = (149, "tmm3"),
+ TMM4 = (150, "tmm4"),
+ TMM5 = (151, "tmm5"),
+ TMM6 = (152, "tmm6"),
+ TMM7 = (153, "tmm7"),
+ TILECFG = (154, "tilecfg"),
});
/// PowerPC 64bit
diff --git a/external/vendor/gimli/src/constants.rs b/external/vendor/gimli/src/constants.rs
index 211a7ecd..4121033e 100644
--- a/external/vendor/gimli/src/constants.rs
+++ b/external/vendor/gimli/src/constants.rs
@@ -209,6 +209,13 @@ dw!(
DwTag(u16) {
DW_TAG_null = 0x00,
+// DWARF 1 only, obsolete in DWARF 2+.
+ DW_TAG_global_subroutine = 0x06,
+ DW_TAG_global_variable = 0x07,
+ DW_TAG_local_variable = 0x0c,
+ DW_TAG_subroutine = 0x14,
+
+// DWARF 1.
DW_TAG_array_type = 0x01,
DW_TAG_class_type = 0x02,
DW_TAG_entry_point = 0x03,
@@ -237,6 +244,8 @@ DwTag(u16) {
DW_TAG_set_type = 0x20,
DW_TAG_subrange_type = 0x21,
DW_TAG_with_stmt = 0x22,
+
+// DWARF 2.
DW_TAG_access_declaration = 0x23,
DW_TAG_base_type = 0x24,
DW_TAG_catch_block = 0x25,
@@ -354,6 +363,26 @@ dw!(
DwAt(u16) {
DW_AT_null = 0x00,
+// DWARF 1 only, obsolete in DWARF 2+.
+ DW_AT_fund_type = 0x05,
+ DW_AT_mod_fund_type = 0x06,
+ DW_AT_user_def_type = 0x07,
+ DW_AT_mod_u_d_type = 0x08,
+ DW_AT_subscr_data = 0x0a,
+ DW_AT_element_list = 0x0f,
+ DW_AT_member = 0x14,
+ DW_AT_friends = 0x1f,
+ DW_AT_program = 0x23,
+ DW_AT_private = 0x24,
+ DW_AT_protected = 0x26,
+ DW_AT_public = 0x28,
+ DW_AT_pure_virtual = 0x29,
+ DW_AT_virtual = 0x30,
+
+// Moved to 0x47 in DWARF 2+.
+ DW_AT_specification_v1 = 0x2b,
+
+// DWARF 1.
DW_AT_sibling = 0x01,
DW_AT_location = 0x02,
DW_AT_name = 0x03,
@@ -384,6 +413,8 @@ DwAt(u16) {
DW_AT_start_scope = 0x2c,
DW_AT_bit_stride = 0x2e,
DW_AT_upper_bound = 0x2f,
+
+// DWARF 2.
DW_AT_abstract_origin = 0x31,
DW_AT_accessibility = 0x32,
DW_AT_address_class = 0x33,
@@ -664,6 +695,10 @@ dw!(
DwForm(u16) {
DW_FORM_null = 0x00,
+// DWARF 1 only, obsolete in DWARF 2+.
+ DW_FORM_ref = 0x02,
+
+// DWARF 1.
DW_FORM_addr = 0x01,
DW_FORM_block2 = 0x03,
DW_FORM_block4 = 0x04,
@@ -671,6 +706,8 @@ DwForm(u16) {
DW_FORM_data4 = 0x06,
DW_FORM_data8 = 0x07,
DW_FORM_string = 0x08,
+
+// DWARF 2.
DW_FORM_block = 0x09,
DW_FORM_block1 = 0x0a,
DW_FORM_data1 = 0x0b,
diff --git a/external/vendor/gimli/src/read/abbrev.rs b/external/vendor/gimli/src/read/abbrev.rs
index b9931b2e..002cc913 100644
--- a/external/vendor/gimli/src/read/abbrev.rs
+++ b/external/vendor/gimli/src/read/abbrev.rs
@@ -367,6 +367,12 @@ impl Abbreviation {
/// Parse an abbreviation. Return `None` for the null abbreviation, `Some`
/// for an actual abbreviation.
fn parse<R: Reader>(input: &mut R) -> Result<Option<Abbreviation>> {
+ if input.is_empty() {
+ // Try to recover from missing null terminator.
+ // If the input was actually truncated, then we'll return an error later
+ // when trying to find the missing abbreviation.
+ return Ok(None);
+ }
let code = input.read_uleb128()?;
if code == 0 {
return Ok(None);
diff --git a/external/vendor/gimli/src/read/aranges.rs b/external/vendor/gimli/src/read/aranges.rs
index 2829f261..e8cfbf3d 100644
--- a/external/vendor/gimli/src/read/aranges.rs
+++ b/external/vendor/gimli/src/read/aranges.rs
@@ -289,12 +289,11 @@ impl<R: Reader> ArangeEntryIter<R> {
/// The raw range should have been obtained from `next_raw`.
#[doc(hidden)]
pub fn convert_raw(&self, mut entry: ArangeEntry) -> Result<Option<ArangeEntry>> {
- // Skip tombstone entries.
- // DWARF specifies a tombstone value of -1, but many linkers use 0.
- // However, 0 may be a valid address, so the caller must handle that case.
+ // Skip negative tombstone entries.
+ // Callers must handle tombstones of 0 or greater themselves
+ // because we have no way of knowing if they are valid or not.
let address_size = self.encoding.address_size;
- let tombstone_address = !0 >> (64 - self.encoding.address_size * 8);
- if entry.range.begin == tombstone_address {
+ if entry.range.begin >= u64::min_tombstone(address_size) {
return Ok(None);
}
diff --git a/external/vendor/gimli/src/read/line.rs b/external/vendor/gimli/src/read/line.rs
index 3fcf2efd..d2b6c667 100644
--- a/external/vendor/gimli/src/read/line.rs
+++ b/external/vendor/gimli/src/read/line.rs
@@ -835,8 +835,8 @@ impl LineRow {
// so we treat all lower addresses as tombstones instead of just 0.
// This works because DWARF specifies that addresses are monotonically increasing
// within a sequence; the alternative is to return an error.
- let tombstone_address = !0 >> (64 - program.header().encoding.address_size * 8);
- self.tombstone = address < self.address || address == tombstone_address;
+ self.tombstone = address < self.address
+ || address >= u64::min_tombstone(program.header().encoding.address_size);
if !self.tombstone {
self.address = address;
self.op_index.0 = 0;
diff --git a/external/vendor/gimli/src/read/loclists.rs b/external/vendor/gimli/src/read/loclists.rs
index 26450186..0efca029 100644
--- a/external/vendor/gimli/src/read/loclists.rs
+++ b/external/vendor/gimli/src/read/loclists.rs
@@ -594,12 +594,6 @@ impl<R: Reader> LocListIter<R> {
raw_loc: RawLocListEntry<R>,
) -> Result<Option<LocationListEntry<R>>> {
let address_size = self.raw.encoding.address_size;
- let mask = u64::ones_sized(address_size);
- let tombstone = if self.raw.encoding.version <= 4 {
- mask - 1
- } else {
- mask
- };
let (range, data) = match raw_loc {
RawLocListEntry::BaseAddress { addr } => {
@@ -634,11 +628,11 @@ impl<R: Reader> LocListIter<R> {
RawLocListEntry::AddressOrOffsetPair { begin, end, data }
| RawLocListEntry::OffsetPair { begin, end, data } => {
// Skip tombstone entries (see below).
- if self.base_address == tombstone {
+ if self.base_address >= u64::min_tombstone(address_size) {
return Ok(None);
}
let mut range = Range { begin, end };
- range.add_base_address(self.base_address, self.raw.encoding.address_size);
+ range.add_base_address(self.base_address, address_size);
(range, data)
}
RawLocListEntry::StartEnd { begin, end, data } => (Range { begin, end }, data),
@@ -662,7 +656,7 @@ impl<R: Reader> LocListIter<R> {
//
// In addition to skipping tombstone entries, we also skip invalid entries
// where `begin` is greater than `end`. This can occur due to compiler bugs.
- if range.begin == tombstone || range.begin >= range.end {
+ if range.begin >= u64::min_tombstone(address_size) || range.begin >= range.end {
return Ok(None);
}
diff --git a/external/vendor/gimli/src/read/mod.rs b/external/vendor/gimli/src/read/mod.rs
index 1fbfd87a..0aaa7664 100644
--- a/external/vendor/gimli/src/read/mod.rs
+++ b/external/vendor/gimli/src/read/mod.rs
@@ -41,7 +41,9 @@
//!
//! Full example programs:
//!
-//! * [A simple parser](https://github.com/gimli-rs/gimli/blob/master/crates/examples/src/bin/simple.rs)
+//! * [A simple `.debug_info` parser](https://github.com/gimli-rs/gimli/blob/master/crates/examples/src/bin/simple.rs)
+//!
+//! * [A simple `.debug_line` parser](https://github.com/gimli-rs/gimli/blob/master/crates/examples/src/bin/simple_line.rs)
//!
//! * [A `dwarfdump`
//! clone](https://github.com/gimli-rs/gimli/blob/master/crates/examples/src/bin/dwarfdump.rs)
diff --git a/external/vendor/gimli/src/read/reader.rs b/external/vendor/gimli/src/read/reader.rs
index b1654feb..1e3148f8 100644
--- a/external/vendor/gimli/src/read/reader.rs
+++ b/external/vendor/gimli/src/read/reader.rs
@@ -203,8 +203,30 @@ pub(crate) trait ReaderAddress: Sized {
/// that the length is a negative value.
fn wrapping_add_sized(self, length: u64, size: u8) -> Self;
+ /// The all-zeros value of an address.
+ fn zeros() -> Self;
+
/// The all-ones value of an address of the given size.
fn ones_sized(size: u8) -> Self;
+
+ /// Return the minimum value for a tombstone address.
+ ///
+ /// A variety of values may be used as tombstones in DWARF data. DWARF 6 specifies a
+ /// tombstone value of -1, and this is compatible with most sections in earlier DWARF
+ /// versions. However, for .debug_loc and .debug_ranges in DWARF 4 and earlier, the
+ /// tombstone value is -2, because -1 already has a special meaning. -2 has also been
+ /// seen in .debug_line, possibly from a proprietary fork of lld.
+ ///
+ /// So this function returns -2 (cast to an unsigned value), and callers can consider
+ /// addresses greater than or equal to this value to be tombstones.
+ ///
+ /// Prior to the use of -1 or -2 for tombstones, it was common to use 0 or 1.
+ /// Additionally, gold may leave the relocation addend in place. These values are not
+ /// handled by this function, so callers will need to handle them separately if they
+ /// want to.
+ fn min_tombstone(size: u8) -> Self {
+ Self::zeros().wrapping_add_sized(-2i64 as u64, size)
+ }
}
impl ReaderAddress for u64 {
@@ -224,6 +246,11 @@ impl ReaderAddress for u64 {
self.wrapping_add(length) & mask
}
+ #[inline]
+ fn zeros() -> Self {
+ 0
+ }
+
#[inline]
fn ones_sized(size: u8) -> Self {
!0 >> (64 - size * 8)
@@ -552,3 +579,16 @@ pub trait Reader: Debug + Clone {
.and_then(Self::Offset::from_u64)
}
}
+
+#[cfg(test)]
+mod test {
+ use super::*;
+
+ #[test]
+ fn test_min_tombstone() {
+ assert_eq!(u64::min_tombstone(1), 0xfe);
+ assert_eq!(u64::min_tombstone(2), 0xfffe);
+ assert_eq!(u64::min_tombstone(4), 0xffff_fffe);
+ assert_eq!(u64::min_tombstone(8), 0xffff_ffff_ffff_fffe);
+ }
+}
diff --git a/external/vendor/gimli/src/read/rnglists.rs b/external/vendor/gimli/src/read/rnglists.rs
index 4b979555..dba8019c 100644
--- a/external/vendor/gimli/src/read/rnglists.rs
+++ b/external/vendor/gimli/src/read/rnglists.rs
@@ -528,12 +528,6 @@ impl<R: Reader> RngListIter<R> {
#[doc(hidden)]
pub fn convert_raw(&mut self, raw_range: RawRngListEntry<R::Offset>) -> Result<Option<Range>> {
let address_size = self.raw.encoding.address_size;
- let mask = u64::ones_sized(address_size);
- let tombstone = if self.raw.encoding.version <= 4 {
- mask - 1
- } else {
- mask
- };
let range = match raw_range {
RawRngListEntry::BaseAddress { addr } => {
@@ -557,11 +551,11 @@ impl<R: Reader> RngListIter<R> {
RawRngListEntry::AddressOrOffsetPair { begin, end }
| RawRngListEntry::OffsetPair { begin, end } => {
// Skip tombstone entries (see below).
- if self.base_address == tombstone {
+ if self.base_address >= u64::min_tombstone(address_size) {
return Ok(None);
}
let mut range = Range { begin, end };
- range.add_base_address(self.base_address, self.raw.encoding.address_size);
+ range.add_base_address(self.base_address, address_size);
range
}
RawRngListEntry::StartEnd { begin, end } => Range { begin, end },
@@ -581,7 +575,7 @@ impl<R: Reader> RngListIter<R> {
//
// In addition to skipping tombstone entries, we also skip invalid entries
// where `begin` is greater than `end`. This can occur due to compiler bugs.
- if range.begin == tombstone || range.begin >= range.end {
+ if range.begin >= u64::min_tombstone(address_size) || range.begin >= range.end {
return Ok(None);
}
diff --git a/external/vendor/gimli/src/write/cfi.rs b/external/vendor/gimli/src/write/cfi.rs
index 8d0a5205..8ef683f2 100644
--- a/external/vendor/gimli/src/write/cfi.rs
+++ b/external/vendor/gimli/src/write/cfi.rs
@@ -455,7 +455,7 @@ impl CallFrameInstruction {
}
CallFrameInstruction::CfaExpression(ref expression) => {
w.write_u8(constants::DW_CFA_def_cfa_expression.0)?;
- w.write_uleb128(expression.size(encoding, None) as u64)?;
+ w.write_uleb128(expression.size(encoding, None)? as u64)?;
expression.write(w, None, encoding, None)?;
}
CallFrameInstruction::Restore(register) => {
@@ -509,13 +509,13 @@ impl CallFrameInstruction {
CallFrameInstruction::Expression(register, ref expression) => {
w.write_u8(constants::DW_CFA_expression.0)?;
w.write_uleb128(register.0.into())?;
- w.write_uleb128(expression.size(encoding, None) as u64)?;
+ w.write_uleb128(expression.size(encoding, None)? as u64)?;
expression.write(w, None, encoding, None)?;
}
CallFrameInstruction::ValExpression(register, ref expression) => {
w.write_u8(constants::DW_CFA_val_expression.0)?;
w.write_uleb128(register.0.into())?;
- w.write_uleb128(expression.size(encoding, None) as u64)?;
+ w.write_uleb128(expression.size(encoding, None)? as u64)?;
expression.write(w, None, encoding, None)?;
}
CallFrameInstruction::RememberState => {
diff --git a/external/vendor/gimli/src/write/dwarf.rs b/external/vendor/gimli/src/write/dwarf.rs
index ea507126..59c2a6d9 100644
--- a/external/vendor/gimli/src/write/dwarf.rs
+++ b/external/vendor/gimli/src/write/dwarf.rs
@@ -2,8 +2,8 @@ use alloc::vec::Vec;
use crate::common::Encoding;
use crate::write::{
- AbbreviationTable, LineProgram, LineStringTable, Result, Sections, StringTable, Unit,
- UnitTable, Writer,
+ AbbreviationTable, LineProgram, LineString, LineStringTable, Result, Sections, StringTable,
+ Unit, UnitTable, Writer,
};
/// Writable DWARF information for more than one unit.
@@ -48,6 +48,11 @@ impl Dwarf {
}
Ok(())
}
+
+ /// Get a reference to the data for a line string.
+ pub fn get_line_string<'a>(&'a self, string: &'a LineString) -> &'a [u8] {
+ string.get(&self.strings, &self.line_strings)
+ }
}
/// Writable DWARF information for a single unit.
@@ -102,6 +107,11 @@ impl DwarfUnit {
abbrevs.write(&mut sections.debug_abbrev)?;
Ok(())
}
+
+ /// Get a reference to the data for a line string.
+ pub fn get_line_string<'a>(&'a self, string: &'a LineString) -> &'a [u8] {
+ string.get(&self.strings, &self.line_strings)
+ }
}
#[cfg(feature = "read")]
diff --git a/external/vendor/gimli/src/write/line.rs b/external/vendor/gimli/src/write/line.rs
index df077a3c..bc180235 100644
--- a/external/vendor/gimli/src/write/line.rs
+++ b/external/vendor/gimli/src/write/line.rs
@@ -7,7 +7,7 @@ use crate::constants;
use crate::leb128;
use crate::write::{
Address, DebugLineStrOffsets, DebugStrOffsets, Error, LineStringId, LineStringTable, Result,
- Section, StringId, Writer,
+ Section, StringId, StringTable, Writer,
};
/// The number assigned to the first special opcode.
@@ -629,9 +629,28 @@ impl LineProgram {
w.write_uleb128(u64::from(constants::DW_LNCT_MD5.0))?;
w.write_uleb128(constants::DW_FORM_data16.0.into())?;
}
+ let file_source_form = self
+ .files
+ .iter()
+ .find_map(|file| file.1.source.as_ref().map(LineString::form))
+ .unwrap_or(constants::DW_FORM_string);
+ // Create a string to use for files with no source.
+ // Note: An empty DW_LNCT_LLVM_source is interpreted as missing
+ // source code. Included source code should always be
+ // terminated by a "\n" line ending.
+ let file_source_empty = match file_source_form {
+ // If any file source is set, then `get_empty` will succeed.
+ // If all are missing then `file_source_form` will be `DW_FORM_string`.
+ constants::DW_FORM_line_strp => debug_line_str_offsets
+ .get_empty()
+ .map(LineString::LineStringRef),
+ constants::DW_FORM_strp => debug_str_offsets.get_empty().map(LineString::StringRef),
+ _ => None,
+ }
+ .unwrap_or(LineString::String(Vec::new()));
if self.file_has_source {
w.write_uleb128(u64::from(constants::DW_LNCT_LLVM_source.0))?;
- w.write_uleb128(constants::DW_FORM_string.0.into())?;
+ w.write_uleb128(file_source_form.0.into())?;
}
// File name entries.
@@ -655,14 +674,10 @@ impl LineProgram {
w.write(&info.md5)?;
}
if self.file_has_source {
- // Note: An empty DW_LNCT_LLVM_source is interpreted as missing
- // source code. Included source code should always be
- // terminated by a "\n" line ending.
- let empty_str = LineString::String(Vec::new());
- let source = info.source.as_ref().unwrap_or(&empty_str);
+ let source = info.source.as_ref().unwrap_or(&file_source_empty);
source.write(
w,
- constants::DW_FORM_string,
+ file_source_form,
self.encoding,
debug_line_str_offsets,
debug_str_offsets,
@@ -870,6 +885,19 @@ impl LineString {
}
}
+ /// Get a reference to the string data.
+ pub fn get<'a>(
+ &'a self,
+ strings: &'a StringTable,
+ line_strings: &'a LineStringTable,
+ ) -> &'a [u8] {
+ match self {
+ LineString::String(val) => val,
+ LineString::StringRef(val) => strings.get(*val),
+ LineString::LineStringRef(val) => line_strings.get(*val),
+ }
+ }
+
fn form(&self) -> constants::DwForm {
match *self {
LineString::String(..) => constants::DW_FORM_string,
@@ -996,10 +1024,6 @@ pub struct FileInfo {
/// Optionally some embedded sourcecode.
///
/// Only used if version >= 5 and `LineProgram::file_has_source` is `true`.
- ///
- /// NOTE: This currently only supports the `LineString::String` variant,
- /// since we're encoding the string with `DW_FORM_string`.
- /// Other variants will result in an `LineStringFormMismatch` error.
pub source: Option<LineString>,
}
@@ -2059,4 +2083,83 @@ mod tests {
}
}
}
+
+ #[test]
+ fn test_file_source() {
+ let version = 5;
+
+ let source1 = "source1";
+
+ for &address_size in &[4, 8] {
+ for &format in &[Format::Dwarf32, Format::Dwarf64] {
+ let encoding = Encoding {
+ format,
+ version,
+ address_size,
+ };
+
+ let sources: &mut [&mut dyn Fn(&mut Dwarf) -> LineString] = &mut [
+ &mut |_dwarf| LineString::String(source1.as_bytes().to_vec()),
+ &mut |dwarf| LineString::StringRef(dwarf.strings.add(source1)),
+ &mut |dwarf| LineString::LineStringRef(dwarf.line_strings.add(source1)),
+ ];
+
+ for source in sources {
+ let mut dwarf = Dwarf::new();
+ let source = Some(source(&mut dwarf));
+
+ let mut program = LineProgram::new(
+ encoding,
+ LineEncoding::default(),
+ LineString::String(b"dir".to_vec()),
+ None,
+ LineString::String(b"file".to_vec()),
+ Some(FileInfo {
+ timestamp: 0,
+ size: 0,
+ md5: [0; 16],
+ source,
+ }),
+ );
+ program.file_has_source = true;
+
+ let file_id = program.files().next().unwrap().0;
+ program.begin_sequence(Some(Address::Constant(0x1000)));
+ program.row().file = file_id;
+ program.row().line = 0x10000;
+ program.generate_row();
+
+ let mut unit = Unit::new(encoding, program);
+ let root = unit.get_mut(unit.root());
+ root.set(constants::DW_AT_stmt_list, AttributeValue::LineProgramRef);
+ dwarf.units.add(unit);
+
+ let mut sections = Sections::new(EndianVec::new(LittleEndian));
+ dwarf.write(&mut sections).unwrap();
+
+ let read_dwarf = sections.read(LittleEndian);
+ let read_unit_header = read_dwarf.units().next().unwrap().unwrap();
+ let read_unit = read_dwarf.unit(read_unit_header).unwrap();
+ let read_unit = read_unit.unit_ref(&read_dwarf);
+ let read_program = read_unit.line_program.clone().unwrap();
+ let read_header = read_program.header();
+ let read_file = read_header.file(0).unwrap();
+ let read_source = read_unit.attr_string(read_file.source().unwrap()).unwrap();
+ assert_eq!(read_source.slice(), source1.as_bytes());
+
+ let convert_dwarf =
+ Dwarf::from(&read_dwarf, &|address| Some(Address::Constant(address)))
+ .unwrap();
+ let (_, convert_unit) = convert_dwarf.units.iter().next().unwrap();
+ let convert_program = &convert_unit.line_program;
+ let convert_file_id = convert_program.files().next().unwrap().0;
+ let convert_file_info = convert_program.get_file_info(convert_file_id);
+ assert_eq!(
+ convert_dwarf.get_line_string(convert_file_info.source.as_ref().unwrap()),
+ source1.as_bytes(),
+ );
+ }
+ }
+ }
+ }
}
diff --git a/external/vendor/gimli/src/write/loc.rs b/external/vendor/gimli/src/write/loc.rs
index 543b2ae3..7f67d197 100644
--- a/external/vendor/gimli/src/write/loc.rs
+++ b/external/vendor/gimli/src/write/loc.rs
@@ -295,7 +295,7 @@ fn write_expression<W: Writer>(
unit_offsets: Option<&UnitOffsets>,
val: &Expression,
) -> Result<()> {
- let size = val.size(encoding, unit_offsets) as u64;
+ let size = val.size(encoding, unit_offsets)? as u64;
if encoding.version <= 4 {
w.write_udata(size, 2)?;
} else {
diff --git a/external/vendor/gimli/src/write/op.rs b/external/vendor/gimli/src/write/op.rs
index 67a2c9b9..f4c632b1 100644
--- a/external/vendor/gimli/src/write/op.rs
+++ b/external/vendor/gimli/src/write/op.rs
@@ -255,12 +255,16 @@ impl Expression {
self.operations.push(Operation::WasmStack(index));
}
- pub(crate) fn size(&self, encoding: Encoding, unit_offsets: Option<&UnitOffsets>) -> usize {
+ pub(crate) fn size(
+ &self,
+ encoding: Encoding,
+ unit_offsets: Option<&UnitOffsets>,
+ ) -> Result<usize> {
let mut size = 0;
for operation in &self.operations {
- size += operation.size(encoding, unit_offsets);
+ size += operation.size(encoding, unit_offsets)?;
}
- size
+ Ok(size)
}
pub(crate) fn write<W: Writer>(
@@ -275,13 +279,14 @@ impl Expression {
let mut offset = w.len();
for operation in &self.operations {
offsets.push(offset);
- offset += operation.size(encoding, unit_offsets);
+ offset += operation.size(encoding, unit_offsets)?;
}
offsets.push(offset);
for (operation, offset) in self.operations.iter().zip(offsets.iter().copied()) {
debug_assert_eq!(w.len(), offset);
operation.write(w, refs.as_deref_mut(), encoding, unit_offsets, &offsets)?;
}
+ debug_assert_eq!(w.len(), offset);
Ok(())
}
}
@@ -498,16 +503,16 @@ enum Operation {
}
impl Operation {
- fn size(&self, encoding: Encoding, unit_offsets: Option<&UnitOffsets>) -> usize {
- let base_size = |base| {
- // Errors are handled during writes.
- match unit_offsets {
- Some(offsets) => uleb128_size(offsets.unit_offset(base)),
- None => 0,
- }
+ fn size(&self, encoding: Encoding, unit_offsets: Option<&UnitOffsets>) -> Result<usize> {
+ let base_size = |entry| match unit_offsets {
+ Some(offsets) => offsets
+ .unit_offset(entry)
+ .map(uleb128_size)
+ .ok_or(Error::UnsupportedExpressionForwardReference),
+ None => Err(Error::UnsupportedCfiExpressionReference),
};
- 1 + match *self {
- Operation::Raw(ref bytecode) => return bytecode.len(),
+ Ok(1 + match *self {
+ Operation::Raw(ref bytecode) => return Ok(bytecode.len()),
Operation::Simple(_) => 0,
Operation::Address(_) => encoding.address_size as usize,
Operation::UnsignedConstant(value) => {
@@ -518,7 +523,7 @@ impl Operation {
}
}
Operation::SignedConstant(value) => sleb128_size(value),
- Operation::ConstantType(base, ref value) => base_size(base) + 1 + value.len(),
+ Operation::ConstantType(base, ref value) => base_size(base)? + 1 + value.len(),
Operation::FrameOffset(offset) => sleb128_size(offset),
Operation::RegisterOffset(register, offset) => {
if register.0 < 32 {
@@ -528,7 +533,7 @@ impl Operation {
}
}
Operation::RegisterType(register, base) => {
- uleb128_size(register.0.into()) + base_size(base)
+ uleb128_size(register.0.into()) + base_size(base)?
}
Operation::Pick(index) => {
if index > 1 {
@@ -539,22 +544,22 @@ impl Operation {
}
Operation::Deref { .. } => 0,
Operation::DerefSize { .. } => 1,
- Operation::DerefType { base, .. } => 1 + base_size(base),
+ Operation::DerefType { base, .. } => 1 + base_size(base)?,
Operation::PlusConstant(value) => uleb128_size(value),
Operation::Skip(_) => 2,
Operation::Branch(_) => 2,
Operation::Call(_) => 4,
Operation::CallRef(_) => encoding.format.word_size() as usize,
Operation::Convert(base) => match base {
- Some(base) => base_size(base),
+ Some(base) => base_size(base)?,
None => 1,
},
Operation::Reinterpret(base) => match base {
- Some(base) => base_size(base),
+ Some(base) => base_size(base)?,
None => 1,
},
Operation::EntryValue(ref expression) => {
- let length = expression.size(encoding, unit_offsets);
+ let length = expression.size(encoding, unit_offsets)?;
uleb128_size(length as u64) + length
}
Operation::Register(register) => {
@@ -582,7 +587,7 @@ impl Operation {
Operation::WasmLocal(index)
| Operation::WasmGlobal(index)
| Operation::WasmStack(index) => 1 + uleb128_size(index.into()),
- }
+ })
}
pub(crate) fn write<W: Writer>(
@@ -594,14 +599,9 @@ impl Operation {
offsets: &[usize],
) -> Result<()> {
let entry_offset = |entry| match unit_offsets {
- Some(offsets) => {
- let offset = offsets.unit_offset(entry);
- if offset == 0 {
- Err(Error::UnsupportedExpressionForwardReference)
- } else {
- Ok(offset)
- }
- }
+ Some(offsets) => offsets
+ .unit_offset(entry)
+ .ok_or(Error::UnsupportedExpressionForwardReference),
None => Err(Error::UnsupportedCfiExpressionReference),
};
match *self {
@@ -756,7 +756,7 @@ impl Operation {
} else {
w.write_u8(constants::DW_OP_GNU_entry_value.0)?;
}
- let length = expression.size(encoding, unit_offsets);
+ let length = expression.size(encoding, unit_offsets)?;
w.write_uleb128(length as u64)?;
expression.write(w, refs, encoding, unit_offsets)?;
}
@@ -1602,4 +1602,161 @@ mod tests {
}
}
}
+
+ #[test]
+ #[allow(clippy::type_complexity)]
+ fn test_expression_raw() {
+ for version in [2, 3, 4, 5] {
+ for address_size in [4, 8] {
+ for format in [Format::Dwarf32, Format::Dwarf64] {
+ let encoding = Encoding {
+ format,
+ version,
+ address_size,
+ };
+
+ let mut dwarf = Dwarf::new();
+ let unit_id = dwarf.units.add(Unit::new(encoding, LineProgram::none()));
+ let unit = dwarf.units.get_mut(unit_id);
+ let subprogram_id = unit.add(unit.root(), constants::DW_TAG_subprogram);
+ let subprogram = unit.get_mut(subprogram_id);
+ let expression = Expression::raw(vec![constants::DW_OP_constu.0, 23]);
+ subprogram.set(
+ constants::DW_AT_location,
+ AttributeValue::Exprloc(expression),
+ );
+
+ // Write the DWARF, then parse it.
+ let mut sections = Sections::new(EndianVec::new(LittleEndian));
+ dwarf.write(&mut sections).unwrap();
+
+ let read_dwarf = sections.read(LittleEndian);
+ let mut read_units = read_dwarf.units();
+ let read_unit_header = read_units.next().unwrap().unwrap();
+ let read_unit = read_dwarf.unit(read_unit_header).unwrap();
+ let mut read_entries = read_unit.entries();
+ let (_, read_entry) = read_entries.next_dfs().unwrap().unwrap();
+ assert_eq!(read_entry.tag(), constants::DW_TAG_compile_unit);
+ let (_, read_entry) = read_entries.next_dfs().unwrap().unwrap();
+ assert_eq!(read_entry.tag(), constants::DW_TAG_subprogram);
+ let read_attr = read_entry
+ .attr_value(constants::DW_AT_location)
+ .unwrap()
+ .unwrap();
+ let read_expression = read_attr.exprloc_value().unwrap();
+ let mut read_operations = read_expression.operations(encoding);
+ assert_eq!(
+ read_operations.next(),
+ Ok(Some(read::Operation::UnsignedConstant { value: 23 }))
+ );
+ assert_eq!(read_operations.next(), Ok(None));
+ }
+ }
+ }
+ }
+
+ #[test]
+ fn test_forward_ref() {
+ let encoding = Encoding {
+ format: Format::Dwarf32,
+ version: 5,
+ address_size: 8,
+ };
+
+ let mut dwarf = Dwarf::new();
+ let unit_id = dwarf.units.add(Unit::new(encoding, LineProgram::none()));
+ let unit = dwarf.units.get_mut(unit_id);
+
+ // First, create an entry that will contain the expression.
+ let subprogram_id = unit.add(unit.root(), constants::DW_TAG_subprogram);
+
+ // Now create the entry to be referenced by the expression.
+ let entry_id = unit.add(unit.root(), constants::DW_TAG_const_type);
+
+ // Create an expression containing the reference.
+ let mut expression = Expression::new();
+ expression.op_deref_type(2, entry_id);
+
+ // Add the expression to the subprogram.
+ unit.get_mut(subprogram_id).set(
+ constants::DW_AT_location,
+ AttributeValue::Exprloc(expression),
+ );
+
+ // Writing the DWARF should fail.
+ let mut sections = Sections::new(EndianVec::new(LittleEndian));
+ assert_eq!(
+ dwarf.write(&mut sections),
+ Err(Error::UnsupportedExpressionForwardReference)
+ );
+ }
+
+ #[test]
+ fn test_missing_unit_ref() {
+ let encoding = Encoding {
+ format: Format::Dwarf32,
+ version: 5,
+ address_size: 8,
+ };
+
+ let mut dwarf = Dwarf::new();
+ let unit_id = dwarf.units.add(Unit::new(encoding, LineProgram::none()));
+ let unit = dwarf.units.get_mut(unit_id);
+
+ // Create the entry to be referenced by the expression.
+ let entry_id = unit.add(unit.root(), constants::DW_TAG_const_type);
+ // And delete it so that it is not available when writing the expression.
+ unit.get_mut(unit.root()).delete_child(entry_id);
+
+ // Create an expression containing the reference.
+ let mut expression = Expression::new();
+ expression.op_deref_type(2, entry_id);
+
+ // Create an entry containing the expression.
+ let subprogram_id = unit.add(unit.root(), constants::DW_TAG_subprogram);
+ unit.get_mut(subprogram_id).set(
+ constants::DW_AT_location,
+ AttributeValue::Exprloc(expression),
+ );
+
+ // Writing the DWARF should fail.
+ let mut sections = Sections::new(EndianVec::new(LittleEndian));
+ assert_eq!(
+ dwarf.write(&mut sections),
+ Err(Error::UnsupportedExpressionForwardReference)
+ );
+ }
+
+ #[test]
+ fn test_missing_debuginfo_ref() {
+ let encoding = Encoding {
+ format: Format::Dwarf32,
+ version: 5,
+ address_size: 8,
+ };
+
+ let mut dwarf = Dwarf::new();
+ let unit_id = dwarf.units.add(Unit::new(encoding, LineProgram::none()));
+ let unit = dwarf.units.get_mut(unit_id);
+
+ // Create the entry to be referenced by the expression.
+ let entry_id = unit.add(unit.root(), constants::DW_TAG_const_type);
+ // And delete it so that it is not available when writing the expression.
+ unit.get_mut(unit.root()).delete_child(entry_id);
+
+ // Create an expression containing the reference.
+ let mut expression = Expression::new();
+ expression.op_call_ref(Reference::Entry(unit_id, entry_id));
+
+ // Create an entry containing the expression.
+ let subprogram_id = unit.add(unit.root(), constants::DW_TAG_subprogram);
+ unit.get_mut(subprogram_id).set(
+ constants::DW_AT_location,
+ AttributeValue::Exprloc(expression),
+ );
+
+ // Writing the DWARF should fail.
+ let mut sections = Sections::new(EndianVec::new(LittleEndian));
+ assert_eq!(dwarf.write(&mut sections), Err(Error::InvalidReference));
+ }
}
diff --git a/external/vendor/gimli/src/write/str.rs b/external/vendor/gimli/src/write/str.rs
index 83285c03..11ea403a 100644
--- a/external/vendor/gimli/src/write/str.rs
+++ b/external/vendor/gimli/src/write/str.rs
@@ -23,7 +23,7 @@ use crate::write::{BaseId, Result, Section, Writer};
// This would avoid the need for DebugStrOffsets but would make it
// hard to implement `get`.
macro_rules! define_string_table {
- ($name:ident, $id:ident, $section:ident, $offsets:ident, $docs:expr) => {
+ ($name:ident, $id:ident, $section:ident, $offset:ident, $offsets:ident, $docs:expr) => {
#[doc=$docs]
#[derive(Debug, Default)]
pub struct $name {
@@ -70,11 +70,19 @@ macro_rules! define_string_table {
/// Returns the offsets at which the strings are written.
pub fn write<W: Writer>(&self, w: &mut $section<W>) -> Result<$offsets> {
let mut offsets = Vec::new();
+ let mut empty = None;
for bytes in self.strings.iter() {
offsets.push(w.offset());
w.write(bytes)?;
+ if empty.is_none() {
+ empty = Some(w.offset());
+ }
w.write_u8(0)?;
}
+ // Record the offset of the first null, for use as an empty string.
+ if let Some(empty) = empty {
+ offsets.push(empty);
+ }
Ok($offsets {
base_id: self.base_id,
@@ -82,6 +90,17 @@ macro_rules! define_string_table {
})
}
}
+
+ impl $offsets {
+ pub(crate) fn get_empty(&self) -> Option<$id> {
+ if self.offsets.is_empty() {
+ None
+ } else {
+ // The last offset is always the empty string.
+ Some($id::new(self.base_id, self.offsets.len() - 1))
+ }
+ }
+ }
};
}
@@ -91,6 +110,7 @@ define_string_table!(
StringTable,
StringId,
DebugStr,
+ DebugStrOffset,
DebugStrOffsets,
"A table of strings that will be stored in a `.debug_str` section."
);
@@ -111,6 +131,7 @@ define_string_table!(
LineStringTable,
LineStringId,
DebugLineStr,
+ DebugLineStrOffset,
DebugLineStrOffsets,
"A table of strings that will be stored in a `.debug_line_str` section."
);
@@ -151,7 +172,8 @@ mod tests {
assert_eq!(debug_str.slice(), b"one\0two\0");
assert_eq!(offsets.get(id1), DebugStrOffset(0));
assert_eq!(offsets.get(id2), DebugStrOffset(4));
- assert_eq!(offsets.count(), 2);
+ assert_eq!(offsets.get(offsets.get_empty().unwrap()), DebugStrOffset(3));
+ assert_eq!(offsets.count(), 3);
}
#[test]
@@ -166,7 +188,11 @@ mod tests {
let read_debug_str = read::DebugStr::new(debug_str.slice(), LittleEndian);
let str1 = read_debug_str.get_str(offsets.get(id1)).unwrap();
let str2 = read_debug_str.get_str(offsets.get(id2)).unwrap();
+ let str3 = read_debug_str
+ .get_str(offsets.get(offsets.get_empty().unwrap()))
+ .unwrap();
assert_eq!(str1.slice(), &b"one"[..]);
assert_eq!(str2.slice(), &b"two"[..]);
+ assert_eq!(str3.slice(), b"");
}
}
diff --git a/external/vendor/gimli/src/write/unit.rs b/external/vendor/gimli/src/write/unit.rs
index da66db59..fa705959 100644
--- a/external/vendor/gimli/src/write/unit.rs
+++ b/external/vendor/gimli/src/write/unit.rs
@@ -151,7 +151,10 @@ fn write_section_refs<W: Writer>(
offsets: &DebugInfoOffsets,
) -> Result<()> {
for r in references.drain(..) {
- let entry_offset = offsets.entry(r.unit, r.entry).0;
+ let entry_offset = offsets
+ .entry(r.unit, r.entry)
+ .ok_or(Error::InvalidReference)?
+ .0;
debug_assert_ne!(entry_offset, 0);
w.write_offset_at(r.offset, entry_offset, SectionId::DebugInfo, r.size)?;
}
@@ -396,7 +399,7 @@ impl Unit {
// This does not need relocation.
w.write_udata_at(
offset.0,
- offsets.unit_offset(entry),
+ offsets.unit_offset(entry).ok_or(Error::InvalidReference)?,
self.format().word_size(),
)?;
}
@@ -598,7 +601,7 @@ impl DebuggingInformationEntry {
) -> Result<()> {
offsets.entries[self.id.index].offset = DebugInfoOffset(*offset);
offsets.entries[self.id.index].abbrev = abbrevs.add(self.abbreviation(unit.encoding())?);
- *offset += self.size(unit, offsets);
+ *offset += self.size(unit, offsets)?;
if !self.children.is_empty() {
for child in &self.children {
unit.entries[child.index].calculate_offsets(unit, offset, offsets, abbrevs)?;
@@ -609,15 +612,15 @@ impl DebuggingInformationEntry {
Ok(())
}
- fn size(&self, unit: &Unit, offsets: &UnitOffsets) -> usize {
+ fn size(&self, unit: &Unit, offsets: &UnitOffsets) -> Result<usize> {
let mut size = uleb128_size(offsets.abbrev(self.id));
if self.sibling && !self.children.is_empty() {
size += unit.format().word_size() as usize;
}
for attr in &self.attrs {
- size += attr.value.size(unit, offsets);
+ size += attr.value.size(unit, offsets)?;
}
- size
+ Ok(size)
}
/// Write the entry to the given sections.
@@ -634,7 +637,7 @@ impl DebuggingInformationEntry {
range_lists: &RangeListOffsets,
loc_lists: &LocationListOffsets,
) -> Result<()> {
- debug_assert_eq!(offsets.debug_info_offset(self.id), w.offset());
+ debug_assert_eq!(offsets.debug_info_offset(self.id), Some(w.offset()));
w.write_uleb128(offsets.abbrev(self.id))?;
let sibling_offset = if self.sibling && !self.children.is_empty() {
@@ -961,13 +964,13 @@ impl AttributeValue {
Ok(form)
}
- fn size(&self, unit: &Unit, offsets: &UnitOffsets) -> usize {
+ fn size(&self, unit: &Unit, offsets: &UnitOffsets) -> Result<usize> {
macro_rules! debug_assert_form {
($form:expr) => {
debug_assert_eq!(self.form(unit.encoding()).unwrap(), $form)
};
}
- match *self {
+ Ok(match *self {
AttributeValue::Address(_) => {
debug_assert_form!(constants::DW_FORM_addr);
unit.address_size() as usize
@@ -1002,7 +1005,7 @@ impl AttributeValue {
}
AttributeValue::Exprloc(ref val) => {
debug_assert_form!(constants::DW_FORM_exprloc);
- let size = val.size(unit.encoding(), Some(offsets));
+ let size = val.size(unit.encoding(), Some(offsets))?;
uleb128_size(size as u64) + size
}
AttributeValue::Flag(_) => {
@@ -1137,7 +1140,7 @@ impl AttributeValue {
debug_assert_form!(constants::DW_FORM_udata);
uleb128_size(val.map(|id| id.raw(unit.version())).unwrap_or(0))
}
- }
+ })
}
/// Write the attribute value to the given sections.
@@ -1195,7 +1198,7 @@ impl AttributeValue {
}
AttributeValue::Exprloc(ref val) => {
debug_assert_form!(constants::DW_FORM_exprloc);
- w.write_uleb128(val.size(unit.encoding(), Some(offsets)) as u64)?;
+ w.write_uleb128(val.size(unit.encoding(), Some(offsets))? as u64)?;
val.write(
&mut w.0,
Some(debug_info_refs),
@@ -1403,7 +1406,7 @@ impl DebugInfoOffsets {
/// Get the `.debug_info` section offset for the given entry.
#[inline]
- pub fn entry(&self, unit: UnitId, entry: UnitEntryId) -> DebugInfoOffset {
+ pub fn entry(&self, unit: UnitId, entry: UnitEntryId) -> Option<DebugInfoOffset> {
debug_assert_eq!(self.base_id, unit.base_id);
self.units[unit.index].debug_info_offset(entry)
}
@@ -1418,20 +1421,29 @@ pub(crate) struct UnitOffsets {
}
impl UnitOffsets {
- /// Get the .debug_info offset for the given entry.
+ /// Get the `.debug_info` offset for the given entry.
+ ///
+ /// Returns `None` if the offset has not been calculated yet.
#[inline]
- pub(crate) fn debug_info_offset(&self, entry: UnitEntryId) -> DebugInfoOffset {
+ fn debug_info_offset(&self, entry: UnitEntryId) -> Option<DebugInfoOffset> {
debug_assert_eq!(self.base_id, entry.base_id);
let offset = self.entries[entry.index].offset;
- debug_assert_ne!(offset.0, 0);
- offset
+ if offset.0 == 0 {
+ None
+ } else {
+ Some(offset)
+ }
}
/// Get the unit offset for the given entry.
+ ///
+ /// Returns `None` if the offset has not been calculated yet.
+ /// This may occur if the entry is orphaned or if a reference
+ /// to the entry occurs before the entry itself is written.
#[inline]
- pub(crate) fn unit_offset(&self, entry: UnitEntryId) -> u64 {
- let offset = self.debug_info_offset(entry);
- (offset.0 - self.unit.0) as u64
+ pub(crate) fn unit_offset(&self, entry: UnitEntryId) -> Option<u64> {
+ self.debug_info_offset(entry)
+ .map(|offset| (offset.0 - self.unit.0) as u64)
}
/// Get the abbreviation code for the given entry.
@@ -3036,4 +3048,60 @@ mod tests {
// There should be no more entries
assert!(entries.next_dfs().unwrap().is_none());
}
+
+ #[test]
+ fn test_missing_unit_ref() {
+ let encoding = Encoding {
+ format: Format::Dwarf32,
+ version: 5,
+ address_size: 8,
+ };
+
+ let mut dwarf = Dwarf::new();
+ let unit_id = dwarf.units.add(Unit::new(encoding, LineProgram::none()));
+ let unit = dwarf.units.get_mut(unit_id);
+
+ // Create the entry to be referenced.
+ let entry_id = unit.add(unit.root(), constants::DW_TAG_const_type);
+ // And delete it so that it is not available when writing.
+ unit.get_mut(unit.root()).delete_child(entry_id);
+
+ // Create a reference to the deleted entry.
+ let subprogram_id = unit.add(unit.root(), constants::DW_TAG_subprogram);
+ unit.get_mut(subprogram_id)
+ .set(constants::DW_AT_type, AttributeValue::UnitRef(entry_id));
+
+ // Writing the DWARF should fail.
+ let mut sections = Sections::new(EndianVec::new(LittleEndian));
+ assert_eq!(dwarf.write(&mut sections), Err(Error::InvalidReference));
+ }
+
+ #[test]
+ fn test_missing_debuginfo_ref() {
+ let encoding = Encoding {
+ format: Format::Dwarf32,
+ version: 5,
+ address_size: 8,
+ };
+
+ let mut dwarf = Dwarf::new();
+ let unit_id = dwarf.units.add(Unit::new(encoding, LineProgram::none()));
+ let unit = dwarf.units.get_mut(unit_id);
+
+ // Create the entry to be referenced.
+ let entry_id = unit.add(unit.root(), constants::DW_TAG_const_type);
+ // And delete it so that it is not available when writing.
+ unit.get_mut(unit.root()).delete_child(entry_id);
+
+ // Create a reference to the deleted entry.
+ let subprogram_id = unit.add(unit.root(), constants::DW_TAG_subprogram);
+ unit.get_mut(subprogram_id).set(
+ constants::DW_AT_type,
+ AttributeValue::DebugInfoRef(Reference::Entry(unit_id, entry_id)),
+ );
+
+ // Writing the DWARF should fail.
+ let mut sections = Sections::new(EndianVec::new(LittleEndian));
+ assert_eq!(dwarf.write(&mut sections), Err(Error::InvalidReference));
+ }
}
diff --git a/external/vendor/hashbrown/.cargo-checksum.json b/external/vendor/hashbrown/.cargo-checksum.json
index 88908a45..b96b0679 100644
--- a/external/vendor/hashbrown/.cargo-checksum.json
+++ b/external/vendor/hashbrown/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{".cargo_vcs_info.json":"69f3640939af23a14ac672aea0bb01e5c91ff62a2caff3fd29214bc57168d882","CHANGELOG.md":"ed7f31b98a975fee4392dc5de7bbedbabc00dcd5c3c60ade87a83b836401ba6f","Cargo.lock":"196f9d29807a2eba97e03e5816ce3579e2ee444d7a8787e2e4c93156e0e68792","Cargo.toml":"32bc47a47ae4759fd559ca2cbb43a597f679ff4ebcfa67c850794cc4cd52aea5","Cargo.toml.orig":"734e730bbb3eb5446b8c8ea6f2e904faecdb9603bcbbf7e5b503e0603367ce33","Cross.toml":"47aeebdfd782a5052346ce29bf750c225828e108aca723486c3839adba5d6901","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"ff8f68cb076caf8cefe7a6430d4ac086ce6af2ca8ce2c4e5a2004d4552ef52a2","README.md":"34a16e7bc599e9d4ec600b477176a4a1328e6fb1f3f8d1525fb54f398553daef","benches/bench.rs":"c323748bcf76d54cdaa152ec79dd2581f9d6b2c950f93e799ba38a28800e1fc9","benches/insert_unique_unchecked.rs":"dfe644035cad6ff13b280e3d72c9df2569491ecddc84f7c2502daf940814a63e","benches/set_ops.rs":"936cd15055c25d42aabc6bde738e3135da541520b40633c4fba940eb73e06f4d","clippy.toml":"7535949f908c6d9aea4f9a9f3a7625552c93fc29e963d059d40f4def9d77ea7b","src/control/bitmask.rs":"53dcdac056620f02c475b618d33e69f34152ea559d86bd4545546144f017baa0","src/control/group/generic.rs":"939b2e35e6ea5430a606a054ffc8ea3e22b867d83f2afed15525cf59a617eb6e","src/control/group/lsx.rs":"8a8783e466dbf995106e4fa3202d15fe99b0ac0f485ee7c699c3ba3bf346d1dd","src/control/group/mod.rs":"03d5cacaf762fcb0c9878e9f56355c7c9d0935d688d01c5e0d12aa673e16795d","src/control/group/neon.rs":"bde7726d321bd036cb9001818f962784346b932087b9f655c85ab26667d55fbb","src/control/group/sse2.rs":"833da90ab3fd72d306d5b999de96a4b6b52aa1a16ee7273c89bd12c9ead3bc45","src/control/mod.rs":"83fede19e9c5a26fd2c7372e6cf92547d32ade4cd69fde8a0eaaeb1be6ddc2ba","src/control/tag.rs":"9c94ab42aad3918bd77ffafdeb253f7f773a8f98bf56e36b85ebdc7a11ef676b","src/external_trait_impls/mod.rs":"d69528827794524cfd9acbeacc1ac4f6131e3c7574311e6d919f818f65fbff07","src/external_trait_impls/rayon/helpers.rs":"ba105bf0853ebc45157f22116ad0f55d3bdab75e721d8e7a677c7b912d0c0c6d","src/external_trait_impls/rayon/map.rs":"e1e08653c6c3d2f0586638ab7baf082c06fdc5551b5852b0f9e73aa9484b4955","src/external_trait_impls/rayon/mod.rs":"126edc882501dddd25e442d9236508b5b386eb8c0a9f5d654f2dd081086c1616","src/external_trait_impls/rayon/raw.rs":"04012fb2e99648819b4bc0044107ed3cb94013e242b7865075c5bd9ebf1b6865","src/external_trait_impls/rayon/set.rs":"7539348ff7bc6e3cce6b3c019d62dc401eea0138c578fef729c2593e8ead1cfa","src/external_trait_impls/rayon/table.rs":"aebd92261f44aef2e4c13a80a566e0308655396a3cc6f973d330d2f5ba26fc45","src/external_trait_impls/serde.rs":"f83dae5dd2243c0a1b278f9f040023e98c0e2744c78ad0243a7bb5d877a8e8ee","src/lib.rs":"a4ba7b15d4cfc524432877f3ad27e323d67f15706bb113052f77ff541718c0a6","src/macros.rs":"98a26b908fc0fbe6a58d008a317e550013d615eb3cc17a5054a573c62c1d74cb","src/map.rs":"7ad82c1a141b824be1201ea0014623b2433d32080f528ef3958e65d04ddb7688","src/raw/alloc.rs":"10474e218b922b0a32227578c09acd5b05c32ad223c4dbf0af3cbd7869c000f2","src/raw/mod.rs":"a88cd291be71cd2f6119a1f8b4030a0429b6b1f8771b7f2a8b140c1824788bed","src/raw_entry.rs":"41f54fabf968b6ba19a6fbb41372f7e86e1ccd221622591816fe48bcc3797369","src/rustc_entry.rs":"9c189a957af1ec5ff3549d15176c1608ca1c68330604a50b2ea19316a5dd14e2","src/scopeguard.rs":"1a246e08a63c06cd8ad934bd7da229421bf804f991ae93cd7e242da27ca6c601","src/set.rs":"cd7d05424d731f0ad5eb4cf255e9a4d970b96fb68398cc904481af942a106fb4","src/table.rs":"285620edfe390d0ea77983ae471943f145ea414caa81926010ef0de4647ef13e","src/util.rs":"c929f855589653727016bd8577db7ca234e7e0820f1f2dc0cfe49f13f5056168","tests/equivalent_trait.rs":"84faa3fe9d67c375d03fec81f0f1412c47862477d42e84e7d235258236338d5b","tests/hasher.rs":"fd06130f011660743202904221f3f7487d8d143d8903c73cd3a76d079ebbe9fb","tests/rayon.rs":"39cb24ab45fce8087bb54948715c8b6973ebfba1a325292b5b3cd9aab50b5fd2","tests/serde.rs":"6bac8054db722dd049901b37a6e006535bac30f425eb5cd91af19b5bc1dfe78e","tests/set.rs":"fd9ffc6f8a435f2fbcada826c33599d682d9f688f0f8dbb14fcd1e442d4c2647"},"package":"9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"}
\ No newline at end of file
+{"files":{".cargo_vcs_info.json":"0b08942ab0f22cbccff294d42881658bcbac6ca57689f9a3d6cee16eca93585f","CHANGELOG.md":"bc027bc493e90784b42132a1ec8917d0384769ba64fc866199f56633df5dacc3","Cargo.lock":"abf7eb4d7f2d2d3f2ad99f8290519745400a9c140595358e383fb2c247c9e1c0","Cargo.toml":"e5cbc66eeb71d7544bcbbda22065478c5ea270dd620fbcc6d9757e7b18485d47","Cargo.toml.orig":"9857fae8d6eb9d18862af1bc701664e84ba51d27bf9697c85485e68934b0bbf5","Cross.toml":"47aeebdfd782a5052346ce29bf750c225828e108aca723486c3839adba5d6901","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"ff8f68cb076caf8cefe7a6430d4ac086ce6af2ca8ce2c4e5a2004d4552ef52a2","README.md":"63da5e3fcf4da2921ae34639aad6f0921828670a19cb871cac7786546434857d","benches/bench.rs":"288e88b0e3021a781a0b49a2a8ca4c390b76a63fd05cd7b524b64a7e988b841a","benches/insert_unique_unchecked.rs":"dfe644035cad6ff13b280e3d72c9df2569491ecddc84f7c2502daf940814a63e","benches/set_ops.rs":"936cd15055c25d42aabc6bde738e3135da541520b40633c4fba940eb73e06f4d","benches/with_capacity.rs":"a017f770f47f7941ac4404c0f4f36d2118949c587ae807302137c321ca911494","clippy.toml":"7535949f908c6d9aea4f9a9f3a7625552c93fc29e963d059d40f4def9d77ea7b","src/control/bitmask.rs":"53dcdac056620f02c475b618d33e69f34152ea559d86bd4545546144f017baa0","src/control/group/generic.rs":"41163fb7e5b4749f46521a1b142d43205d3e7416c3a85219eb2001577225bf3b","src/control/group/lsx.rs":"99c308a2e07133dce18b88230fbb054d5d1edcf465b87ee9fb1f409eacc4f241","src/control/group/mod.rs":"03d5cacaf762fcb0c9878e9f56355c7c9d0935d688d01c5e0d12aa673e16795d","src/control/group/neon.rs":"bde7726d321bd036cb9001818f962784346b932087b9f655c85ab26667d55fbb","src/control/group/sse2.rs":"833da90ab3fd72d306d5b999de96a4b6b52aa1a16ee7273c89bd12c9ead3bc45","src/control/mod.rs":"83fede19e9c5a26fd2c7372e6cf92547d32ade4cd69fde8a0eaaeb1be6ddc2ba","src/control/tag.rs":"9c94ab42aad3918bd77ffafdeb253f7f773a8f98bf56e36b85ebdc7a11ef676b","src/external_trait_impls/mod.rs":"d69528827794524cfd9acbeacc1ac4f6131e3c7574311e6d919f818f65fbff07","src/external_trait_impls/rayon/helpers.rs":"f69637231d76d413bd37c608fafb372e1147f9e9c8be2ba24ec47c6d2f005548","src/external_trait_impls/rayon/map.rs":"e1e08653c6c3d2f0586638ab7baf082c06fdc5551b5852b0f9e73aa9484b4955","src/external_trait_impls/rayon/mod.rs":"126edc882501dddd25e442d9236508b5b386eb8c0a9f5d654f2dd081086c1616","src/external_trait_impls/rayon/raw.rs":"04012fb2e99648819b4bc0044107ed3cb94013e242b7865075c5bd9ebf1b6865","src/external_trait_impls/rayon/set.rs":"7539348ff7bc6e3cce6b3c019d62dc401eea0138c578fef729c2593e8ead1cfa","src/external_trait_impls/rayon/table.rs":"aebd92261f44aef2e4c13a80a566e0308655396a3cc6f973d330d2f5ba26fc45","src/external_trait_impls/serde.rs":"eb17886c8d8e156b3e4068d87b0eb4900464d5d0a71ffae472fee90c735aaa02","src/hasher.rs":"939bc4f8c9e2d7e7ace266a8c121360ab4b44ad0540cdee06951e0197d96bc3c","src/lib.rs":"3593e802f411f0af91fc18cc9b08ae56acd2a2b6a1b3bfd1a8daf7887aa661c0","src/macros.rs":"98a26b908fc0fbe6a58d008a317e550013d615eb3cc17a5054a573c62c1d74cb","src/map.rs":"2f42092439f327756317ea15a32983cfd29503add8a6ff9716b92e50c03dfd7b","src/raw/alloc.rs":"4a1ba016f0932495bcec6007674bf4043543084cd04f4fe9cd5796013296e857","src/raw/mod.rs":"c24d6b9c8a9456505fa7a5b7c42b85468e6dd76bd49af54d17696c16dec4d2e8","src/raw_entry.rs":"41f54fabf968b6ba19a6fbb41372f7e86e1ccd221622591816fe48bcc3797369","src/rustc_entry.rs":"9c189a957af1ec5ff3549d15176c1608ca1c68330604a50b2ea19316a5dd14e2","src/scopeguard.rs":"1a246e08a63c06cd8ad934bd7da229421bf804f991ae93cd7e242da27ca6c601","src/set.rs":"1a4f3a1bfc5cfb3707172a1fcf16fc9d2190d97562ad544f8fc581e43a4d57c0","src/table.rs":"3bd787d9fe89e1ec9e62d7f70441c6711d9978473b5d7569e91b9a13cbe2b3eb","src/util.rs":"c929f855589653727016bd8577db7ca234e7e0820f1f2dc0cfe49f13f5056168","tests/equivalent_trait.rs":"84faa3fe9d67c375d03fec81f0f1412c47862477d42e84e7d235258236338d5b","tests/hasher.rs":"fd06130f011660743202904221f3f7487d8d143d8903c73cd3a76d079ebbe9fb","tests/rayon.rs":"39cb24ab45fce8087bb54948715c8b6973ebfba1a325292b5b3cd9aab50b5fd2","tests/serde.rs":"6bac8054db722dd049901b37a6e006535bac30f425eb5cd91af19b5bc1dfe78e","tests/set.rs":"fd9ffc6f8a435f2fbcada826c33599d682d9f688f0f8dbb14fcd1e442d4c2647"},"package":"841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"}
\ No newline at end of file
diff --git a/external/vendor/hashbrown/.cargo_vcs_info.json b/external/vendor/hashbrown/.cargo_vcs_info.json
index 94e46c90..e0ebcf8b 100644
--- a/external/vendor/hashbrown/.cargo_vcs_info.json
+++ b/external/vendor/hashbrown/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "b751eef8e99ccf3652046ef4a9e1ec47c1bfb78d"
+ "sha1": "1876e4f02708b93903d55ef598f68e82a826518f"
},
"path_in_vcs": ""
}
\ No newline at end of file
diff --git a/external/vendor/hashbrown/CHANGELOG.md b/external/vendor/hashbrown/CHANGELOG.md
index fd38a965..46a48812 100644
--- a/external/vendor/hashbrown/CHANGELOG.md
+++ b/external/vendor/hashbrown/CHANGELOG.md
@@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+## [0.16.1](https://github.com/rust-lang/hashbrown/compare/v0.16.0...v0.16.1) - 2025-11-20
+
+### Added
+
+- Added `HashTable` methods related to the raw bucket index (#657)
+- Added `VacantEntryRef::insert_with_key` (#579)
+
+### Changed
+
+- Removed specialization for `Copy` types (#662)
+- The `get_many_mut` family of methods have been renamed to `get_disjoint_mut`
+ to match the standard library. The old names are still present for now, but
+ deprecated. (#648)
+- Recognize and use over-sized allocations when using custom allocators. (#523)
+- Depend on `serde_core` instead of `serde`. (#649)
+- Optimized `collect` on rayon parallel iterators. (#652)
+
+## [0.16.0](https://github.com/rust-lang/hashbrown/compare/v0.15.5...v0.16.0) - 2025-08-28
+
+### Changed
+
+- Bump foldhash, the default hasher, to 0.2.0.
+- Replaced `DefaultHashBuilder` with a newtype wrapper around `foldhash` instead
+ of re-exporting it directly.
+
## [0.15.5](https://github.com/rust-lang/hashbrown/compare/v0.15.4...v0.15.5) - 2025-08-07
### Added
diff --git a/external/vendor/hashbrown/Cargo.lock b/external/vendor/hashbrown/Cargo.lock
index c573fcca..0e7d1d8a 100644
--- a/external/vendor/hashbrown/Cargo.lock
+++ b/external/vendor/hashbrown/Cargo.lock
@@ -8,12 +8,6 @@ version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
-[[package]]
-name = "bitflags"
-version = "2.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
-
[[package]]
name = "bumpalo"
version = "3.19.0"
@@ -25,9 +19,9 @@ dependencies = [
[[package]]
name = "cfg-if"
-version = "1.0.1"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
+checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "crossbeam-deque"
@@ -54,12 +48,6 @@ version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
-[[package]]
-name = "doc-comment"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
-
[[package]]
name = "either"
version = "1.15.0"
@@ -80,38 +68,39 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "foldhash"
-version = "0.1.5"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
+checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
[[package]]
name = "getrandom"
-version = "0.3.3"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4"
+checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
dependencies = [
"cfg-if",
"libc",
"r-efi",
- "wasi",
+ "wasip2",
]
[[package]]
name = "hashbrown"
-version = "0.15.5"
+version = "0.16.1"
dependencies = [
"allocator-api2",
"bumpalo",
- "doc-comment",
"equivalent",
"fnv",
"foldhash",
"lazy_static",
+ "libc",
"rand",
"rayon",
"rustc-std-workspace-alloc",
"rustc-std-workspace-core",
"serde",
+ "serde_core",
"serde_test",
]
@@ -123,9 +112,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
-version = "0.2.174"
+version = "0.2.177"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
+checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
[[package]]
name = "ppv-lite86"
@@ -138,18 +127,18 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.95"
+version = "1.0.103"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
+checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.40"
+version = "1.0.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
+checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"
dependencies = [
"proc-macro2",
]
@@ -191,9 +180,9 @@ dependencies = [
[[package]]
name = "rayon"
-version = "1.10.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
+checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
dependencies = [
"either",
"rayon-core",
@@ -201,9 +190,9 @@ dependencies = [
[[package]]
name = "rayon-core"
-version = "1.12.1"
+version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
+checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
@@ -223,18 +212,27 @@ checksum = "aa9c45b374136f52f2d6311062c7146bff20fec063c3f5d46a410bd937746955"
[[package]]
name = "serde"
-version = "1.0.219"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
+checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
+dependencies = [
+ "serde_core",
+]
+
+[[package]]
+name = "serde_core"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.219"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
+checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
@@ -252,9 +250,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.104"
+version = "2.0.110"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
+checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea"
dependencies = [
"proc-macro2",
"quote",
@@ -263,42 +261,39 @@ dependencies = [
[[package]]
name = "unicode-ident"
-version = "1.0.18"
+version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
+checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
[[package]]
-name = "wasi"
-version = "0.14.2+wasi-0.2.4"
+name = "wasip2"
+version = "1.0.1+wasi-0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
+checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7"
dependencies = [
- "wit-bindgen-rt",
+ "wit-bindgen",
]
[[package]]
-name = "wit-bindgen-rt"
-version = "0.39.0"
+name = "wit-bindgen"
+version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
-dependencies = [
- "bitflags",
-]
+checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
[[package]]
name = "zerocopy"
-version = "0.8.26"
+version = "0.8.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f"
+checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.8.26"
+version = "0.8.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181"
+checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831"
dependencies = [
"proc-macro2",
"quote",
diff --git a/external/vendor/hashbrown/Cargo.toml b/external/vendor/hashbrown/Cargo.toml
index cc4b1af7..52443992 100644
--- a/external/vendor/hashbrown/Cargo.toml
+++ b/external/vendor/hashbrown/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.65.0"
name = "hashbrown"
-version = "0.15.5"
+version = "0.16.1"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
build = false
exclude = [
@@ -59,7 +59,10 @@ default = [
]
default-hasher = ["dep:foldhash"]
inline-more = []
-nightly = ["bumpalo/allocator_api"]
+nightly = [
+ "foldhash?/nightly",
+ "bumpalo/allocator_api",
+]
raw-entry = []
rustc-dep-of-std = [
"nightly",
@@ -68,6 +71,10 @@ rustc-dep-of-std = [
"rustc-internal-api",
]
rustc-internal-api = []
+serde = [
+ "dep:serde_core",
+ "dep:serde",
+]
[lib]
name = "hashbrown"
@@ -105,6 +112,10 @@ path = "benches/insert_unique_unchecked.rs"
name = "set_ops"
path = "benches/set_ops.rs"
+[[bench]]
+name = "with_capacity"
+path = "benches/with_capacity.rs"
+
[dependencies.alloc]
version = "1.0.0"
optional = true
@@ -127,16 +138,16 @@ optional = true
default-features = false
[dependencies.foldhash]
-version = "0.1.2"
+version = "0.2.0"
optional = true
default-features = false
[dependencies.rayon]
-version = "1.2"
+version = "1.9.0"
optional = true
-[dependencies.serde]
-version = "1.0.25"
+[dependencies.serde_core]
+version = "1.0.221"
optional = true
default-features = false
@@ -144,9 +155,6 @@ default-features = false
version = "3.13.0"
features = ["allocator-api2"]
-[dev-dependencies.doc-comment]
-version = "0.3.1"
-
[dev-dependencies.fnv]
version = "1.0.7"
@@ -162,3 +170,11 @@ version = "1.2"
[dev-dependencies.serde_test]
version = "1.0"
+
+[target."cfg(any())".dependencies.serde]
+version = "1.0.220"
+optional = true
+default-features = false
+
+[target."cfg(unix)".dev-dependencies.libc]
+version = "0.2.155"
diff --git a/external/vendor/hashbrown/Cargo.toml.orig b/external/vendor/hashbrown/Cargo.toml.orig
index 4d870fa4..faa00958 100644
--- a/external/vendor/hashbrown/Cargo.toml.orig
+++ b/external/vendor/hashbrown/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "hashbrown"
-version = "0.15.5"
+version = "0.16.1"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "A Rust port of Google's SwissTable hash map"
license = "MIT OR Apache-2.0"
@@ -14,11 +14,11 @@ rust-version = "1.65.0"
[dependencies]
# For the default hasher
-foldhash = { version = "0.1.2", default-features = false, optional = true }
+foldhash = { version = "0.2.0", default-features = false, optional = true }
# For external trait impls
-rayon = { version = "1.2", optional = true }
-serde = { version = "1.0.25", default-features = false, optional = true }
+rayon = { version = "1.9.0", optional = true }
+serde_core = { version = "1.0.221", default-features = false, optional = true }
# When built as part of libstd
core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" }
@@ -30,23 +30,31 @@ allocator-api2 = { version = "0.2.9", optional = true, default-features = false,
] }
# Equivalent trait which can be shared with other hash table implementations.
+# NB: this is a public dependency because `Equivalent` is re-exported!
equivalent = { version = "1.0", optional = true, default-features = false }
+# serde v1.0.220 is the first version that released with `serde_core`.
+# This is required to avoid conflict with other `serde` users which may require an older version.
+[target.'cfg(any())'.dependencies]
+serde = { version = "1.0.220", default-features = false, optional = true }
+
[dev-dependencies]
lazy_static = "1.4"
rand = { version = "0.9.0", features = ["small_rng"] }
rayon = "1.2"
fnv = "1.0.7"
serde_test = "1.0"
-doc-comment = "0.3.1"
bumpalo = { version = "3.13.0", features = ["allocator-api2"] }
+[target.'cfg(unix)'.dev-dependencies]
+libc = "0.2.155"
+
[features]
default = ["default-hasher", "inline-more", "allocator-api2", "equivalent", "raw-entry"]
# Enables use of nightly features. This is only guaranteed to work on the latest
# version of nightly Rust.
-nightly = ["bumpalo/allocator_api"]
+nightly = ["foldhash?/nightly", "bumpalo/allocator_api"]
# Enables the RustcEntry API used to provide the standard library's Entry API.
rustc-internal-api = []
@@ -59,6 +67,9 @@ rustc-dep-of-std = [
"rustc-internal-api",
]
+# Enables serde support.
+serde = ["dep:serde_core", "dep:serde"]
+
# Enables the deprecated RawEntry API.
raw-entry = []
diff --git a/external/vendor/hashbrown/README.md b/external/vendor/hashbrown/README.md
index 83a53811..1a9de188 100644
--- a/external/vendor/hashbrown/README.md
+++ b/external/vendor/hashbrown/README.md
@@ -40,7 +40,7 @@ Add this to your `Cargo.toml`:
```toml
[dependencies]
-hashbrown = "0.15"
+hashbrown = "0.16"
```
Then:
@@ -51,6 +51,7 @@ use hashbrown::HashMap;
let mut map = HashMap::new();
map.insert(1, "one");
```
+
## Flags
This crate has the following Cargo features:
diff --git a/external/vendor/hashbrown/benches/bench.rs b/external/vendor/hashbrown/benches/bench.rs
index 111c5d54..ce3aee5c 100644
--- a/external/vendor/hashbrown/benches/bench.rs
+++ b/external/vendor/hashbrown/benches/bench.rs
@@ -16,6 +16,7 @@ use std::{
};
const SIZE: usize = 1000;
+const OP_COUNT: usize = 500;
// The default hashmap when using this crate directly.
type FoldHashMap<K, V> = HashMap<K, V, DefaultHashBuilder>;
@@ -76,6 +77,22 @@ macro_rules! bench_suite {
};
}
+macro_rules! bench_suite_2 {
+ ($bench_macro:ident,
+ $name0:ident, $size0:literal, $name1:ident, $size1:literal, $name2:ident, $size2:literal,
+ $name3:ident, $size3:literal, $name4:ident, $size4:literal, $name5:ident, $size5:literal,
+ $name6:ident, $size6:literal, $name7:ident, $size7:literal) => {
+ $bench_macro!($name0, $size0, FoldHashMap, RandomKeys::new());
+ $bench_macro!($name1, $size1, FoldHashMap, RandomKeys::new());
+ $bench_macro!($name2, $size2, FoldHashMap, RandomKeys::new());
+ $bench_macro!($name3, $size3, FoldHashMap, RandomKeys::new());
+ $bench_macro!($name4, $size4, FoldHashMap, RandomKeys::new());
+ $bench_macro!($name5, $size5, FoldHashMap, RandomKeys::new());
+ $bench_macro!($name6, $size6, FoldHashMap, RandomKeys::new());
+ $bench_macro!($name7, $size7, FoldHashMap, RandomKeys::new());
+ };
+}
+
macro_rules! bench_insert {
($name:ident, $maptype:ident, $keydist:expr) => {
#[bench]
@@ -222,6 +239,83 @@ bench_suite!(
lookup_fail_std_random
);
+macro_rules! bench_lookup_load_factor {
+ ($name:ident, $size:literal, $maptype:ident, $keydist:expr) => {
+ #[bench]
+ fn $name(b: &mut Bencher) {
+ let mut m = $maptype::default();
+ for i in $keydist.take($size) {
+ m.insert(i, DropType(i));
+ }
+
+ b.iter(|| {
+ for i in $keydist.take(OP_COUNT) {
+ black_box(m.get(&i));
+ }
+ });
+ }
+ };
+}
+
+bench_suite_2!(
+ bench_lookup_load_factor, // same capacity of 32768 * 0.875
+ loadfactor_lookup_14500,
+ 14500,
+ loadfactor_lookup_16500,
+ 16500,
+ loadfactor_lookup_18500,
+ 18500,
+ loadfactor_lookup_20500,
+ 20500,
+ loadfactor_lookup_22500,
+ 22500,
+ loadfactor_lookup_24500,
+ 24500,
+ loadfactor_lookup_26500,
+ 26500,
+ loadfactor_lookup_28500,
+ 28500
+);
+
+macro_rules! bench_lookup_fail_load_factor {
+ ($name:ident, $size:literal, $maptype:ident, $keydist:expr) => {
+ #[bench]
+ fn $name(b: &mut Bencher) {
+ let mut m = $maptype::default();
+ let mut iter = $keydist;
+ for i in (&mut iter).take($size) {
+ m.insert(i, DropType(i));
+ }
+
+ b.iter(|| {
+ for i in (&mut iter).take(OP_COUNT) {
+ black_box(m.get(&i));
+ }
+ })
+ }
+ };
+}
+
+bench_suite_2!(
+ bench_lookup_fail_load_factor, // same capacity of 32768 * 0.875
+ loadfactor_lookup_fail_14500,
+ 14500,
+ loadfactor_lookup_fail_16500,
+ 16500,
+ loadfactor_lookup_fail_18500,
+ 18500,
+ loadfactor_lookup_fail_20500,
+ 20500,
+ loadfactor_lookup_fail_22500,
+ 22500,
+ loadfactor_lookup_fail_24500,
+ 24500,
+ loadfactor_lookup_fail_26500,
+ 26500,
+ loadfactor_lookup_fail_28500,
+ 28500
+);
+
macro_rules! bench_iter {
($name:ident, $maptype:ident, $keydist:expr) => {
#[bench]
diff --git a/external/vendor/hashbrown/benches/with_capacity.rs b/external/vendor/hashbrown/benches/with_capacity.rs
new file mode 100644
index 00000000..eeb85b59
--- /dev/null
+++ b/external/vendor/hashbrown/benches/with_capacity.rs
@@ -0,0 +1,38 @@
+#![feature(test)]
+
+extern crate test;
+
+use hashbrown::HashMap;
+use test::{black_box, Bencher};
+
+type Map<K, V> = HashMap<K, V>;
+
+macro_rules! bench_with_capacity {
+ ($name:ident, $cap:expr) => {
+ #[bench]
+ fn $name(b: &mut Bencher) {
+ b.iter(|| {
+ // Construct a new empty map with a given capacity and return it to avoid
+ // being optimized away. Dropping it measures allocation + minimal setup.
+ let m: Map<usize, usize> = Map::with_capacity($cap);
+ black_box(m)
+ });
+ }
+ };
+}
+
+bench_with_capacity!(with_capacity_000000, 0);
+bench_with_capacity!(with_capacity_000001, 1);
+bench_with_capacity!(with_capacity_000003, 3);
+bench_with_capacity!(with_capacity_000007, 7);
+bench_with_capacity!(with_capacity_000008, 8);
+bench_with_capacity!(with_capacity_000016, 16);
+bench_with_capacity!(with_capacity_000032, 32);
+bench_with_capacity!(with_capacity_000064, 64);
+bench_with_capacity!(with_capacity_000128, 128);
+bench_with_capacity!(with_capacity_000256, 256);
+bench_with_capacity!(with_capacity_000512, 512);
+bench_with_capacity!(with_capacity_001024, 1024);
+bench_with_capacity!(with_capacity_004096, 4096);
+bench_with_capacity!(with_capacity_016384, 16384);
+bench_with_capacity!(with_capacity_065536, 65536);
diff --git a/external/vendor/hashbrown/src/control/group/generic.rs b/external/vendor/hashbrown/src/control/group/generic.rs
index 22307099..ecb81d27 100644
--- a/external/vendor/hashbrown/src/control/group/generic.rs
+++ b/external/vendor/hashbrown/src/control/group/generic.rs
@@ -102,7 +102,7 @@ impl Group {
/// - This never happens for `EMPTY` and `DELETED`, only full entries.
/// - The check for key equality will catch these.
/// - This only happens if there is at least 1 true match.
- /// - The chance of this happening is very low (< 1% chance per byte).
+ /// - The chance of this happening is very low (< 1% chance per tag).
#[inline]
pub(crate) fn match_tag(self, tag: Tag) -> BitMask {
// This algorithm is derived from
diff --git a/external/vendor/hashbrown/src/control/group/lsx.rs b/external/vendor/hashbrown/src/control/group/lsx.rs
index 5f45bc8d..dcac09a0 100644
--- a/external/vendor/hashbrown/src/control/group/lsx.rs
+++ b/external/vendor/hashbrown/src/control/group/lsx.rs
@@ -3,7 +3,6 @@ use core::mem;
use core::num::NonZeroU16;
use core::arch::loongarch64::*;
-use mem::transmute;
pub(crate) type BitMaskWord = u16;
pub(crate) type NonZeroBitMaskWord = NonZeroU16;
@@ -16,7 +15,7 @@ pub(crate) const BITMASK_ITER_MASK: BitMaskWord = !0;
///
/// This implementation uses a 128-bit LSX value.
#[derive(Copy, Clone)]
-pub(crate) struct Group(v16i8);
+pub(crate) struct Group(m128i);
// FIXME: https://github.com/rust-lang/rust-clippy/issues/3859
#[allow(clippy::use_self)]
@@ -72,10 +71,9 @@ impl Group {
/// the given value.
#[inline]
pub(crate) fn match_tag(self, tag: Tag) -> BitMask {
- #[allow(clippy::missing_transmute_annotations)]
unsafe {
let cmp = lsx_vseq_b(self.0, lsx_vreplgr2vr_b(tag.0 as i32));
- BitMask(lsx_vpickve2gr_hu::<0>(transmute(lsx_vmskltz_b(cmp))) as u16)
+ BitMask(lsx_vpickve2gr_hu::<0>(lsx_vmskltz_b(cmp)) as u16)
}
}
@@ -83,10 +81,9 @@ impl Group {
/// `EMPTY`.
#[inline]
pub(crate) fn match_empty(self) -> BitMask {
- #[allow(clippy::missing_transmute_annotations)]
unsafe {
let cmp = lsx_vseqi_b::<{ Tag::EMPTY.0 as i8 as i32 }>(self.0);
- BitMask(lsx_vpickve2gr_hu::<0>(transmute(lsx_vmskltz_b(cmp))) as u16)
+ BitMask(lsx_vpickve2gr_hu::<0>(lsx_vmskltz_b(cmp)) as u16)
}
}
@@ -94,20 +91,18 @@ impl Group {
/// `EMPTY` or `DELETED`.
#[inline]
pub(crate) fn match_empty_or_deleted(self) -> BitMask {
- #[allow(clippy::missing_transmute_annotations)]
unsafe {
// A tag is EMPTY or DELETED iff the high bit is set
- BitMask(lsx_vpickve2gr_hu::<0>(transmute(lsx_vmskltz_b(self.0))) as u16)
+ BitMask(lsx_vpickve2gr_hu::<0>(lsx_vmskltz_b(self.0)) as u16)
}
}
/// Returns a `BitMask` indicating all tags in the group which are full.
#[inline]
pub(crate) fn match_full(&self) -> BitMask {
- #[allow(clippy::missing_transmute_annotations)]
unsafe {
// A tag is EMPTY or DELETED iff the high bit is set
- BitMask(lsx_vpickve2gr_hu::<0>(transmute(lsx_vmskgez_b(self.0))) as u16)
+ BitMask(lsx_vpickve2gr_hu::<0>(lsx_vmskgez_b(self.0)) as u16)
}
}
@@ -124,14 +119,10 @@ impl Group {
// let special = 0 > tag = 1111_1111 (true) or 0000_0000 (false)
// 1111_1111 | 1000_0000 = 1111_1111
// 0000_0000 | 1000_0000 = 1000_0000
- #[allow(clippy::missing_transmute_annotations)]
unsafe {
let zero = lsx_vreplgr2vr_b(0);
let special = lsx_vslt_b(self.0, zero);
- Group(transmute(lsx_vor_v(
- transmute(special),
- transmute(lsx_vreplgr2vr_b(Tag::DELETED.0 as i32)),
- )))
+ Group(lsx_vor_v(special, lsx_vreplgr2vr_b(Tag::DELETED.0 as i32)))
}
}
}
diff --git a/external/vendor/hashbrown/src/external_trait_impls/rayon/helpers.rs b/external/vendor/hashbrown/src/external_trait_impls/rayon/helpers.rs
index 070b08cd..4420af3a 100644
--- a/external/vendor/hashbrown/src/external_trait_impls/rayon/helpers.rs
+++ b/external/vendor/hashbrown/src/external_trait_impls/rayon/helpers.rs
@@ -6,21 +6,7 @@ use rayon::iter::{IntoParallelIterator, ParallelIterator};
/// Helper for collecting parallel iterators to an intermediary
#[allow(clippy::linkedlist)] // yes, we need linked list here for efficient appending!
pub(super) fn collect<I: IntoParallelIterator>(iter: I) -> (LinkedList<Vec<I::Item>>, usize) {
- let list = iter
- .into_par_iter()
- .fold(Vec::new, |mut vec, elem| {
- vec.push(elem);
- vec
- })
- .map(|vec| {
- let mut list = LinkedList::new();
- list.push_back(vec);
- list
- })
- .reduce(LinkedList::new, |mut list1, mut list2| {
- list1.append(&mut list2);
- list1
- });
+ let list = iter.into_par_iter().collect_vec_list();
let len = list.iter().map(Vec::len).sum();
(list, len)
diff --git a/external/vendor/hashbrown/src/external_trait_impls/serde.rs b/external/vendor/hashbrown/src/external_trait_impls/serde.rs
index f9eb05fd..85b6170b 100644
--- a/external/vendor/hashbrown/src/external_trait_impls/serde.rs
+++ b/external/vendor/hashbrown/src/external_trait_impls/serde.rs
@@ -15,8 +15,8 @@ mod map {
use core::fmt;
use core::hash::{BuildHasher, Hash};
use core::marker::PhantomData;
- use serde::de::{Deserialize, Deserializer, MapAccess, Visitor};
- use serde::ser::{Serialize, Serializer};
+ use serde_core::de::{Deserialize, Deserializer, MapAccess, Visitor};
+ use serde_core::ser::{Serialize, Serializer};
use crate::hash_map::HashMap;
@@ -101,8 +101,8 @@ mod set {
use core::fmt;
use core::hash::{BuildHasher, Hash};
use core::marker::PhantomData;
- use serde::de::{Deserialize, Deserializer, SeqAccess, Visitor};
- use serde::ser::{Serialize, Serializer};
+ use serde_core::de::{Deserialize, Deserializer, SeqAccess, Visitor};
+ use serde_core::ser::{Serialize, Serializer};
use crate::hash_set::HashSet;
diff --git a/external/vendor/hashbrown/src/hasher.rs b/external/vendor/hashbrown/src/hasher.rs
new file mode 100644
index 00000000..7ec8aa16
--- /dev/null
+++ b/external/vendor/hashbrown/src/hasher.rs
@@ -0,0 +1,77 @@
+#[cfg(feature = "default-hasher")]
+use {
+ core::hash::{BuildHasher, Hasher},
+ foldhash::fast::RandomState,
+};
+
+/// Default hash builder for the `S` type parameter of
+/// [`HashMap`](crate::HashMap) and [`HashSet`](crate::HashSet).
+///
+/// This only implements `BuildHasher` when the "default-hasher" crate feature
+/// is enabled; otherwise it just serves as a placeholder, and a custom `S` type
+/// must be used to have a fully functWhy this scored 17/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.