Skip to content

Find out why the regex tests throw an allocation error with size 0xFFFF_FFFF_FFFF_FFFD #651

@bjorn3

Description

@bjorn3

On the libtest branch:

RUST_TEST_THREADS=1 RUST_TEST_CAPTURE=0 lldb ./regex/target/debug/deps/regex-011ed8498c0d5330 -- --exclude-should-panic -Zunstable-options
(lldb) target create "./regex/target/debug/deps/regex-011ed8498c0d5330"
Current executable set to './regex/target/debug/deps/regex-011ed8498c0d5330' (x86_64).
(lldb) settings set -- target.run-args  "--exclude-should-panic" "-Zunstable-options"
(lldb) run
Process 32322 launched: './regex/target/debug/deps/regex-011ed8498c0d5330' (x86_64)

running 44 tests
test compile::tests::byte_classes ... ok
test compile::tests::full_byte_classes ... ok
test dfa::tests::prop_read_write_i32 ... ok
test dfa::tests::prop_read_write_u32 ... ok
memory allocation of 18446744073709551613 bytes failedProcess 32322 stopped
* thread #1: tid = 32322, 0x00007ffff722cfff libc.so.6`gsignal + 207, name = 'regex-011ed8498', stop reason = signal SIGABRT
    frame #0: 0x00007ffff722cfff libc.so.6`gsignal + 207
libc.so.6`gsignal:
->  0x7ffff722cfff <+207>: addq   $0x88, %rsp
    0x7ffff722d006 <+214>: movl   %r8d, %eax
    0x7ffff722d009 <+217>: popq   %rbx
    0x7ffff722d00a <+218>: retq   
(lldb) bt
* thread #1: tid = 32322, 0x00007ffff722cfff libc.so.6`gsignal + 207, name = 'regex-011ed8498', stop reason = signal SIGABRT
  * frame #0: 0x00007ffff722cfff libc.so.6`gsignal + 207
    frame #1: 0x00007ffff722e42a libc.so.6`abort + 362
    frame #2: 0x0000555555bee92a regex-011ed8498c0d5330`std::sys::unix::abort_internal::h347f7c6a54bcbb22 + 10 at mod.rs:155
    frame #3: 0x0000555555c5ae2d regex-011ed8498c0d5330`rust_oom + 381 at alloc.rs:217
    frame #4: 0x0000555555c69f00 regex-011ed8498c0d5330`alloc::alloc::handle_alloc_error::h5808c26404527bf1 + 64 at alloc.rs:245
    frame #5: 0x0000555555c6950b regex-011ed8498c0d5330`alloc::raw_vec::RawVec$LT$T$C$A$GT$::allocate_in::haff5df609eb7a832 + 1035 at raw_vec.rs:99
    frame #6: 0x0000555555c68e97 regex-011ed8498c0d5330`alloc::raw_vec::RawVec$LT$T$GT$::with_capacity::h558055817251b981 + 39 at raw_vec.rs:139
    frame #7: 0x0000555555c679e9 regex-011ed8498c0d5330`alloc::vec::Vec$LT$T$GT$::with_capacity::h9575ef00f26886ea + 41 at vec.rs:356
    frame #8: 0x0000555555c64e5b regex-011ed8498c0d5330`alloc::slice::_$LT$impl$u20$$u5b$T$u5d$$GT$::repeat::h6ee1c58cfe569a4b + 891 at slice.rs:444
    frame #9: 0x0000555555c64ab2 regex-011ed8498c0d5330`alloc::str::_$LT$impl$u20$str$GT$::repeat::hc65f26d246e8d1a7 + 258 at str.rs:510
    frame #10: 0x000055555583fb36 regex-011ed8498c0d5330`test::TestDesc::padded_name::he46e3fe61d6de2cf + 502 at lib.rs:151
    frame #11: 0x000055555583f517 regex-011ed8498c0d5330`test::formatters::pretty::PrettyFormatter$LT$T$GT$::write_test_name::ha8c9c19d9609af13 + 407 at pretty.rs:140
    frame #12: 0x00005555558f8525 regex-011ed8498c0d5330`_$LT$test..formatters..pretty..PrettyFormatter$LT$T$GT$$u20$as$u20$test..formatters..OutputFormatter$GT$::write_test_start::h8a38528ef6ab90f8 + 149 at pretty.rs:159
    frame #13: 0x00005555558bba7a regex-011ed8498c0d5330`test::run_tests_console::callback::h39ec9cd3fc5ec7ee + 1418 at lib.rs:898
    frame #14: 0x00005555557f2071 regex-011ed8498c0d5330`test::run_tests_console::_$u7b$$u7b$closure$u7d$$u7d$::h7fa15c5363fc21fc + 225 at lib.rs:970
    frame #15: 0x00005555558ceee9 regex-011ed8498c0d5330`test::run_tests::h89ed487737f5261b + 6585 at lib.rs:1164
    frame #16: 0x00005555558faf23 regex-011ed8498c0d5330`test::run_tests_console::he0d17c3246846bca + 3891 at lib.rs:970
    frame #17: 0x000055555586c1e7 regex-011ed8498c0d5330`test::test_main::he64c3f4084c4fb20 + 1591 at lib.rs:291
    frame #18: 0x000055555586ba28 regex-011ed8498c0d5330`test::test_main_static::h18e35704a61f9a4a + 696 at lib.rs:325
    frame #19: 0x00005555555e2377 regex-011ed8498c0d5330`regex::main::hf76ba9890b6c3575 + 55 at lib.rs:1
    frame #20: 0x00005555556ec16f regex-011ed8498c0d5330`std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hddee2776adbf4146 + 31 at rt.rs:64
    frame #21: 0x0000555555c4630f regex-011ed8498c0d5330`std::rt::lang_start_internal::_$u7b$$u7b$closure$u7d$$u7d$::h2eeb809f32b3a2e3 + 79 at rt.rs:52
    frame #22: 0x0000555555c21061 regex-011ed8498c0d5330`std::panicking::try::do_call::he28f1668f2a240df + 225 at panicking.rs:296
    frame #23: 0x0000555555c5ff92 regex-011ed8498c0d5330`__rust_maybe_catch_panic + 162 at lib.rs:80
    frame #24: 0x0000555555c20d48 regex-011ed8498c0d5330`std::panicking::try::h174352fb6d676336 + 312 at panicking.rs:275
    frame #25: 0x0000555555c25930 regex-011ed8498c0d5330`std::panic::catch_unwind::h2a5a9a7c25cee50a + 64 at panic.rs:388
    frame #26: 0x0000555555c586be regex-011ed8498c0d5330`std::rt::lang_start_internal::h7455589cd378fa21 + 766 at rt.rs:52
    frame #27: 0x00005555557df6d4 regex-011ed8498c0d5330`std::rt::lang_start::h7a6c71e038f3a978 + 84 at rt.rs:64
    frame #28: 0x00005555557e539a regex-011ed8498c0d5330`main + 26
    frame #29: 0x0000555555cdecd0 regex-011ed8498c0d5330
    frame #30: 0x00007ffff721a2e1 libc.so.6`__libc_start_main + 241
    frame #31: 0x00005555555a5d1a regex-011ed8498c0d5330`_start + 42

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions