Repository navigation
local directories are leaked to binary #185
Copy link
Copy link
Open
Description
Activity
Is this possibly a Rust issue when depending on a crate? I get the following for a completely unrelated Rust binary.
cd /tmp git clone https://github.com/blahgeek/emacs-lsp-booster.git cd emacs-lsp-booster cargo build --release strings target/release/emacs-lsp-booster | rg $USER
Fatal internal error. Please consider filing a bug report at https://github.com/clap-rs/clap/issues/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/parser/matches/arg_matches.rs/builddir/build/BUILD/rustc-1.80.1-src/library/std/src/io/mod.rsstream did not contain valid UTF-8failed to fill whole buffer/builddir/build/BUILD/rustc-1.80.1-src/library/core/src/ops/function.rsdescription() is deprecated; use DisplayFromUtf8Errorbyteserrorinvalid utf-8ParseIntErrorkindcodeNoneSomehelpZeroautoTERMdumbbluecyan#[0 sizeunitenum or i128u128Unix /home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/util/flat_map.rsinternal error: entered unreachable code/builddir/build/BUILD/rustc-1.80.1-src/library/std/src/sync/mpmc/zero.rs/builddir/build/BUILD/rustc-1.80.1-src/library/std/src/sync/mpmc/waker.rs/builddir/build/BUILD/rustc-1.80.1-src/library/std/src/sync/mpmc/context.rscalled `Result::unwrap()` on an `Err` value internal error: entered unreachable code/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.108/src/ser.rs\"\\\b\f\n\r\tmessagejsonrpcidmethodparamsresulterror00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 internal error: entered unreachable code/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.108/src/de.rsjsonrpcidmethodparamsstruct LspRequest with 4 elements /home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/builder/ext.rs internal error: entered unreachable code/builddir/build/BUILD/rustc-1.80.1-src/library/std/src/sync/mpmc/array.rs/builddir/build/BUILD/rustc-1.80.1-src/library/std/src/sync/mpmc/waker.rscalled `Result::unwrap()` on an `Err` valuePoisonErrorMismatch between definition and access of ``. /home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/parser/error.rs/builddir/build/BUILD/rustc-1.80.1-src/library/alloc/src/collections/btree/map/entry.rs/builddir/build/BUILD/rustc-1.80.1-src/library/alloc/src/collections/btree/node.rsassertion failed: edge.height == self.height - 1assertion failed: src.len() == dst.len()assertion failed: edge.height == self.node.height - 1internal error: entered unreachable code/builddir/build/BUILD/rustc-1.80.1-src/library/std/src/sync/mpmc/mod.rs/builddir/build/BUILD/rustc-1.80.1-src/library/std/src/sync/mpmc/list.rs/builddir/build/BUILD/rustc-1.80.1-src/library/std/src/sync/mpmc/waker.rscalled `Result::unwrap()` on an `Err` value SetLoggerError/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/env_logger-0.10.1/src/lib.rs Builder::init should not be called after logger initializedattempt to re-use consumed buildercalled `Result::unwrap()` on an `Err` value/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/env_logger-0.10.1/src/fmt/writer/termcolor/extern_impl.rsregex: thread ID allocation space exhausted/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/regex-automata-0.4.3/src/util/pool.rs/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/env_logger-0.10.1/src/filter/mod.rsattempt to re-use consumed builder internal error: entered unreachable code/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/termcolor-1.4.0/src/lib.rsattempt to re-use consumed builder/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/env_logger-0.10.1/src/fmt/writer/mod.rs failed to write whole buffer/builddir/build/BUILD/rustc-1.80.1-src/library/std/src/io/mod.rsa formatting trait implementation returned an error when the underlying stream did not/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/env_logger-0.10.1/src/fmt/mod.rs failed to write the buffered dataIndex out of bounds/builddir/build/BUILD/rustc-1.80.1-src/library/core/src/slice/sort.rsassertion failed: end >= start && end <= lenassertion failed: offset != 0 && offset <= len/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/regex-automata-0.4.3/src/util/pool.rs()PoisonError/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/regex-automata-0.4.3/src/util/pool.rs failed to write whole buffer/builddir/build/BUILD/rustc-1.80.1-src/library/std/src/io/mod.rscannot lock a buffered standard stream/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/termcolor-1.4.0/src/lib.rs SystemTimeErrorUtf8Errorvalid_up_toerror_len/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/humantime-2.1.0/src/date.rsall times should be after the epochConversion to utf8 failed a Display implementation returned an error unexpectedly/builddir/build/BUILD/rustc-1.80.1-src/library/alloc/src/string.rsError/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smallvec-1.11.2/src/lib.rsassertion failed: index <= len:Supported LispObject: src/bytecode.rs\a\b\t\n\v\f\r\d\e\ \\^ []Too many constants! not implementedinternal error: entered unreachable codeassertion failed: chunks_len < (1 << 16)no entry found for keyIndex out of bounds/builddir/build/BUILD/rustc-1.80.1-src/library/core/src/slice/sort.rsassertion failed: end >= start && end <= lenassertion failed: offset != 0 && offset <= len called `Result::unwrap()` on an `Err` valueCapacityOverflow1 element in map elements in map`start` or `end`floating point `layout/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smallvec-1.11.2/src/lib.rscapacity overflow a Display implementation returned an error unexpectedly/builddir/build/BUILD/rustc-1.80.1-src/library/alloc/src/string.rs/builddir/build/BUILD/rustc-1.80.1-src/library/core/src/str/pattern.rsErrorassertion failed: self.is_char_boundary(new_len)EOF while parsing a listEOF while parsing an objectEOF while parsing a stringEOF while parsing a valueexpected `:`expected `,` or `]`expected `,` or `}`expected identexpected valueexpected `"`invalid escapeinvalid numbernumber out of rangeinvalid unicode code pointcontrol character (\u0000-\u001F) found while parsing a stringkey must be a stringinvalid value: expected key to be a number in quotesfloat key must be finite (got NaN or +/-inf)lone leading surrogate in hex escapetrailing commatrailing charactersunexpected end of hex escaperecursion limit exceeded at line Error(, column: )invalid type: null, expected invalid type: , expected /home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.108/src/error.rs0123456789abcdefuuuuuuuubtnufruuuuuuuuuuuuuuuuuu /home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.108/src/read.rs a Display implementation returned an error unexpectedly/builddir/build/BUILD/rustc-1.80.1-src/library/alloc/src/string.rscalled `Result::unwrap()` on an `Err` valueError/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/builder/command.rs |--|-{} false0/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/builder/arg.rs Fatal internal error. Please consider filing a bug report at https://github.com/clap-rs/clap/issues--- [=[= ...][<>/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/builder/ext.rs/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/parser/arg_matcher.rs a Display implementation returned an error unexpectedly/builddir/build/BUILD/rustc-1.80.1-src/library/alloc/src/string.rsErrorFatal internal error. Please consider filing a bug report at https://github.com/clap-rs/clap/issues/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/parser/matches/matched_arg.rs/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/mkeymap.rsCOMMAND Usage: <>[OPTIONS][]/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/output/usage.rs--[-- ()/builddir/build/BUILD/rustc-1.80.1-src/library/core/src/str/pattern.rsmid > len/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anstream-0.6.5/src/adapter/strip.rs/builddir/build/BUILD/rustc-1.80.1-src/library/core/src/str/mod.rs Mismatch between definition and access of ``. /home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/parser/error.rsCould not downcast to , need to downcast to Unknown argument or group id. Make sure you are using the argument id and not the short or long flags /home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/parser/matches/arg_matches.rsFatal internal error. Please consider filing a bug report at https://github.com/clap-rs/clap/issues/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/util/flat_map.rs a Display implementation returned an error unexpectedly/builddir/build/BUILD/rustc-1.80.1-src/library/alloc/src/string.rsError/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/parser/validator.rsFatal internal error. Please consider filing a bug report at https://github.com/clap-rs/clap/issues/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/builder/arg.rs/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/util/graph.rs /home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/error/mod.rsto pass '' as a value, use ''-- subcommand '' exists; to use it, remove the '--' before itinnerTypeIdta Display implementation returned an error unexpectedly/builddir/build/BUILD/rustc-1.80.1-src/library/alloc/src/string.rsErrorEmptyInvalidDigitPosOverflowNegOverflowParseIntErrorcannot parse integer from empty stringinvalid digit found in stringnumber too large to fit in target typenumber too small to fit in target typenumber would be zero for non-zero typeTryFromIntErrorout of range integral type conversion attempted is not in false :ArgumentsOptions, -- Only called with possible value/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/output/help_template.rs a Display implementation returned an error unexpectedly/builddir/build/BUILD/rustc-1.80.1-src/library/alloc/src/string.rsErrorinternal error: entered unreachable code/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/parser/parser.rsinternal error: entered unreachable code: `to_long` always has the flag specifiedFatal internal error. Please consider filing a bug report at https://github.com/clap-rs/clap/issues=-/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.12/src/builder/arg.rs false--<>/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs mid > len/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anstream-0.6.5/src/adapter/strip.rs CLICOLOR_FORCECImid > len/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_lex-0.6.0/src/ext.rscalled `Result::unwrap()` on an `Err` valueUtf8Errorvalid_up_toerror_len/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_lex-0.6.0/src/lib.rs [58;2;/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anstyle-1.0.4/src/color.rs OFFERRORDEBUGTRACEkey-value support is experimental and must be enabled using the `kv_unstable` feature/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/log-0.4.20/src/__private_api.rs/builddir/build/BUILD/rustc-1.80.1-src/library/core/src/slice/index.rsassertion failed: self.is_char_boundary(n)/builddir/build/BUILD/rustc-1.80.1-src/library/alloc/src/string.rs/builddir/build/BUILD/rustc-1.80.1-src/library/alloc/src/vec/mod.rs: a Display implementation returned an error unexpectedly/builddir/build/BUILD/rustc-1.80.1-src/library/alloc/src/string.rsErrorassertion failed: self.is_char_boundary(new_len)backtrace capture failed/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anyhow-1.0.78/src/error.rs:
Metadata
Metadata
Assignees
Labels
No labels
Details
system: pop-os 22.04
cargo version: cargo 1.70.0 (ec8a8a0ca 2023-04-25)
jack version: 0.11.4
Description
I found by peeking inside the compiled binary for my files that my full user path is exposed in several places. This also happens when building in
--releasemode.I understand these could be present in the debug build but should probably not be there in the release build.
I believe it's a jack problem as I don't have this issue with other libraries.
Reproduce
cargo new <project-name> && cd <project-name> && cargo add jackmain.rs.cargo build --releasestrings target/release/<project-name> | grep <username>Examples
Here are the lines I found in my executable. (username replaced)