summaryrefslogtreecommitdiffstats
path: root/vendor/backtrace
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
commit4f9fe856a25ab29345b90e7725509e9ee38a37be (patch)
treee4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /vendor/backtrace
parentAdding upstream version 1.68.2+dfsg1. (diff)
downloadrustc-upstream/1.69.0+dfsg1.tar.xz
rustc-upstream/1.69.0+dfsg1.zip
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/backtrace')
-rw-r--r--vendor/backtrace/.cargo-checksum.json2
-rw-r--r--vendor/backtrace/Cargo.lock58
-rw-r--r--vendor/backtrace/Cargo.toml18
-rw-r--r--vendor/backtrace/src/backtrace/miri.rs6
-rw-r--r--vendor/backtrace/src/print.rs2
-rw-r--r--vendor/backtrace/src/symbolize/gimli.rs2
-rw-r--r--vendor/backtrace/src/symbolize/gimli/libs_dl_iterate_phdr.rs20
-rw-r--r--vendor/backtrace/src/symbolize/gimli/libs_macos.rs4
-rw-r--r--vendor/backtrace/src/symbolize/gimli/macho.rs4
-rw-r--r--vendor/backtrace/src/symbolize/gimli/parse_running_mmaps_unix.rs242
-rw-r--r--vendor/backtrace/src/windows.rs6
-rw-r--r--vendor/backtrace/tests/common/mod.rs14
-rw-r--r--vendor/backtrace/tests/concurrent-panics.rs14
-rw-r--r--vendor/backtrace/tests/current-exe-mismatch.rs137
-rw-r--r--vendor/backtrace/tests/skip_inner_frames.rs2
15 files changed, 474 insertions, 57 deletions
diff --git a/vendor/backtrace/.cargo-checksum.json b/vendor/backtrace/.cargo-checksum.json
index 434618119..e94768666 100644
--- a/vendor/backtrace/.cargo-checksum.json
+++ b/vendor/backtrace/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.lock":"b0096194daaeffd2e4c7577e0549b74f3d40183ef2abc83d29b9fe2faca882a7","Cargo.toml":"94e809a91c1cae05980cc022d6449db2e9029f18aa33c8151d7fb8a738f443a0","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"6007ea91612793f8c77d499d2065acd2255fc5f3c3268fd8bd1ae5f7bb40d6de","benches/benchmarks.rs":"029b78bb79052ec940eecfd18067b743925189202fc16015d3c4c25b05eb6d67","build.rs":"8d5e860da109f86c67596b10b5613ff6d19f9d24c2970f491a55261fb1973692","ci/android-ndk.sh":"89fafa41d08ff477f949bfc163d04d1eb34fdee370f7a695cfba4ef34c164a55","ci/android-sdk.sh":"69a953f70f32064d1d2a57c7082a50336b90a12d10c75e5416dbb1d6d718016c","ci/debuglink-docker.sh":"3a16131df8c69fef37331cb6f01a6623d169177474f475159d05bab61df077a9","ci/debuglink.sh":"164a961b930de8c9aedf45a11076c3d41081846a8e6a9566ba2b6ad615179e0b","ci/docker/aarch64-linux-android/Dockerfile":"1058f2ee9cf74b4c51a489e62544bea94c6cd537ad5c1b056f3e4b262f7e09f2","ci/docker/aarch64-unknown-linux-gnu/Dockerfile":"a7b7aae0d8e2f826cf1c6c7c3160f8e5e9a30478b83c394b6575ce15b0ff0802","ci/docker/arm-linux-androideabi/Dockerfile":"12f8c62f0750d3581292b23309f5aef15492c946a73e55df13bc345de5ca576e","ci/docker/arm-unknown-linux-gnueabihf/Dockerfile":"5156382ff639b11801c1bd7ddc6e03e8834505a74ecf7160e92182603cd5d96f","ci/docker/armv7-linux-androideabi/Dockerfile":"7c582c2a4b162b147deada3194a30185ccb7a01215f97990cd1a5a3460c30fb9","ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile":"4aaceef14ba700ea3719fe30fcb46f1bb154a47aa52cdb64fa6ed7eff96d6c85","ci/docker/i586-unknown-linux-gnu/Dockerfile":"0816c89b79a74be7ccfc34e95cd718ce29a8698a2ab56903b4b0712470f5c8bb","ci/docker/i686-linux-android/Dockerfile":"18957e8dad4c6d9c8ad561f846e20f6e2186ff7a8421f2a0089793b510f66fe2","ci/docker/i686-unknown-linux-gnu/Dockerfile":"0816c89b79a74be7ccfc34e95cd718ce29a8698a2ab56903b4b0712470f5c8bb","ci/docker/powerpc64-unknown-linux-gnu/Dockerfile":"270de99179c925e6284a8283fdb4e40a8c813a569b24930d6cfe79a4c470ab61","ci/docker/s390x-unknown-linux-gnu/Dockerfile":"4aa8ca641efd2f1937ef669eda2f3e357b2fb926911722b3afc6cf25ce4bcac2","ci/docker/x86_64-linux-android/Dockerfile":"e6d6fb37041a9d6fc6771be1ae8d1eaa506a1dc8796170c1ffcc3d6dd043bed2","ci/docker/x86_64-pc-windows-gnu/Dockerfile":"654988c5c008610f90d5159a8dd0ab6fd491e9c0d16ad65b03ef53f694a5400c","ci/docker/x86_64-unknown-linux-gnu/Dockerfile":"9f89f080551fff6678b1efcc0925fc8c16316f69cdd150e89f9e95cdab583510","ci/docker/x86_64-unknown-linux-musl/Dockerfile":"4db3cb7d315588f363eb9f377bf1c27d8e8886c07b6c0d0c5cf7ee91114a718b","ci/run-docker.sh":"70760696a608b0d89eb3dcc4b08f176d709dd9f98e50297f2b7e0bb9b0f3b458","ci/run.sh":"0bb5c8256019779f3e1db20fcc2c01416ffd4679428f3e395ef5f3e55d2d642c","ci/runtest-android.rs":"be2e49bb296b92a8e3643a6c0a70917fe7b130fa43b71a29c4e7514f45c00e7e","examples/backtrace.rs":"5da0c95ccebfaffbbe7b5a92b0e488017dc375cbb5b8fb2b7712dd65b2dfb2ba","examples/raw.rs":"575ec6037f597ba7ab0eaf9dd699fadfabef918ba2affea7dc20cdbde55de5ec","src/android-api.c":"b75f16de578451464f49b83dc817b76aa9a0be0d86ea71d1659cc78f99e94fbd","src/backtrace/dbghelp.rs":"ea2f175d6c62259d86e7e9bb04328e03657d7259d4459aab70734f1cf1cd9d72","src/backtrace/libunwind.rs":"65373ce7bd87abc411b4307bd41679f9176987170b3b627abe0f0bb1625ff685","src/backtrace/miri.rs":"630faf9919d3ced8d75095cea30fde6c1ed7f0ad135dee8c81a3d7614b55cc11","src/backtrace/mod.rs":"b301e6b7da4f3811c5255c2f1fdb83f4ab97acfa1647d998d8455614ae90ddaf","src/backtrace/noop.rs":"a8550b70b3c83f6852a1dba83cf97b1325238b5aa3ce7b35437e9382cdafd924","src/capture.rs":"8701657803f04ea9e0b9dd6a4ca619761edb8a42cfd2f7c9c9e4ee31d9357159","src/dbghelp.rs":"40891588891fe48c16263374a36092ac3e67ddf4f756b880839f31dfcb80b7c4","src/lib.rs":"03f2a0f2524cb2078e2f28959c3eb1625ff400d3e23eeb7d3b73d86c012979b2","src/print.rs":"766affbd9d2242a81d85067413dd95b807425a6df2fffb17a4eacc5f606d4200","src/print/fuchsia.rs":"de45f55032e05fdc1fd55224910158f8c64a705494103a29c7e2680536e76e40","src/symbolize/dbghelp.rs":"58aeda764a27702e0abb3af62bae8a162d8b6cb8c80ffd141ee794d81a8ace15","src/symbolize/gimli.rs":"062afb232fdd1550ae613de79385365b03aa50a721794666d7856401b7f44e5a","src/symbolize/gimli/coff.rs":"d3f4a274bd3b2ed81d114a9326630c019f682ca91aac6ec31e660f420c35b064","src/symbolize/gimli/elf.rs":"3445558fc1feed60165af55e07847c59c3eca5e4031f50b04329fc5be36eb057","src/symbolize/gimli/libs_dl_iterate_phdr.rs":"8f7dabbdff97e5a24f0d5b3670469840666a91e9971ac352abeb4e96d98a2a6c","src/symbolize/gimli/libs_haiku.rs":"0a0d4b37145e898f7068cadacccf362d8216e463e7026af2ce38d75ebfd74bea","src/symbolize/gimli/libs_illumos.rs":"523e96272b46bdaab2abb0dd0201cb8032bf86558cbed986a20d7e2cc02fa8be","src/symbolize/gimli/libs_libnx.rs":"4116eceadb2d9916d4f5602712eacec647f185d4c53c723aced8de5fc471b14d","src/symbolize/gimli/libs_macos.rs":"a0d6edf8f3af23523d1a63a12ef6a6dd9ad1057b2cb20cc405da0544daba5389","src/symbolize/gimli/libs_windows.rs":"6459f8610ca1a0fd7456539ec604f5276c94b3d0d7331357eaed338e49220a02","src/symbolize/gimli/macho.rs":"a725d85566438499ecfb0ac06193c3153a2fa1b533f360d55c63dea386d1920d","src/symbolize/gimli/mmap_fake.rs":"9564fcf47000e70d521b31518e205c8e6ee09b7410fb1eb1e452721757ff54ba","src/symbolize/gimli/mmap_unix.rs":"8159a4a807bd5692412ba1a280bb36ab942c06e904f37a92e2545f0b4211308a","src/symbolize/gimli/mmap_windows.rs":"1ca715317c1054968d92350438b293f800bae2174f395b20bc43a633d757fe8f","src/symbolize/gimli/stash.rs":"67d01016b17ca4c0adbb0827da9b83fde5f79ccc89db3e4fd769ab03c1248d8e","src/symbolize/miri.rs":"f5201cc8a7de24ad3424d2472cb0af59cd28563d09cc0c21e998f4cee4367ade","src/symbolize/mod.rs":"a7177603810aca1cd9cd4a59027a1dd2c792dc9d345435b5dc866eb7c8b66baf","src/symbolize/noop.rs":"5d4432079b8ae2b9382945a57ae43df57bb4b7ed2e5956d4167e051a44567388","src/types.rs":"f43c94b99d57ca66a5cfe939a46016c95b2d69d82695fb52480f7a3e5b344fd9","src/windows.rs":"46f02837a2e6b404a035993f2e1f03cdfc1a5a872c1feb92926566a31138d273","tests/accuracy/auxiliary.rs":"71d2238da401042e007ef5ee20336d6834724bae96d93c8c52d11a5a332d7d34","tests/accuracy/main.rs":"f8e42aeeb50b35fca380db2e9fe52820cc0bc3133167289c5710e3290701e78e","tests/concurrent-panics.rs":"7696676e46a1c50a3a88446fdc59c0dedfb81ded24d77ec725f7cc101a5d8fe6","tests/long_fn_name.rs":"ebef58e34543ed4d47048faa9b6525f68fc71e12255af734523a513c5d4baa6f","tests/skip_inner_frames.rs":"7560fe59e83e4b234789c448da5504d3dd9065f9ad1b2615f12606f9112df4e0","tests/smoke.rs":"33014495f9158aea2d0ee2ee3335ffe82105c7ed894f96eaf7d23845a60f7439"},"package":"cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7"} \ No newline at end of file
+{"files":{"Cargo.lock":"7d3b2926febbfe2d3ae525bf139703fa9d614cad0836d0e88a176352787a8151","Cargo.toml":"01600b69a4b1967a6f307a698f576a86308d39c4e571ff398235a88204b7b220","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"6007ea91612793f8c77d499d2065acd2255fc5f3c3268fd8bd1ae5f7bb40d6de","benches/benchmarks.rs":"029b78bb79052ec940eecfd18067b743925189202fc16015d3c4c25b05eb6d67","build.rs":"8d5e860da109f86c67596b10b5613ff6d19f9d24c2970f491a55261fb1973692","ci/android-ndk.sh":"89fafa41d08ff477f949bfc163d04d1eb34fdee370f7a695cfba4ef34c164a55","ci/android-sdk.sh":"69a953f70f32064d1d2a57c7082a50336b90a12d10c75e5416dbb1d6d718016c","ci/debuglink-docker.sh":"3a16131df8c69fef37331cb6f01a6623d169177474f475159d05bab61df077a9","ci/debuglink.sh":"164a961b930de8c9aedf45a11076c3d41081846a8e6a9566ba2b6ad615179e0b","ci/docker/aarch64-linux-android/Dockerfile":"1058f2ee9cf74b4c51a489e62544bea94c6cd537ad5c1b056f3e4b262f7e09f2","ci/docker/aarch64-unknown-linux-gnu/Dockerfile":"a7b7aae0d8e2f826cf1c6c7c3160f8e5e9a30478b83c394b6575ce15b0ff0802","ci/docker/arm-linux-androideabi/Dockerfile":"12f8c62f0750d3581292b23309f5aef15492c946a73e55df13bc345de5ca576e","ci/docker/arm-unknown-linux-gnueabihf/Dockerfile":"5156382ff639b11801c1bd7ddc6e03e8834505a74ecf7160e92182603cd5d96f","ci/docker/armv7-linux-androideabi/Dockerfile":"7c582c2a4b162b147deada3194a30185ccb7a01215f97990cd1a5a3460c30fb9","ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile":"4aaceef14ba700ea3719fe30fcb46f1bb154a47aa52cdb64fa6ed7eff96d6c85","ci/docker/i586-unknown-linux-gnu/Dockerfile":"0816c89b79a74be7ccfc34e95cd718ce29a8698a2ab56903b4b0712470f5c8bb","ci/docker/i686-linux-android/Dockerfile":"18957e8dad4c6d9c8ad561f846e20f6e2186ff7a8421f2a0089793b510f66fe2","ci/docker/i686-unknown-linux-gnu/Dockerfile":"0816c89b79a74be7ccfc34e95cd718ce29a8698a2ab56903b4b0712470f5c8bb","ci/docker/powerpc64-unknown-linux-gnu/Dockerfile":"270de99179c925e6284a8283fdb4e40a8c813a569b24930d6cfe79a4c470ab61","ci/docker/s390x-unknown-linux-gnu/Dockerfile":"4aa8ca641efd2f1937ef669eda2f3e357b2fb926911722b3afc6cf25ce4bcac2","ci/docker/x86_64-linux-android/Dockerfile":"e6d6fb37041a9d6fc6771be1ae8d1eaa506a1dc8796170c1ffcc3d6dd043bed2","ci/docker/x86_64-pc-windows-gnu/Dockerfile":"654988c5c008610f90d5159a8dd0ab6fd491e9c0d16ad65b03ef53f694a5400c","ci/docker/x86_64-unknown-linux-gnu/Dockerfile":"9f89f080551fff6678b1efcc0925fc8c16316f69cdd150e89f9e95cdab583510","ci/docker/x86_64-unknown-linux-musl/Dockerfile":"4db3cb7d315588f363eb9f377bf1c27d8e8886c07b6c0d0c5cf7ee91114a718b","ci/run-docker.sh":"70760696a608b0d89eb3dcc4b08f176d709dd9f98e50297f2b7e0bb9b0f3b458","ci/run.sh":"0bb5c8256019779f3e1db20fcc2c01416ffd4679428f3e395ef5f3e55d2d642c","ci/runtest-android.rs":"be2e49bb296b92a8e3643a6c0a70917fe7b130fa43b71a29c4e7514f45c00e7e","examples/backtrace.rs":"5da0c95ccebfaffbbe7b5a92b0e488017dc375cbb5b8fb2b7712dd65b2dfb2ba","examples/raw.rs":"575ec6037f597ba7ab0eaf9dd699fadfabef918ba2affea7dc20cdbde55de5ec","src/android-api.c":"b75f16de578451464f49b83dc817b76aa9a0be0d86ea71d1659cc78f99e94fbd","src/backtrace/dbghelp.rs":"ea2f175d6c62259d86e7e9bb04328e03657d7259d4459aab70734f1cf1cd9d72","src/backtrace/libunwind.rs":"65373ce7bd87abc411b4307bd41679f9176987170b3b627abe0f0bb1625ff685","src/backtrace/miri.rs":"c0dcb1e430eea92fcbad3e293124010f39c1f8ff1bbbf1a0275c53b05880cd5f","src/backtrace/mod.rs":"b301e6b7da4f3811c5255c2f1fdb83f4ab97acfa1647d998d8455614ae90ddaf","src/backtrace/noop.rs":"a8550b70b3c83f6852a1dba83cf97b1325238b5aa3ce7b35437e9382cdafd924","src/capture.rs":"8701657803f04ea9e0b9dd6a4ca619761edb8a42cfd2f7c9c9e4ee31d9357159","src/dbghelp.rs":"40891588891fe48c16263374a36092ac3e67ddf4f756b880839f31dfcb80b7c4","src/lib.rs":"03f2a0f2524cb2078e2f28959c3eb1625ff400d3e23eeb7d3b73d86c012979b2","src/print.rs":"7bae8abae6947d6d0e57ff9c834d1d4d0b528a6d7e6424e7ad9a5ac557cf3e08","src/print/fuchsia.rs":"de45f55032e05fdc1fd55224910158f8c64a705494103a29c7e2680536e76e40","src/symbolize/dbghelp.rs":"58aeda764a27702e0abb3af62bae8a162d8b6cb8c80ffd141ee794d81a8ace15","src/symbolize/gimli.rs":"f43374c89f12095a99431de0f758a3414dfd2f1e84bfa35897ce8afdaf006041","src/symbolize/gimli/coff.rs":"d3f4a274bd3b2ed81d114a9326630c019f682ca91aac6ec31e660f420c35b064","src/symbolize/gimli/elf.rs":"3445558fc1feed60165af55e07847c59c3eca5e4031f50b04329fc5be36eb057","src/symbolize/gimli/libs_dl_iterate_phdr.rs":"bc64242857dd82288d6e7d6b183e651d05ab7bc4f037f19b9e42719f04fc2c83","src/symbolize/gimli/libs_haiku.rs":"0a0d4b37145e898f7068cadacccf362d8216e463e7026af2ce38d75ebfd74bea","src/symbolize/gimli/libs_illumos.rs":"523e96272b46bdaab2abb0dd0201cb8032bf86558cbed986a20d7e2cc02fa8be","src/symbolize/gimli/libs_libnx.rs":"4116eceadb2d9916d4f5602712eacec647f185d4c53c723aced8de5fc471b14d","src/symbolize/gimli/libs_macos.rs":"c24cb480ae029b350325873ac4358104e5943ad61b62eb22bb6b65b2f05bbd29","src/symbolize/gimli/libs_windows.rs":"6459f8610ca1a0fd7456539ec604f5276c94b3d0d7331357eaed338e49220a02","src/symbolize/gimli/macho.rs":"47a970c23443f322e79bf54cf7f11d9990516b17fbad7c893f20bd56a22083af","src/symbolize/gimli/mmap_fake.rs":"9564fcf47000e70d521b31518e205c8e6ee09b7410fb1eb1e452721757ff54ba","src/symbolize/gimli/mmap_unix.rs":"8159a4a807bd5692412ba1a280bb36ab942c06e904f37a92e2545f0b4211308a","src/symbolize/gimli/mmap_windows.rs":"1ca715317c1054968d92350438b293f800bae2174f395b20bc43a633d757fe8f","src/symbolize/gimli/parse_running_mmaps_unix.rs":"1e25b842b979b745bf3e22e8ce6f13b242f2fb52a75d8e865bad9538e44b76a3","src/symbolize/gimli/stash.rs":"67d01016b17ca4c0adbb0827da9b83fde5f79ccc89db3e4fd769ab03c1248d8e","src/symbolize/miri.rs":"f5201cc8a7de24ad3424d2472cb0af59cd28563d09cc0c21e998f4cee4367ade","src/symbolize/mod.rs":"a7177603810aca1cd9cd4a59027a1dd2c792dc9d345435b5dc866eb7c8b66baf","src/symbolize/noop.rs":"5d4432079b8ae2b9382945a57ae43df57bb4b7ed2e5956d4167e051a44567388","src/types.rs":"f43c94b99d57ca66a5cfe939a46016c95b2d69d82695fb52480f7a3e5b344fd9","src/windows.rs":"b0bbbf4088021fd646024ad01de1a60bf12bf62b6b744f0f5952681f77cd49e6","tests/accuracy/auxiliary.rs":"71d2238da401042e007ef5ee20336d6834724bae96d93c8c52d11a5a332d7d34","tests/accuracy/main.rs":"f8e42aeeb50b35fca380db2e9fe52820cc0bc3133167289c5710e3290701e78e","tests/common/mod.rs":"733101288a48cf94d5a87a1957724deaf2650c3e4e8aa0190a4a7db62aa90d01","tests/concurrent-panics.rs":"b60279ad5c4fb9b2754807f35179cbc8fbd7acbe6e92ac6d0f416ae75db38705","tests/current-exe-mismatch.rs":"b44a885a655f761eb15d4a47bdfff4332f9a1f88105b7aed9ea0b052e385615f","tests/long_fn_name.rs":"ebef58e34543ed4d47048faa9b6525f68fc71e12255af734523a513c5d4baa6f","tests/skip_inner_frames.rs":"6c03cd0ad9facf0aa81e59cf970504785b6ada9993a2dfc2aea0b18b79419aeb","tests/smoke.rs":"33014495f9158aea2d0ee2ee3335ffe82105c7ed894f96eaf7d23845a60f7439"},"package":"233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca"} \ No newline at end of file
diff --git a/vendor/backtrace/Cargo.lock b/vendor/backtrace/Cargo.lock
index 6eee92255..14da4f7d5 100644
--- a/vendor/backtrace/Cargo.lock
+++ b/vendor/backtrace/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
[[package]]
name = "addr2line"
-version = "0.17.0"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
+checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97"
dependencies = [
"gimli",
]
@@ -19,7 +19,7 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "backtrace"
-version = "0.3.66"
+version = "0.3.67"
dependencies = [
"addr2line",
"cc",
@@ -37,9 +37,9 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.0.73"
+version = "1.0.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
+checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"
[[package]]
name = "cfg-if"
@@ -49,30 +49,30 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cpp_demangle"
-version = "0.3.5"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f"
+checksum = "b446fd40bcc17eddd6a4a78f24315eb90afdb3334999ddfd4909985c47722442"
dependencies = [
"cfg-if",
]
[[package]]
name = "gimli"
-version = "0.26.1"
+version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
+checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793"
[[package]]
name = "libc"
-version = "0.2.126"
+version = "0.2.138"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
+checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
[[package]]
name = "libloading"
-version = "0.7.3"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd"
+checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
dependencies = [
"cfg-if",
"winapi",
@@ -86,36 +86,36 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
[[package]]
name = "miniz_oxide"
-version = "0.5.3"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc"
+checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
dependencies = [
"adler",
]
[[package]]
name = "object"
-version = "0.29.0"
+version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
+checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb"
dependencies = [
"memchr",
]
[[package]]
name = "proc-macro2"
-version = "1.0.40"
+version = "1.0.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7"
+checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.20"
+version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804"
+checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
dependencies = [
"proc-macro2",
]
@@ -134,18 +134,18 @@ checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
[[package]]
name = "serde"
-version = "1.0.138"
+version = "1.0.150"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1578c6245786b9d168c5447eeacfb96856573ca56c9d68fdcf394be134882a47"
+checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.138"
+version = "1.0.150"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "023e9b1467aef8a10fb88f25611870ada9800ef7e22afce356bb0d2387b6f27c"
+checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e"
dependencies = [
"proc-macro2",
"quote",
@@ -154,9 +154,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "1.0.98"
+version = "1.0.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd"
+checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"
dependencies = [
"proc-macro2",
"quote",
@@ -165,9 +165,9 @@ dependencies = [
[[package]]
name = "unicode-ident"
-version = "1.0.1"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c"
+checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
[[package]]
name = "winapi"
diff --git a/vendor/backtrace/Cargo.toml b/vendor/backtrace/Cargo.toml
index 641181528..96f41466b 100644
--- a/vendor/backtrace/Cargo.toml
+++ b/vendor/backtrace/Cargo.toml
@@ -12,7 +12,7 @@
[package]
edition = "2018"
name = "backtrace"
-version = "0.3.66"
+version = "0.3.67"
authors = ["The Rust Project Developers"]
build = "build.rs"
autoexamples = true
@@ -23,7 +23,7 @@ A library to acquire a stack trace (backtrace) at runtime in a Rust program.
homepage = "https://github.com/rust-lang/backtrace-rs"
documentation = "https://docs.rs/backtrace"
readme = "README.md"
-license = "MIT/Apache-2.0"
+license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/backtrace-rs"
[[example]]
@@ -57,15 +57,21 @@ name = "concurrent-panics"
harness = false
required-features = ["std"]
+[[test]]
+name = "current-exe-mismatch"
+harness = false
+required-features = ["std"]
+
[dependencies.addr2line]
-version = "0.17.0"
+version = "0.19.0"
default-features = false
[dependencies.cfg-if]
version = "1.0"
[dependencies.cpp_demangle]
-version = "0.3.0"
+version = "0.4.0"
+features = ["alloc"]
optional = true
default-features = false
@@ -74,11 +80,11 @@ version = "0.2.94"
default-features = false
[dependencies.miniz_oxide]
-version = "0.5.0"
+version = "0.6.0"
default-features = false
[dependencies.object]
-version = "0.29.0"
+version = "0.30.0"
features = [
"read_core",
"elf",
diff --git a/vendor/backtrace/src/backtrace/miri.rs b/vendor/backtrace/src/backtrace/miri.rs
index 9a5f65b80..f8c496428 100644
--- a/vendor/backtrace/src/backtrace/miri.rs
+++ b/vendor/backtrace/src/backtrace/miri.rs
@@ -91,7 +91,7 @@ pub fn resolve_addr(ptr: *mut c_void) -> Frame {
}
}
-pub unsafe fn trace_unsynchronized<F: FnMut(&super::Frame) -> bool>(mut cb: F) {
+unsafe fn trace_unsynchronized<F: FnMut(&super::Frame) -> bool>(mut cb: F) {
let len = miri_backtrace_size(0);
let mut frames = Vec::with_capacity(len);
@@ -102,6 +102,8 @@ pub unsafe fn trace_unsynchronized<F: FnMut(&super::Frame) -> bool>(mut cb: F) {
for ptr in frames.iter() {
let frame = resolve_addr(*ptr as *mut c_void);
- cb(&super::Frame { inner: frame });
+ if !cb(&super::Frame { inner: frame }) {
+ return;
+ }
}
}
diff --git a/vendor/backtrace/src/print.rs b/vendor/backtrace/src/print.rs
index cc677122a..174d8ae5c 100644
--- a/vendor/backtrace/src/print.rs
+++ b/vendor/backtrace/src/print.rs
@@ -135,7 +135,7 @@ impl BacktraceFrameFmt<'_, '_, '_> {
symbol.name(),
// TODO: this isn't great that we don't end up printing anything
// with non-utf8 filenames. Thankfully almost everything is utf8 so
- // this shouldn't be too too bad.
+ // this shouldn't be too bad.
symbol
.filename()
.and_then(|p| Some(BytesOrWideString::Bytes(p.to_str()?.as_bytes()))),
diff --git a/vendor/backtrace/src/symbolize/gimli.rs b/vendor/backtrace/src/symbolize/gimli.rs
index 5f10122dd..cd4cec58c 100644
--- a/vendor/backtrace/src/symbolize/gimli.rs
+++ b/vendor/backtrace/src/symbolize/gimli.rs
@@ -184,6 +184,8 @@ cfg_if::cfg_if! {
))] {
mod libs_dl_iterate_phdr;
use libs_dl_iterate_phdr::native_libraries;
+ #[path = "gimli/parse_running_mmaps_unix.rs"]
+ mod parse_running_mmaps;
} else if #[cfg(target_env = "libnx")] {
mod libs_libnx;
use libs_libnx::native_libraries;
diff --git a/vendor/backtrace/src/symbolize/gimli/libs_dl_iterate_phdr.rs b/vendor/backtrace/src/symbolize/gimli/libs_dl_iterate_phdr.rs
index a011e6080..9f0304ce8 100644
--- a/vendor/backtrace/src/symbolize/gimli/libs_dl_iterate_phdr.rs
+++ b/vendor/backtrace/src/symbolize/gimli/libs_dl_iterate_phdr.rs
@@ -17,6 +17,20 @@ pub(super) fn native_libraries() -> Vec<Library> {
return ret;
}
+fn infer_current_exe(base_addr: usize) -> OsString {
+ if let Ok(entries) = super::parse_running_mmaps::parse_maps() {
+ let opt_path = entries
+ .iter()
+ .find(|e| e.ip_matches(base_addr) && e.pathname().len() > 0)
+ .map(|e| e.pathname())
+ .cloned();
+ if let Some(path) = opt_path {
+ return path;
+ }
+ }
+ env::current_exe().map(|e| e.into()).unwrap_or_default()
+}
+
// `info` should be a valid pointers.
// `vec` should be a valid pointer to a `std::Vec`.
unsafe extern "C" fn callback(
@@ -28,8 +42,12 @@ unsafe extern "C" fn callback(
let libs = &mut *(vec as *mut Vec<Library>);
let is_main_prog = info.dlpi_name.is_null() || *info.dlpi_name == 0;
let name = if is_main_prog {
+ // The man page for dl_iterate_phdr says that the first object visited by
+ // callback is the main program; so the first time we encounter a
+ // nameless entry, we can assume its the main program and try to infer its path.
+ // After that, we cannot continue that assumption, and we use an empty string.
if libs.is_empty() {
- env::current_exe().map(|e| e.into()).unwrap_or_default()
+ infer_current_exe(info.dlpi_addr as usize)
} else {
OsString::new()
}
diff --git a/vendor/backtrace/src/symbolize/gimli/libs_macos.rs b/vendor/backtrace/src/symbolize/gimli/libs_macos.rs
index 17703b88a..438bbff6f 100644
--- a/vendor/backtrace/src/symbolize/gimli/libs_macos.rs
+++ b/vendor/backtrace/src/symbolize/gimli/libs_macos.rs
@@ -113,8 +113,8 @@ fn native_library(i: u32) -> Option<Library> {
// file offset 0 with a nonzero size. For whatever reason when this
// is present it appears to mean that the symbol table is relative
// to just the vmaddr slide for the library. If it's *not* present
- // then the symbol table is relative to the the vmaddr slide plus
- // the segment's stated address.
+ // then the symbol table is relative to the vmaddr slide plus the
+ // segment's stated address.
//
// To handle this situation if we *don't* find a text section at
// file offset zero then we increase the bias by the first text
diff --git a/vendor/backtrace/src/symbolize/gimli/macho.rs b/vendor/backtrace/src/symbolize/gimli/macho.rs
index ec5673843..adea97a09 100644
--- a/vendor/backtrace/src/symbolize/gimli/macho.rs
+++ b/vendor/backtrace/src/symbolize/gimli/macho.rs
@@ -13,8 +13,8 @@ type MachSection = <Mach as MachHeader>::Section;
type MachNlist = <Mach as MachHeader>::Nlist;
impl Mapping {
- // The loading path for OSX is is so different we just have a completely
- // different implementation of the function here. On OSX we need to go
+ // The loading path for macOS is so different we just have a completely
+ // different implementation of the function here. On macOS we need to go
// probing the filesystem for a bunch of files.
pub fn new(path: &Path) -> Option<Mapping> {
// First up we need to load the unique UUID which is stored in the macho
diff --git a/vendor/backtrace/src/symbolize/gimli/parse_running_mmaps_unix.rs b/vendor/backtrace/src/symbolize/gimli/parse_running_mmaps_unix.rs
new file mode 100644
index 000000000..a196ffcfb
--- /dev/null
+++ b/vendor/backtrace/src/symbolize/gimli/parse_running_mmaps_unix.rs
@@ -0,0 +1,242 @@
+// Note: This file is only currently used on targets that call out to the code
+// in `mod libs_dl_iterate_phdr` (e.g. linux, freebsd, ...); it may be more
+// general purpose, but it hasn't been tested elsewhere.
+
+use super::mystd::fs::File;
+use super::mystd::io::Read;
+use super::mystd::str::FromStr;
+use super::{OsString, String, Vec};
+
+#[derive(PartialEq, Eq, Debug)]
+pub(super) struct MapsEntry {
+ /// start (inclusive) and limit (exclusive) of address range.
+ address: (usize, usize),
+ /// The perms field are the permissions for the entry
+ ///
+ /// r = read
+ /// w = write
+ /// x = execute
+ /// s = shared
+ /// p = private (copy on write)
+ perms: [char; 4],
+ /// Offset into the file (or "whatever").
+ offset: usize,
+ /// device (major, minor)
+ dev: (usize, usize),
+ /// inode on the device. 0 indicates that no inode is associated with the memory region (e.g. uninitalized data aka BSS).
+ inode: usize,
+ /// Usually the file backing the mapping.
+ ///
+ /// Note: The man page for proc includes a note about "coordination" by
+ /// using readelf to see the Offset field in ELF program headers. pnkfelix
+ /// is not yet sure if that is intended to be a comment on pathname, or what
+ /// form/purpose such coordination is meant to have.
+ ///
+ /// There are also some pseudo-paths:
+ /// "[stack]": The initial process's (aka main thread's) stack.
+ /// "[stack:<tid>]": a specific thread's stack. (This was only present for a limited range of Linux verisons; it was determined to be too expensive to provide.)
+ /// "[vdso]": Virtual dynamically linked shared object
+ /// "[heap]": The process's heap
+ ///
+ /// The pathname can be blank, which means it is an anonymous mapping
+ /// obtained via mmap.
+ ///
+ /// Newlines in pathname are replaced with an octal escape sequence.
+ ///
+ /// The pathname may have "(deleted)" appended onto it if the file-backed
+ /// path has been deleted.
+ ///
+ /// Note that modifications like the latter two indicated above imply that
+ /// in general the pathname may be ambiguous. (I.e. you cannot tell if the
+ /// denoted filename actually ended with the text "(deleted)", or if that
+ /// was added by the maps rendering.
+ pathname: OsString,
+}
+
+pub(super) fn parse_maps() -> Result<Vec<MapsEntry>, &'static str> {
+ let mut v = Vec::new();
+ let mut proc_self_maps =
+ File::open("/proc/self/maps").map_err(|_| "Couldn't open /proc/self/maps")?;
+ let mut buf = String::new();
+ let _bytes_read = proc_self_maps
+ .read_to_string(&mut buf)
+ .map_err(|_| "Couldn't read /proc/self/maps")?;
+ for line in buf.lines() {
+ v.push(line.parse()?);
+ }
+
+ Ok(v)
+}
+
+impl MapsEntry {
+ pub(super) fn pathname(&self) -> &OsString {
+ &self.pathname
+ }
+
+ pub(super) fn ip_matches(&self, ip: usize) -> bool {
+ self.address.0 <= ip && ip < self.address.1
+ }
+}
+
+impl FromStr for MapsEntry {
+ type Err = &'static str;
+
+ // Format: address perms offset dev inode pathname
+ // e.g.: "ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0 [vsyscall]"
+ // e.g.: "7f5985f46000-7f5985f48000 rw-p 00039000 103:06 76021795 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2"
+ // e.g.: "35b1a21000-35b1a22000 rw-p 00000000 00:00 0"
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
+ let mut parts = s
+ .split(' ') // space-separated fields
+ .filter(|s| s.len() > 0); // multiple spaces implies empty strings that need to be skipped.
+ let range_str = parts.next().ok_or("Couldn't find address")?;
+ let perms_str = parts.next().ok_or("Couldn't find permissions")?;
+ let offset_str = parts.next().ok_or("Couldn't find offset")?;
+ let dev_str = parts.next().ok_or("Couldn't find dev")?;
+ let inode_str = parts.next().ok_or("Couldn't find inode")?;
+ let pathname_str = parts.next().unwrap_or(""); // pathname may be omitted.
+
+ let hex = |s| usize::from_str_radix(s, 16).map_err(|_| "Couldn't parse hex number");
+ let address = {
+ // This could use `range_str.split_once('-')` once the MSRV passes 1.52.
+ if let Some(idx) = range_str.find('-') {
+ let (start, rest) = range_str.split_at(idx);
+ let (_div, limit) = rest.split_at(1);
+ (hex(start)?, hex(limit)?)
+ } else {
+ return Err("Couldn't parse address range");
+ }
+ };
+ let perms: [char; 4] = {
+ let mut chars = perms_str.chars();
+ let mut c = || chars.next().ok_or("insufficient perms");
+ let perms = [c()?, c()?, c()?, c()?];
+ if chars.next().is_some() {
+ return Err("too many perms");
+ }
+ perms
+ };
+ let offset = hex(offset_str)?;
+ let dev = {
+ // This could use `dev_str.split_once(':')` once the MSRV passes 1.52.
+ if let Some(idx) = dev_str.find(':') {
+ let (major, rest) = dev_str.split_at(idx);
+ let (_div, minor) = rest.split_at(1);
+ (hex(major)?, hex(minor)?)
+ } else {
+ return Err("Couldn't parse dev")?;
+ }
+ };
+ let inode = hex(inode_str)?;
+ let pathname = pathname_str.into();
+
+ Ok(MapsEntry {
+ address,
+ perms,
+ offset,
+ dev,
+ inode,
+ pathname,
+ })
+ }
+}
+
+// Make sure we can parse 64-bit sample output if we're on a 64-bit target.
+#[cfg(target_pointer_width = "64")]
+#[test]
+fn check_maps_entry_parsing_64bit() {
+ assert_eq!(
+ "ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0 \
+ [vsyscall]"
+ .parse::<MapsEntry>()
+ .unwrap(),
+ MapsEntry {
+ address: (0xffffffffff600000, 0xffffffffff601000),
+ perms: ['-', '-', 'x', 'p'],
+ offset: 0x00000000,
+ dev: (0x00, 0x00),
+ inode: 0x0,
+ pathname: "[vsyscall]".into(),
+ }
+ );
+
+ assert_eq!(
+ "7f5985f46000-7f5985f48000 rw-p 00039000 103:06 76021795 \
+ /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2"
+ .parse::<MapsEntry>()
+ .unwrap(),
+ MapsEntry {
+ address: (0x7f5985f46000, 0x7f5985f48000),
+ perms: ['r', 'w', '-', 'p'],
+ offset: 0x00039000,
+ dev: (0x103, 0x06),
+ inode: 0x76021795,
+ pathname: "/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2".into(),
+ }
+ );
+ assert_eq!(
+ "35b1a21000-35b1a22000 rw-p 00000000 00:00 0"
+ .parse::<MapsEntry>()
+ .unwrap(),
+ MapsEntry {
+ address: (0x35b1a21000, 0x35b1a22000),
+ perms: ['r', 'w', '-', 'p'],
+ offset: 0x00000000,
+ dev: (0x00, 0x00),
+ inode: 0x0,
+ pathname: Default::default(),
+ }
+ );
+}
+
+// (This output was taken from a 32-bit machine, but will work on any target)
+#[test]
+fn check_maps_entry_parsing_32bit() {
+ /* Example snippet of output:
+ 08056000-08077000 rw-p 00000000 00:00 0 [heap]
+ b7c79000-b7e02000 r--p 00000000 08:01 60662705 /usr/lib/locale/locale-archive
+ b7e02000-b7e03000 rw-p 00000000 00:00 0
+ */
+ assert_eq!(
+ "08056000-08077000 rw-p 00000000 00:00 0 \
+ [heap]"
+ .parse::<MapsEntry>()
+ .unwrap(),
+ MapsEntry {
+ address: (0x08056000, 0x08077000),
+ perms: ['r', 'w', '-', 'p'],
+ offset: 0x00000000,
+ dev: (0x00, 0x00),
+ inode: 0x0,
+ pathname: "[heap]".into(),
+ }
+ );
+
+ assert_eq!(
+ "b7c79000-b7e02000 r--p 00000000 08:01 60662705 \
+ /usr/lib/locale/locale-archive"
+ .parse::<MapsEntry>()
+ .unwrap(),
+ MapsEntry {
+ address: (0xb7c79000, 0xb7e02000),
+ perms: ['r', '-', '-', 'p'],
+ offset: 0x00000000,
+ dev: (0x08, 0x01),
+ inode: 0x60662705,
+ pathname: "/usr/lib/locale/locale-archive".into(),
+ }
+ );
+ assert_eq!(
+ "b7e02000-b7e03000 rw-p 00000000 00:00 0"
+ .parse::<MapsEntry>()
+ .unwrap(),
+ MapsEntry {
+ address: (0xb7e02000, 0xb7e03000),
+ perms: ['r', 'w', '-', 'p'],
+ offset: 0x00000000,
+ dev: (0x00, 0x00),
+ inode: 0x0,
+ pathname: Default::default(),
+ }
+ );
+}
diff --git a/vendor/backtrace/src/windows.rs b/vendor/backtrace/src/windows.rs
index d091874f1..9ec3ba99b 100644
--- a/vendor/backtrace/src/windows.rs
+++ b/vendor/backtrace/src/windows.rs
@@ -162,8 +162,8 @@ macro_rules! ffi {
ffi!($($rest)*);
);
- (extern "system" { $(pub fn $name:ident($($args:tt)*) -> $ret:ty;)* } $($rest:tt)*) => (
- extern "system" {
+ ($(#[$meta:meta])* extern "system" { $(pub fn $name:ident($($args:tt)*) -> $ret:ty;)* } $($rest:tt)*) => (
+ $(#[$meta])* extern "system" {
$(pub fn $name($($args)*) -> $ret;)*
}
@@ -371,6 +371,7 @@ ffi! {
pub type LPCVOID = *const c_void;
pub type LPMODULEENTRY32W = *mut MODULEENTRY32W;
+ #[link(name = "kernel32")]
extern "system" {
pub fn GetCurrentProcess() -> HANDLE;
pub fn GetCurrentThread() -> HANDLE;
@@ -438,6 +439,7 @@ ffi! {
#[cfg(target_pointer_width = "64")]
ffi! {
+ #[link(name = "kernel32")]
extern "system" {
pub fn RtlLookupFunctionEntry(
ControlPc: DWORD64,
diff --git a/vendor/backtrace/tests/common/mod.rs b/vendor/backtrace/tests/common/mod.rs
new file mode 100644
index 000000000..3c07934fd
--- /dev/null
+++ b/vendor/backtrace/tests/common/mod.rs
@@ -0,0 +1,14 @@
+/// Some tests only make sense in contexts where they can re-exec the test
+/// itself. Not all contexts support this, so you can call this method to find
+/// out which case you are in.
+pub fn cannot_reexec_the_test() -> bool {
+ // These run in docker containers on CI where they can't re-exec the test,
+ // so just skip these for CI. No other reason this can't run on those
+ // platforms though.
+ // Miri does not have support for re-execing a file
+ cfg!(unix)
+ && (cfg!(target_arch = "arm")
+ || cfg!(target_arch = "aarch64")
+ || cfg!(target_arch = "s390x"))
+ || cfg!(miri)
+}
diff --git a/vendor/backtrace/tests/concurrent-panics.rs b/vendor/backtrace/tests/concurrent-panics.rs
index 470245cc9..a44a26771 100644
--- a/vendor/backtrace/tests/concurrent-panics.rs
+++ b/vendor/backtrace/tests/concurrent-panics.rs
@@ -9,17 +9,11 @@ const PANICS: usize = 100;
const THREADS: usize = 8;
const VAR: &str = "__THE_TEST_YOU_ARE_LUKE";
+mod common;
+
fn main() {
- // These run in docker containers on CI where they can't re-exec the test,
- // so just skip these for CI. No other reason this can't run on those
- // platforms though.
- // Miri does not have support for re-execing a file
- if cfg!(unix)
- && (cfg!(target_arch = "arm")
- || cfg!(target_arch = "aarch64")
- || cfg!(target_arch = "s390x"))
- || cfg!(miri)
- {
+ // If we cannot re-exec this test, there's no point in trying to do it.
+ if common::cannot_reexec_the_test() {
println!("test result: ok");
return;
}
diff --git a/vendor/backtrace/tests/current-exe-mismatch.rs b/vendor/backtrace/tests/current-exe-mismatch.rs
new file mode 100644
index 000000000..21c67bcbf
--- /dev/null
+++ b/vendor/backtrace/tests/current-exe-mismatch.rs
@@ -0,0 +1,137 @@
+// rust-lang/rust#101913: when you run your program explicitly via `ld.so`,
+// `std::env::current_exe` will return the path of *that* program, and not
+// the Rust program itself.
+
+use std::io::{BufRead, BufReader};
+use std::path::{Path, PathBuf};
+use std::process::Command;
+
+mod common;
+
+fn main() {
+ if std::env::var(VAR).is_err() {
+ // the parent waits for the child; then we then handle either printing
+ // "test result: ok", "test result: ignored", or panicking.
+ match parent() {
+ Ok(()) => {
+ println!("test result: ok");
+ }
+ Err(EarlyExit::IgnoreTest(_)) => {
+ println!("test result: ignored");
+ }
+ Err(EarlyExit::IoError(e)) => {
+ println!("{} parent encoutered IoError: {:?}", file!(), e);
+ panic!();
+ }
+ }
+ } else {
+ // println!("{} running child", file!());
+ child().unwrap();
+ }
+}
+
+const VAR: &str = "__THE_TEST_YOU_ARE_LUKE";
+
+#[derive(Debug)]
+enum EarlyExit {
+ IgnoreTest(String),
+ IoError(std::io::Error),
+}
+
+impl From<std::io::Error> for EarlyExit {
+ fn from(e: std::io::Error) -> Self {
+ EarlyExit::IoError(e)
+ }
+}
+
+fn parent() -> Result<(), EarlyExit> {
+ // If we cannot re-exec this test, there's no point in trying to do it.
+ if common::cannot_reexec_the_test() {
+ return Err(EarlyExit::IgnoreTest("(cannot reexec)".into()));
+ }
+
+ let me = std::env::current_exe().unwrap();
+ let ld_so = find_interpreter(&me)?;
+
+ // use interp to invoke current exe, yielding child test.
+ //
+ // (if you're curious what you might compare this against, you can try
+ // swapping in the below definition for `result`, which is the easy case of
+ // not using the ld.so interpreter directly that Rust handled fine even
+ // prior to resolution of rust-lang/rust#101913.)
+ //
+ // let result = Command::new(me).env(VAR, "1").output()?;
+ let result = Command::new(ld_so).env(VAR, "1").arg(&me).output().unwrap();
+
+ if result.status.success() {
+ return Ok(());
+ }
+ println!("stdout:\n{}", String::from_utf8_lossy(&result.stdout));
+ println!("stderr:\n{}", String::from_utf8_lossy(&result.stderr));
+ println!("code: {}", result.status);
+ panic!();
+}
+
+fn child() -> Result<(), EarlyExit> {
+ let bt = backtrace::Backtrace::new();
+ println!("{:?}", bt);
+
+ let mut found_my_name = false;
+
+ let my_filename = file!();
+ 'frames: for frame in bt.frames() {
+ let symbols = frame.symbols();
+ if symbols.is_empty() {
+ continue;
+ }
+
+ for sym in symbols {
+ if let Some(filename) = sym.filename() {
+ if filename.ends_with(my_filename) {
+ // huzzah!
+ found_my_name = true;
+ break 'frames;
+ }
+ }
+ }
+ }
+
+ assert!(found_my_name);
+
+ Ok(())
+}
+
+// we use the `readelf` command to extract the path to the interpreter requested
+// by our binary.
+//
+// if we cannot `readelf` for some reason, or if we fail to parse its output,
+// then we will just give up on this test (and not treat it as a test failure).
+fn find_interpreter(me: &Path) -> Result<PathBuf, EarlyExit> {
+ let result = Command::new("readelf")
+ .arg("-l")
+ .arg(me)
+ .output()
+ .map_err(|_err| EarlyExit::IgnoreTest("readelf invocation failed".into()))?;
+ if result.status.success() {
+ let r = BufReader::new(&result.stdout[..]);
+ for line in r.lines() {
+ let line = line?;
+ let line = line.trim();
+ let prefix = "[Requesting program interpreter: ";
+ // This could use `line.split_once` and `suffix.rsplit_once` once the MSRV passes 1.52
+ if let Some(idx) = line.find(prefix) {
+ let (_, suffix) = line.split_at(idx + prefix.len());
+ if let Some(idx) = suffix.rfind("]") {
+ let (found_path, _ignore_remainder) = suffix.split_at(idx);
+ return Ok(found_path.into());
+ }
+ }
+ }
+
+ Err(EarlyExit::IgnoreTest(
+ "could not find interpreter from readelf output".into(),
+ ))
+ } else {
+ Err(EarlyExit::IgnoreTest("readelf returned non-success".into()))
+ }
+}
diff --git a/vendor/backtrace/tests/skip_inner_frames.rs b/vendor/backtrace/tests/skip_inner_frames.rs
index 8b57bef52..60bba35e6 100644
--- a/vendor/backtrace/tests/skip_inner_frames.rs
+++ b/vendor/backtrace/tests/skip_inner_frames.rs
@@ -4,7 +4,7 @@ use backtrace::Backtrace;
// function for frames which reports the starting address of a symbol. As a
// result it's only enabled on a few platforms.
const ENABLED: bool = cfg!(all(
- // Windows hasn't really been tested, and OSX doesn't support actually
+ // Windows hasn't really been tested, and macOS doesn't support actually
// finding an enclosing frame, so disable this
target_os = "linux",
// On ARM finding the enclosing function is simply returning the ip itself.