[Migrated] Compiling uom crashes the compiler

Ouverte
#56 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
45/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
rust
Domaine
compilers

Piste de recherche

Reproduisez le crash avec un shader Rust qui dépend de uom v0.36.0, en utilisant comme référence de départ les détails du compilateur et de l’environnement signalés. Commencez dans crates/rustc_codegen_spirv/src/builder/builder_methods.rs, au niveau de recover_access_chain_from_offset, où le backtrace signale une division par zéro. Le travail est terminé lorsque la compilation du shader dépendant de uom ne provoque plus de panic.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/1150
Old labels: t: bug
Originally creatd by JensGM on 2024-05-21T12:17:15Z


Expected Behaviour

Compile doesn't fail

Example & Steps To Reproduce
  1. Write a shader with a dependency on uom

System Info

  • Rust: rustc 1.74.0-nightly (8ce4540bd 2023-09-29)
  • OS: macos 14.5 (23F79)
  • GPU: m1 pro

Backtrace

Updating crates.io index Compiling uom v0.36.0 thread 'rustc' panicked at /Users/jens/sources/rust-gpu/crates/rustc_codegen_spirv/src/builder/builder_methods.rs:521:34: attempt to divide by zero stack backtrace: 0: 0x1052144dc - ::fmt::h8895b8b562a90ee4 1: 0x105267f58 - core::fmt::write::h7a9cc4d1d610bd71 2: 0x10520a08c - std::io::Write::write_fmt::h87ff59bc697656ff 3: 0x10521431c - std::sys_common::backtrace::print::ha692d990665b4a43 4: 0x105216f18 - std::panicking::default_hook::{{closure}}::hf23c7dbcec5e5d80 5: 0x105216c30 - std::panicking::default_hook::h6d5fe0c884e09021 6: 0x10d7596fc - as core[49eafda268333cb]::ops::function::Fn<(&dyn for<'a, 'b> core[49eafda268333cb]::ops::func tion::Fn<(&'a core[49eafda268333cb]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[49eafda268333cb]::marker::Sync + core[49eafda268333cb]::marker::Send, &core[49eafda268333cb]::panic::panic_info::PanicInfo)>>::call 7: 0x10d7596fc - as core[49eafda268333cb]::ops::function::Fn<(&dyn for<'a, 'b> core[49eafda268333cb]::ops::func tion::Fn<(&'a core[49eafda268333cb]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[49eafda268333cb]::marker::Sync + core[49eafda268333cb]::marker::Send, &core[49eafda268333cb]::panic::panic_info::PanicInfo)>>::call 8: 0x1052176b0 - std::panicking::rust_panic_with_hook::h7c3b2a0098acc318 9: 0x10521743c - std::panicking::begin_panic_handler::{{closure}}::h5a56c37d4253c5c6 10: 0x105214968 - std::sys_common::backtrace::__rust_end_short_backtrace::h6240b1fcaf592476 11: 0x1052171e8 - _rust_begin_unwind 12: 0x1052932c0 - core::panicking::panic_fmt::h665dccaf061d2198 13: 0x105293334 - core::panicking::panic::he1ba182bf716bbc2 14: 0x106c7099c - rustc_codegen_spirv::builder::builder_methods::::recover_access_chain_from_offset::he6b0c04ddb3305e7 15: 0x106c76c2c - rustc_codegen_spirv::builder::builder_methods::::pointercast::h9cc3e414ef1f966a 16: 0x106c75fe0 - rustc_codegen_spirv::builder::builder_methods::::bitcast::h95bef7ee067e6e52 17: 0x106c72388 - rustc_codegen_spirv::builder::builder_methods::::ret::hea66e4be1e6f30df 18: 0x106c37b04 - rustc_codegen_ssa::mir::block::>::codegen_terminator::ha5211e4b8b8ed3fc 19: 0x106c34f08 - rustc_codegen_ssa::mir::codegen_mir::h680cf704b650ab2a 20: 0x106cc9080 - rustc_codegen_ssa::base::codegen_instance::hf2c0f9e676c3fe71 21: 0x106c0e9b4 - ::define::hf389f7022ecbfada 22: 0x106c24f6c - ::compile_codegen_unit::{{closure}}::h0218353bb7111ed5 23: 0x106c2491c - ::compile_codegen_unit::h91c26f9a6763dca3 24: 0x106cc8a9c - rustc_codegen_ssa::base::codegen_crate::h54fbe7881ae09c5c 25: 0x106c23ccc - ::codegen_crate::ha25804fa111ed196 26: 0x10d8bb7d4 - ::time::, rustc_interface[698431996f4b6697]::passes::start_codegen::{closur e#0}> 27: 0x10d89dd28 - rustc_interface[698431996f4b6697]::passes::start_codegen 28: 0x10d8bf5e4 - ::enter::<::ongoing_codegen::{closure#0}, core[49eafda268333cb]::result::Result, rustc_span[de8f35f4add29872]::ErrorGuaranteed>> 29: 0x10d88f4a0 - ::ongoing_codegen 30: 0x10d7860b4 - rustc_span[de8f35f4add29872]::set_source_map::, rustc_interface[698431996f4b6697]::interface::run_compiler, rustc_driver_impl[19b3a9f15fe02931]::run_compiler::{closure#1}>::{closure#0}::{closure#0}> 31: 0x10d757618 - std[3254da1c1438db11]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[19b3a9f15fe02931]::run_compiler::{closure#1}>::{closure#0}, core[49eafda268333cb]::result::Result<(), rustc_span[de 8f35f4add29872]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[49eafda268333cb]::result::Result<(), rustc_span[de8f35f4add29872]::ErrorGuaranteed>> 32: 0x10d758738 - <::spawn_unchecked_, rustc_driver_impl[19b3a9f15fe02931]::run_compiler::{closure#1}>::{closure#0}, core[49eafda268333cb]::result::Result<(), rustc_span[de8f35f4add29872]:: ErrorGuaranteed>>::{closure#0}::{closure#0}, core[49eafda268333cb]::result::Result<(), rustc_span[de8f35f4add29872]::ErrorGuaranteed>>::{closure#1} as core[49eafda268333cb]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 33: 0x105220558 - std::sys::unix::thread::Thread::new::thread_start::h86fccd826fc7dcb1 34: 0x197ecaf94 - __pthread_joiner_wake

<backtrace>

Langage dominant
Rust
Étoiles
3.4k
Forks
126
Métriques de merge des PR
Aucune PR mergée en 30 j

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Rust-GPU/rust-gpu

Toutes les issues de Rust-GPU/rust-gpu

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.