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

Rust 1.19 regression, euclid 0.10.5, SIGSEGV #42459

Closed
brson opened this issue Jun 6, 2017 · 9 comments
Closed

Rust 1.19 regression, euclid 0.10.5, SIGSEGV #42459

brson opened this issue Jun 6, 2017 · 9 comments
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.

Comments

@brson
Copy link
Contributor

brson commented Jun 6, 2017

https://github.com/servo/euclid

commit 8947756ff1436df5cf2cb291e6502fd902ad5fce
Merge: 7097fcb fda90dc
Author: bors-servo <lbergstrom+bors@mozilla.com>
Date:   Fri Jan 27 02:54:00 2017 -0800

    Auto merge of #174 - nox:bump, r=SimonSapin

    Bump version to 0.10.5

    Some .swp files were included in the package on Cargo.

    <!-- Reviewable:start -->
    ---
    This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/174)
    <!-- Reviewable:end -->

brian@ip-10-145-43-250:/mnt2/dev⟫ rustc +nightly -Vv
rustc 1.19.0-nightly (0418fa9d3 2017-06-04)
binary: rustc
commit-hash: 0418fa9d382a47d782cc1e195c14573be9c32095
commit-date: 2017-06-04
host: x86_64-unknown-linux-gnu
release: 1.19.0-nightly
LLVM version: 4.0
141 brian@ip-10-145-43-250:~/dev/euclid⟫ cargo +nightly test
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running target/debug/deps/euclid-be4e9b9314cd979d

running 77 tests
test length::tests::test_add ... ok
test length::tests::test_cast ... ok
test length::tests::test_addassign ... ok
test length::tests::test_clone ... ok
test length::tests::test_division_by_length ... ok
test length::tests::test_fmt_debug ... ok
test length::tests::test_division_by_scalefactor ... ok
test length::tests::test_get_clones_length_value ... ok
test length::tests::test_fmt_display ... ok
test length::tests::test_equality ... ok
error: process didn't exit successfully: `/mnt2/dev/euclid/target/debug/deps/euclid-be4e9b9314cd979d` (signal: 11, SIGSEGV: invalid memory reference)

To learn more, run the command again with --verbose.

cc @pcwalton @SimonSapin

@brson brson added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Jun 6, 2017
@brson
Copy link
Contributor Author

brson commented Jun 6, 2017

I also see a sigsegv in heapsize 0.3.9.

@brson
Copy link
Contributor Author

brson commented Jun 6, 2017

Oh this is repr(C) bugs.

@brson brson closed this as completed Jun 6, 2017
@brson
Copy link
Contributor Author

brson commented Jun 6, 2017

Actually, no, I don't know what this is.

@brson brson reopened this Jun 6, 2017
@brson
Copy link
Contributor Author

brson commented Jun 6, 2017

Heapsize has a PR to fix this re a change in the empty vector representation: servo/heapsize#81

@brson
Copy link
Contributor Author

brson commented Jun 6, 2017

What PR caused this change to the size of Vec?

@brson brson changed the title Rust 1.19 regression, euclid 0.10.5, SIGSIGV Rust 1.19 regression, euclid 0.10.5, SIGSEGV Jun 6, 2017
@Mark-Simulacrum
Copy link
Member

42a4f37 - #41773; though I don't see anything obvious in there... not sure.

@Mark-Simulacrum
Copy link
Member

Looks like this will indeed be fixed by the heapsize PR.

#0  malloc_usable_size (ptr=<optimized out>) at /checkout/src/liballoc_jemalloc/../jemalloc/include/jemalloc/internal/arena.h:743
#1  0x00005614c6ee2bdd in heapsize::heap_size_of_impl (ptr=0x4) at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/heapsize-0.3.9/src/lib.rs:50
#2  0x00005614c6ee2ba4 in heapsize::heap_size_of (ptr=0x4) at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/heapsize-0.3.9/src/lib.rs:36
#3  0x00005614c6ebd0e4 in heapsize::{{impl}}::heap_size_of_children<f32> (self=0x7f2bae3fe4d0) at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/heapsize-0.3.9/src/lib.rs:234
#4  0x00005614c6ec30fd in euclid::length::{{impl}}::heap_size_of_children<euclid::length::tests::Inch,collections::vec::Vec<f32>> (self=0x7f2bae3fe4d0) at src/length.rs:49
#5  0x00005614c6ec4bd4 in euclid::length::tests::test_heapsizeof_length_vector () at src/length.rs:244
#6  0x00005614c6ef81dc in test::run_test::{{closure}} () at /checkout/src/libtest/lib.rs:1430
#7  core::ops::FnOnce::call_once<closure,(())> () at /checkout/src/libcore/ops.rs:2626
#8  test::{{impl}}::call_box<(),closure> () at /checkout/src/libtest/lib.rs:140
#9  0x00005614c6f3965b in panic_unwind::__rust_maybe_catch_panic () at /checkout/src/libpanic_unwind/lib.rs:98
#10 0x00005614c6eea684 in std::panicking::try<(),std::panic::AssertUnwindSafe<closure>> () at /checkout/src/libstd/panicking.rs:433
#11 std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure>,()> () at /checkout/src/libstd/panic.rs:361
#12 test::run_test::run_test_inner::{{closure}} () at /checkout/src/libtest/lib.rs:1375
#13 std::panic::{{impl}}::call_once<(),closure> () at /checkout/src/libstd/panic.rs:296
#14 std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure>,()> () at /checkout/src/libstd/panicking.rs:454
#15 0x00005614c6f3965b in panic_unwind::__rust_maybe_catch_panic () at /checkout/src/libpanic_unwind/lib.rs:98
#16 0x00005614c6ef258d in std::panicking::try<(),std::panic::AssertUnwindSafe<closure>> () at /checkout/src/libstd/panicking.rs:433
#17 std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure>,()> () at /checkout/src/libstd/panic.rs:361
#18 std::thread::{{impl}}::spawn::{{closure}}<closure,()> () at /checkout/src/libstd/thread/mod.rs:361
#19 alloc::boxed::{{impl}}::call_box<(),closure> () at /checkout/src/liballoc/boxed.rs:648
#20 0x00005614c6f31386 in alloc::boxed::{{impl}}::call_once<(),()> () at /checkout/src/liballoc/boxed.rs:658
#21 std::sys_common::thread::start_thread () at /checkout/src/libstd/sys_common/thread.rs:21
#22 std::sys::imp::thread::{{impl}}::new::thread_start () at /checkout/src/libstd/sys/unix/thread.rs:84
#23 0x00007f2bb148d6ba in start_thread (arg=0x7f2bae3ff700) at pthread_create.c:333
#24 0x00007f2bb0fad82d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

@SimonSapin
Copy link
Contributor

#41064 in src/liballoc/heap.rs changed pointer used for zero-size allocations. heapsize could not use alloc::heap::EMPTY directly since alloc is #[unstable], so instead it used ptr == 1 as *mut ().

@brson
Copy link
Contributor Author

brson commented Jun 15, 2017

Expected breakage. Closing.

@brson brson closed this as completed Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
Development

No branches or pull requests

3 participants