Skip to content

could not compile tinyvec_macros (lib) #116884

Open
@juhegue

Description

@juhegue

Code

use std::env;
extern crate fernet;
use base64::{Engine as _, engine::{ general_purpose}};
use webbrowser;

fn main() {
    let diagram_url = "https://???/login/?param=";

    let args: Vec<String> = env::args().collect();
    let query = &args[1];
    let query_bytes = query.as_bytes();

    let keyb64_fernet = "TGF4Yko0REswOTZYZ2dlMzVjUHduMTFiOENMRzVyRVBFQ3paWG5vOWJDZz1=";
    let key_bytes = general_purpose::STANDARD.decode(keyb64_fernet).unwrap();
    let key_str = String::from_utf8_lossy(&key_bytes);

    let fernet = fernet::Fernet::new(&key_str).unwrap();
    let encripta = fernet.encrypt(query_bytes);

    let url = diagram_url.to_string() + &encripta;

    if webbrowser::open(&url).is_ok() {
        println!("Resultado {}", encripta);
    }

}

Meta

rustc --version --verbose:

rustc 1.73.0 (cc66ad468 2023-10-03)
binary: rustc
commit-hash: cc66ad468955717ab92600c770da8c1601a4ff33
commit-date: 2023-10-03
host: x86_64-pc-windows-msvc
release: 1.73.0
LLVM version: 17.0.2

Error output

   Compiling libc v0.2.149
   Compiling tinyvec_macros v0.1.1
   Compiling quote v1.0.33
   Compiling openssl-sys v0.9.93
thread 'rustc' panicked at library\std\src\sys\windows\fs.rs:755:35:
range start index 3007317840 out of range for slice of length 1024
stack backtrace:
   0:     0x7ffd0e06738a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h90c22c4185b55f04
   1:     0x7ffd0e09bb5b - core::fmt::write::h8a7f6edbcadee319
   2:     0x7ffd0e05cc51 - <std::io::IoSlice as core::fmt::Debug>::fmt::h0ee392ef0f96e369
   3:     0x7ffd0e06710a - std::sys_common::backtrace::lock::h134eeaadb35136bd
   4:     0x7ffd0e06a8ca - std::panicking::default_hook::h81d7caaa8c7a40b4
   5:     0x7ffd0e06a538 - std::panicking::default_hook::h81d7caaa8c7a40b4
   6:     0x7ffd09d5d77e - <tracing_subscriber[610e65fa1e67acd7]::fmt::format::Writer>::write_fmt
   7:     0x7ffd0e06b1cc - std::panicking::rust_panic_with_hook::h8ac326f3b5470b08
   8:     0x7ffd0e06af2d - <std::panicking::begin_panic_handler::StrPanicPayload as core::panic::BoxMeUp>::get::h353ca2f9698f73b3
   9:     0x7ffd0e068049 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h90c22c4185b55f04
  10:     0x7ffd0e06ac30 - rust_begin_unwind
  11:     0x7ffd0e0d0d85 - core::panicking::panic_fmt::hb3ce2a19a4187054
  12:     0x7ffd0e0d135e - core::slice::index::slice_start_index_len_fail::h86b47891f8dd95ba
  13:     0x7ffd0e06e8d6 - <std::sys::windows::fs::DirBuffIter as core::iter::traits::iterator::Iterator>::next::hd7e7eb19c04ea820
  14:     0x7ffd0e06e87a - <std::sys::windows::fs::DirBuffIter as core::iter::traits::iterator::Iterator>::next::hd7e7eb19c04ea820
  15:     0x7ffd0e06f7e1 - std::sys::windows::fs::remove_dir_all::h7f6d25082f9d4430
  16:     0x7ffd0e06f602 - std::sys::windows::fs::remove_dir_all::h7f6d25082f9d4430
  17:     0x7ffd08db92c3 - <tempfile[8a39d29b4d3835b0]::dir::TempDir as core[480aa84f3feba9e5]::ops::drop::Drop>::drop
  18:     0x7ffd08db8bb1 - <rustc_data_structures[9f05cc024462a48]::temp_dir::MaybeTempDir as core[480aa84f3feba9e5]::ops::drop::Drop>::drop
  19:     0x7ffd08b16ff2 - rustc_metadata[339fe35ba62c3205]::fs::encode_and_write_metadata
  20:     0x7ffd05f82803 - rustc_interface[1fce9354a182ed1c]::passes::start_codegen
  21:     0x7ffd05f74a38 - <rustc_interface[1fce9354a182ed1c]::queries::Linker>::link
  22:     0x7ffd05f6fb05 - <rustc_interface[1fce9354a182ed1c]::queries::Queries>::ongoing_codegen
  23:     0x7ffd05f3bda1 - <rustc_middle[b5332b31642963de]::ty::SymbolName as core[480aa84f3feba9e5]::fmt::Debug>::fmt
  24:     0x7ffd05f391c6 - <rustc_middle[b5332b31642963de]::ty::SymbolName as core[480aa84f3feba9e5]::fmt::Debug>::fmt
  25:     0x7ffd05f3a806 - <rustc_middle[b5332b31642963de]::ty::SymbolName as core[480aa84f3feba9e5]::fmt::Debug>::fmt
  26:     0x7ffd0e07e3ec - std::sys::windows::thread::Thread::new::h75a9ed52a5af2748
  27:     0x7ffd578f7614 - BaseThreadInitThunk
  28:     0x7ffd594626a1 - RtlUserThreadStart

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.73.0 (cc66ad468 2023-10-03) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `tinyvec_macros` (lib)
warning: build failed, waiting for other jobs to finish...
Backtrace

<backtrace>

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️O-windowsOperating system: WindowsO-windows-7OS: Windows 7 or Windows Server 2008 R2 or etc.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions