memory_type causes invalid memory reference

Following error occurs on current master 84baf8e9

$ cargo test memory_type
    Finished test [unoptimized + debuginfo] target(s) in 0.02s
     Running target/debug/deps/accel-adbdda7000766af4

running 1 test
error: test failed, to rerun pass '-p accel --lib'

Caused by:
  process didn't exit successfully: `termoshtt/accel/target/debug/deps/accel-adbdda7000766af4 memory_type` (signal: 11, SIGSEGV: invalid memory reference)

gdb backtrace:

(gdb) where
#0  0x00007ffff6bfb460 in free () from /usr/lib/libc.so.6
#1  0x000055555559c31e in alloc::alloc::dealloc (ptr=0x1d <error: Cannot access memory at address 0x1d>, layout=...) at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/liballoc/alloc.rs:103
#2  0x000055555559c599 in <alloc::alloc::Global as core::alloc::AllocRef>::dealloc (self=0x7ffff5e12050, ptr=..., layout=...) at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/liballoc/alloc.rs:179
#3  0x0000555555571c74 in alloc::raw_vec::RawVec<T,A>::dealloc_buffer (self=0x7ffff5e12050) at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/liballoc/raw_vec.rs:713
#4  0x000055555558222a in <alloc::raw_vec::RawVec<T,A> as core::ops::drop::Drop>::drop (self=0x7ffff5e12050) at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/liballoc/raw_vec.rs:723
#5  0x000055555558189a in core::ptr::drop_in_place () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libcore/ptr/mod.rs:177
#6  0x0000555555581e12 in core::ptr::drop_in_place () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libcore/ptr/mod.rs:177
#7  0x000055555558174a in core::ptr::drop_in_place () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libcore/ptr/mod.rs:177
#8  0x00005555555817ba in core::ptr::drop_in_place () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libcore/ptr/mod.rs:177
#9  0x000055555558139a in core::ptr::drop_in_place () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libcore/ptr/mod.rs:177
#10 0x0000555555581afa in core::ptr::drop_in_place () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libcore/ptr/mod.rs:177
#11 0x0000555555581300 in core::ptr::drop_in_place () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libcore/ptr/mod.rs:177
#12 0x00005555555a2343 in accel::memory::slice::memory_type (ptr=0x7fff7811af30) at accel/src/memory/slice.rs:15
#13 0x00005555555a2463 in accel::memory::slice::<impl accel::memory::Memory for [T]>::memory_type (self=...) at accel/src/memory/slice.rs:32
#14 0x00005555555985b7 in accel::memory::registered::tests::memory_type () at accel/src/memory/registered.rs:144
#15 0x00005555555a0eb1 in accel::memory::registered::tests::memory_type::{{closure}} () at accel/src/memory/registered.rs:138
#16 0x00005555555810fe in core::ops::function::FnOnce::call_once () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libcore/ops/function.rs:232
#17 0x00005555555afa9f in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/liballoc/boxed.rs:1017
#18 0x00005555555fcde7 in __rust_maybe_catch_panic () at src/libpanic_unwind/lib.rs:86
#19 0x00005555555caefc in std::panicking::try () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/panicking.rs:281
#20 std::panic::catch_unwind () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/panic.rs:394
#21 test::run_test_in_process () at src/libtest/lib.rs:542
#22 test::run_test::run_test_inner::{{closure}} () at src/libtest/lib.rs:451
#23 0x00005555555a2cc6 in std::sys_common::backtrace::__rust_begin_short_backtrace () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/sys_common/backtrace.rs:130
#24 0x00005555555a7356 in std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}} () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/thread/mod.rs:475
#25 <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/panic.rs:318
#26 std::panicking::try::do_call () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/panicking.rs:303
#27 0x00005555555fcde7 in __rust_maybe_catch_panic () at src/libpanic_unwind/lib.rs:86
#28 0x00005555555a7e36 in std::panicking::try () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/panicking.rs:281
#29 std::panic::catch_unwind () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/panic.rs:394
#30 std::thread::Builder::spawn_unchecked::{{closure}} () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/thread/mod.rs:474
#31 core::ops::function::FnOnce::call_once{{vtable-shim}} () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libcore/ops/function.rs:232
#32 0x00005555555e96ff in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/liballoc/boxed.rs:1017
#33 0x00005555555fc32d in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once () at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/liballoc/boxed.rs:1017
#34 std::sys_common::thread::start_thread () at src/libstd/sys_common/thread.rs:13
#35 std::sys::unix::thread::Thread::new::thread_start () at src/libstd/sys/unix/thread.rs:80
#36 0x00007ffff6d5946f in start_thread () from /usr/lib/libpthread.so.0
#37 0x00007ffff6c6f3d3 in clone () from /usr/lib/libc.so.6