Under some circumstances, loading history in libedit by history(H_LOAD) causes abnormal program termination due to invalid memory access on line 693 of /usr/src/lib/libedit/history.c. Fix: Compile the following program with ElectricFence #include <histedit.h> int main(int argc, char* argv[]) { History* h = history_init(); HistEvent ev; history(h, &ev, H_LOAD, argv[1]); return 0; } and run it with a history file 4096 bytes long containing _HiStOrY_V2_ def0123456789abcdef0123456789abcdef0123456789abcde followed by 63 copies of line: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde