Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

ASAN:DEADLYSIGNAL
=================================================================
==69463==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7ffa42983634 bp 0x7fff359dd980 sp 0x7fff359dd0f0 T0)
==69463==The signal is caused by a READ memory access.
==69463==Hint: address points to the zero page.
    #0 0x7ffa42983633  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x79633)
    #1 0x5611822efc8d in std::char_traits<char>::copy(char*, char const*, unsigned long) (/out/package/ex3+0x14c8d)
    #2 0x5611822f20a9 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy(char*, char const*, unsigned long) (/out/package/ex3+0x170a9)
    #3 0x5611822f0d4e in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) (/out/package/ex3+0x15d4e)
    #4 0x5611822f005f in _node::operator=(_node&&) (/out/package/ex3+0x1505f)
    #5 0x5611822ee174 in Station::bus

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.

Please double check your code to solve this problem and try again.

Your Answer


        

JOJ Answer

Bus 101 comes!
Error: too many passengers getting on
Error: bus S1 not found!
Bus 100 comes!