Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update linked-hash-map to avoid UB #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

expenses
Copy link

@expenses expenses commented Apr 1, 2021

I've been running into contain-rs/linked-hash-map#106 while trying to get https://github.com/wahn/rs_pbrt. This PR updates linked-hash-map and fixes that issue.

thread 'main' panicked at 'attempted to leave type `linked_hash_map::Node<std::string::String, ply_rs::ply::ElementDef>` uninitialized, which is invalid', /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/core/src/mem/mod.rs:671:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/core/src/panicking.rs:50:5
   3: <linked_hash_map::LinkedHashMap<alloc::string::String,V> as ply_rs::ply::key_map::Addable<V>>::add
   4: rs_pbrt::shapes::plymesh::create_ply_mesh
   5: rs_pbrt::core::api::get_shapes_and_materials
   6: rs_pbrt::core::api::pbrt_shape
   7: rs_pbrt::parse_line
   8: rs_pbrt::parse_file
   9: rs_pbrt::main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant