hstr: malloc: attempt to free non-allocated memory (uninitialized/freed pointer/NULL)
Whenever I use hstr I get the following errors:
$ hstr
ls
hstr(45522,0x1142ce5c0) malloc: *** error for object 0x7fccffe4f40f: pointer being freed was not allocated
hstr(45522,0x1142ce5c0) malloc: *** set a breakpoint in malloc_error_break to debug
[1] 45522 abort hstr
$ ls
It doesn’t matter if I trigger it with hstr, hh or ^R, I always get the malloc errors. hstr still works, but always prints the errors
I recently re-installed my machine from scratch but the problem persists.
My config:
- macOS Mojave v10.14.5
- zsh 5.7.1 (x86_64-apple-darwin18.2.0)
alias hh=hstr # hh to be alias for hstr
export HISTFILE=~/.zhistory # ensure history file visibility
export HISTFILESIZE=100000 # increase history file size
export HISTSIZE=${HISTFILESIZE}
export HSTR_CONFIG=hicolor,raw-history-view,blacklist
bindkey -s "\C-r" "\eqhstr\n" # bind hh to Ctrl-r
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 15 (7 by maintainers)
Commits related to this issue
- More memory leak fixes - nonexistent HISTFILE in particular #379 #353 #330 — committed to dvorka/hstr by dvorka 5 years ago
😞 thank you@jonand. I will set up macOS installation when I will be releasing my other project and try to debug it there. Thanks for patience & help!
This is the commit that introduced this error https://github.com/dvorka/hstr/commit/c36754179965d09b83d72f0bd575a08919208bf5 Any C developers that can spot what’s wrong with it?