3 ms·
How did you get Kakoune to segfault?
by HKH2 5y ago
How did you get Kakoune to segfault?
- sidkshatriya 5y agoKakoune is built in C++. So bugs will sometimes manifest as segfaults. You could be doing some normal editing, press a sequence of editing commands that might trigger some code that may subtly wrong. Sometime later, when C++ code tries to write to memory that it shouldn't have, you will segfault. In that respect this is true for any C/C++ application. Kakoune keeps fixing these issues as they come up.
- sidkshatriya 5y ago> tries to write to memory that it shouldn’t have To elaborate what I mean here is maybe the program tried to write to an address not mapped to its address space etc. This happens due to bugs in the program e.g. not calculating the offset into an array properly and so forth. There are many ways to mess up when using C/C++!
- pasabagi 5y agoYou can segfault in rust, too: fn totally_safe() -> i32 { unsafe { *std::ptr::null() } } This commonly happens if the person who wrote 'totally safe' thinks what they're doing is fine, and it actually isn't.