Sample Header Ad - 728x90

Why is command line program killed by SIGABRT?

2 votes
1 answer
19347 views
I've been using a command line program (installed via package manager) that was working fine until I used vim to inadvertently insert a null byte (^@) in one of the program's data files when doing search and replace using the vim :s(substitute) command. Since then the program won't run instead I get this error:
/usr/include/c++/9/bits/basic_string.h:1048: std::__cxx11::basic_string::const_reference std::__cxx11::basic_string::operator[](std::__cxx11::basic_string::size_type) const [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator; std::__cxx11::basic_string::const_reference = const char&; std::__cxx11::basic_string::size_type = long unsigned int]: Assertion '__pos <= size()' failed.
Aborted (core dumped)
gnome-abrt shows that the reason for the error is:
task killed by SIGABRT
Specifically SIGABRT 6 - In Linux, what does inserting a null byte in a text file that is read by an executable do? The way the null byte was inserted into the program's data file is analogous to if I insert a null byte in a git commit message and that somehow breaks git. - Could the null byte be causing the program to crash when it reads that text file or is there a different reason?
Asked by bit (1176 rep)
Jul 9, 2019, 05:55 PM
Last activity: Dec 6, 2019, 02:02 PM