Skip to content

Instantly share code, notes, and snippets.

@thejpster
Created June 17, 2018 17:27
Show Gist options
  • Save thejpster/90989e6ed1208cf819de4d9783a730f4 to your computer and use it in GitHub Desktop.
Save thejpster/90989e6ed1208cf819de4d9783a730f4 to your computer and use it in GitHub Desktop.
Backtrace from infinite loop in nom test
>>> bt
#0 0x000055f4cab65267 in core::ptr::<impl *const T>::offset_from (self=0x55f4cabb613e " \"test\"\"test\" \"te\\\"st \" te\\\"st \nlet x = 123;\nlet y = foo(x);\nif y > x {\n baz(true);\n} else {\n bar(false);\n}\nreturn 0x200;\n yfoobazbar\000", origin=0x55f4cabb613d "\" \"test\"\"test\" \"te\\\"st \" te\\\"st \nlet x = 123;\nlet y = foo(x);\nif y > x {\n baz(true);\n} else {\n bar(false);\n}\nreturn 0x200;\n yfoobazbar\000") at /checkout/src/libcore/ptr.rs:774
#1 0x000055f4cab64570 in core::slice::ptrdistance (start=0x55f4cabb613d "\" \"test\"\"test\" \"te\\\"st \" te\\\"st \nlet x = 123;\nlet y = foo(x);\nif y > x {\n baz(true);\n} else {\n bar(false);\n}\nreturn 0x200;\n yfoobazbar\000", end=0x55f4cabb613e " \"test\"\"test\" \"te\\\"st \" te\\\"st \nlet x = 123;\nlet y = foo(x);\nif y > x {\n baz(true);\n} else {\n bar(false);\n}\nreturn 0x200;\n yfoobazbar\000") at /checkout/src/libcore/slice/mod.rs:3075
#2 <core::slice::Iter<'a, T> as core::iter::iterator::Iterator>::size_hint (self=0x7fe7e27fd348) at /checkout/src/libcore/slice/mod.rs:2663
#3 0x000055f4cab63f71 in core::iter::traits::ExactSizeIterator::len (self=0x7fe7e27fd348) at /checkout/src/libcore/iter/traits.rs:680
#4 0x000055f4cab1bab7 in <core::str::CharIndices<'a> as core::iter::iterator::Iterator>::next (self=0x7fe7e27fd340) at /checkout/src/libcore/str/mod.rs:697
#5 0x000055f4cab1c71a in <&'a str as nom::traits::InputIter>::position (self=0x7fe7e27fd558, predicate=...) at /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-4.0.0/src/traits.rs:416
#6 0x000055f4cab08043 in <nom::types::CompleteStr<'a> as nom::traits::InputIter>::position (self=0x7fe7e27fd558, predicate=...) at /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-4.0.0/src/types.rs:103
#7 0x000055f4cab0a0ad in monotronian::lexer::string_literal::{{closure}}::{{closure}} () at <escaped macros>:11
#8 0x000055f4cab09784 in monotronian::lexer::string_literal::{{closure}} () at <tuple_parser macros>:11
#9 0x000055f4caafe44b in <core::result::Result<T, E>>::and_then (self=..., op=...) at /checkout/src/libcore/result.rs:621
#10 0x000055f4cab1a25a in monotronian::lexer::string_literal (i=...) at <named macros>:13
#11 0x000055f4cab0bb20 in monotronian::lexer::Lexer::lex_tokens (input=...) at src/lexer/mod.rs:203
#12 0x000055f4cab052c8 in monotronian::lexer::test::strings () at src/lexer/mod.rs:335
#13 0x000055f4cab1b01a in monotronian::__test::TESTS::{{closure}} () at src/lexer/mod.rs:333
#14 0x000055f4cab0026e in core::ops::function::FnOnce::call_once () at /checkout/src/libcore/ops/function.rs:223
#15 0x000055f4cab1f1df in test::run_test::{{closure}} () at libtest/lib.rs:1451
#16 core::ops::function::FnOnce::call_once () at /checkout/src/libcore/ops/function.rs:223
#17 <F as alloc::boxed::FnBox<A>>::call_box () at /checkout/src/liballoc/boxed.rs:638
#18 0x000055f4cab843ba in __rust_maybe_catch_panic () at libpanic_unwind/lib.rs:105
#19 0x000055f4cab3357e in std::panicking::try () at /checkout/src/libstd/panicking.rs:289
#20 std::panic::catch_unwind () at /checkout/src/libstd/panic.rs:374
#21 test::run_test::run_test_inner::{{closure}} () at libtest/lib.rs:1406
#22 std::sys_common::backtrace::__rust_begin_short_backtrace () at /checkout/src/libstd/sys_common/backtrace.rs:136
#23 0x000055f4cab4a7c5 in std::thread::Builder::spawn::{{closure}}::{{closure}} () at /checkout/src/libstd/thread/mod.rs:409
#24 <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once () at /checkout/src/libstd/panic.rs:305
#25 std::panicking::try::do_call () at /checkout/src/libstd/panicking.rs:310
#26 0x000055f4cab843ba in __rust_maybe_catch_panic () at libpanic_unwind/lib.rs:105
#27 0x000055f4cab34fb7 in std::panicking::try () at /checkout/src/libstd/panicking.rs:289
#28 std::panic::catch_unwind () at /checkout/src/libstd/panic.rs:374
#29 std::thread::Builder::spawn::{{closure}} () at /checkout/src/libstd/thread/mod.rs:408
#30 <F as alloc::boxed::FnBox<A>>::call_box () at /checkout/src/liballoc/boxed.rs:638
#31 0x000055f4cab7518b in _$LT$alloc..boxed..Box$LT$alloc..boxed..FnBox$LT$A$C$$u20$Output$u3d$R$GT$$u20$$u2b$$u20$$u27$a$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::ha6d848c5cff6eb89 () at /checkout/src/liballoc/boxed.rs:648
#32 std::sys_common::thread::start_thread () at libstd/sys_common/thread.rs:24
#33 0x000055f4cab66696 in std::sys::unix::thread::Thread::new::thread_start () at libstd/sys/unix/thread.rs:90
#34 0x00007fe7e3732594 in start_thread () from /lib64/libpthread.so.0
#35 0x00007fe7e324e00f in clone () from /lib64/libc.so.6
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment