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

No more deny warnings #172

Closed
wants to merge 4 commits into from
Closed

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Dec 29, 2016

Fix issues that came up in #171

@fitzgen
Copy link
Member Author

fitzgen commented Dec 29, 2016

https://travis-ci.org/gimli-rs/gimli/jobs/187342334#L1117

thread 'main' panicked at 'slice index starts at 1685382481 but ends at 2412039', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/slice.rs:566

note: Run with `RUST_BACKTRACE=1` for a backtrace.

@fitzgen
Copy link
Member Author

fitzgen commented Dec 29, 2016

thread 'main' panicked at 'slice index starts at 1685382481 but ends at 2433790', /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libcore/slice.rs:566

stack backtrace:

   1:     0x558c896ef75a - std::sys::imp::backtrace::tracing::imp::write::hc924c01e14fdf084

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42

   2:     0x558c896f1bcf - std::panicking::default_hook::{{closure}}::h3c7e4ff009c61db6

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:349

   3:     0x558c896f17ce - std::panicking::default_hook::h4684c234c8ae64c1

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:365

   4:     0x558c896f1fb7 - std::panicking::rust_panic_with_hook::h03d5a3ece8e80bc6

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:553

   5:     0x558c896f1df4 - std::panicking::begin_panic::h0677966daa264bb1

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:515

   6:     0x558c896f1d69 - std::panicking::begin_panic_fmt::h985557b20ef9321d

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:499

   7:     0x558c896f1cf7 - rust_begin_unwind

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:475

   8:     0x558c8971d31d - core::panicking::panic_fmt::hfdbff8726282b4dd

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libcore/panicking.rs:69

   9:     0x558c8971d469 - core::slice::slice_index_order_fail::he7e383768a6555e3

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libcore/slice.rs:566

  10:     0x558c8971a118 - <core::ops::Range<usize> as core::slice::SliceIndex<T>>::index::hcc27c53749bb1736

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libcore/slice.rs:689

  11:     0x558c8971a2b0 - <core::ops::RangeFrom<usize> as core::slice::SliceIndex<T>>::index::h3bae3d0a8ac449bb

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libcore/slice.rs:772

  12:     0x558c8971966b - core::slice::<impl core::ops::Index<I> for [T]>::index::hb198a2b34bdb4402

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libcore/slice.rs:542

  13:     0x558c8971b533 - xmas_elf::ElfFile::get_string::{{closure}}::hd167b5a13a4513f4

                        at /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/xmas-elf-0.3.0/src/lib.rs:72

  14:     0x558c897188aa - <core::result::Result<T, E>>::map::h8acb43fa45eb144f

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libcore/result.rs:465

  15:     0x558c8971b4d1 - xmas_elf::ElfFile::get_string::hada1532d5759a6c4

                        at /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/xmas-elf-0.3.0/src/lib.rs:72

  16:     0x558c8971ad00 - xmas_elf::sections::SectionHeader::get_name::{{closure}}::he56ef79d7e4f9e10

                        at /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/xmas-elf-0.3.0/src/sections.rs:92

  17:     0x558c89718f31 - <core::result::Result<T, E>>::and_then::h3845e839fef17db0

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libcore/result.rs:601

  18:     0x558c8971ac48 - xmas_elf::sections::SectionHeader::get_name::h59741595b7c49bed

                        at /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/xmas-elf-0.3.0/src/sections.rs:90

  19:     0x558c8971b69b - xmas_elf::ElfFile::find_section_by_name::h33dd386a9d13fd4a

                        at /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/xmas-elf-0.3.0/src/lib.rs:84

  20:     0x558c896e610b - <object::elf::Elf<'a> as object::object_trait::Object<'a>>::get_section::h01fa021d0d8efcf0

                        at /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.1.0/src/elf.rs:13

  21:     0x558c8969a719 - dwarfdump::dump_file::hb107e239d82cf632

                        at /home/travis/build/gimli-rs/gimli/examples/dwarfdump.rs:92

  22:     0x558c8969a435 - dwarfdump::main::h50eec4b16ac86ec8

                        at /home/travis/build/gimli-rs/gimli/examples/dwarfdump.rs:82

  23:     0x558c896f8e4a - __rust_maybe_catch_panic

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98

  24:     0x558c896f26f6 - std::rt::lang_start::h69a3cd6c3be2ae5e

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panicking.rs:434

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/panic.rs:351

                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libstd/rt.rs:57

  25:     0x558c896b1ae2 - main

  26:     0x7f934ef787ec - __libc_start_main

  27:     0x558c896145b8 - <unknown>

@fitzgen
Copy link
Member Author

fitzgen commented Dec 29, 2016

This is a panic originating within xmas-elf, where the index for a section's name is outside of the elf file's string table.

@fitzgen
Copy link
Member Author

fitzgen commented Dec 29, 2016

Frustratingly enough, I can't reproduce this locally.

@fitzgen
Copy link
Member Author

fitzgen commented Dec 29, 2016

Interesting: we end up having many gimli-abcdefg files in target/debug. I guess one for cargo build and another for cargo test, and I'm not sure what else.

@fitzgen
Copy link
Member Author

fitzgen commented Dec 29, 2016

@philipc what do you think about disabling the dwarfdump smoke test in CI? :-/

It seems like a proper workaround would be to either

  • Fix the root cause in xmas-elf. I'm not terribly eager to do this. Additionally, it seems like it isn't being maintained a ton.

  • Port away to some other elf library. There doesn't seem to be anything else on crates.io that is zero copy, which is a bummer. Maybe we should contribute to goblin long-term (instead of object), which seems to have active development and might let us get away with maintaining less code ourselves.

Don't have time at the moment for either of those.

@philipc
Copy link
Collaborator

philipc commented Dec 29, 2016

Disabling dwarfdump is fine as a temporary workaround.

I've looked into xmas-elf a little, and it has a few bugs that have been exposed by the beta/nightly compilers: its usage of Pod is invalid, and it's missing at least one repr(C).

goblin might be a suitable replacement for the current usage. I don't like that it's not zero-copy, but that doesn't really matter for the dwarfdump example.

@philipc
Copy link
Collaborator

philipc commented Dec 29, 2016

I've opened a xmas-elf PR that fixes the dwarfdump test for me.

@fitzgen
Copy link
Member Author

fitzgen commented Dec 29, 2016

I've opened a xmas-elf PR that fixes the dwarfdump test for me.

\o/ awesome thanks!

@fitzgen
Copy link
Member Author

fitzgen commented Jan 5, 2017

Closed in favor of #173

@fitzgen fitzgen closed this Jan 5, 2017
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.

2 participants