-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
malloc: attempt to free non-allocated memory (uninitialized/freed pointer/NULL) #353
Comments
@jonand @arnas-teso @mvilanova or anybody else who can reproduce this problem, can you please share HSTR version impacted by this problem please? HSTR 2.0 was released with all memory leaks/invalid memory use fixed AFAIK. Thanks! |
tried upgrading with brew, but brew sees only 2.0.1 version |
Running hstr version "2.0.0" (2018-08-28T13:30:00) in zsh 5.7.1
(x86_64-apple-darwin19.0) on macOS Catalina (10.15.1).
mvilanova ~ hstr
echo "hello"
hstr(15000,0x111e0fdc0) malloc: *** error for object 0x7faea65cac6f:
pointer being freed was not allocated
hstr(15000,0x111e0fdc0) malloc: *** set a breakpoint in malloc_error_break
to debug
[1] 15000 abort hstr
mvilanova ~ echo "hello"
hello
Marc
…On Mon, Dec 16, 2019 at 4:36 AM arnaspet ***@***.***> wrote:
➜ hstr
git status
hstr(40422,0x10a0515c0) malloc: *** error for object 0x7ffdc7c8617f: pointer being freed was not allocated
hstr(40422,0x10a0515c0) malloc: *** set a breakpoint in malloc_error_break to debug
[1] 40422 abort hstr
➜ hstr --version
hstr version "2.0.0" (2018-08-28T13:30:00)
tried upgrading with brew, but brew sees only 2.0.1 version
Warning: hstr 2.0_1 already installed
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#353?email_source=notifications&email_token=AJN5NGUFGQ2K4C5UPLTLPO3QY5Y6DA5CNFSM4H53Q2N2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG6SFUY#issuecomment-566043347>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJN5NGVKFSZRKZQWXYUXIATQY5Y6DANCNFSM4H53Q2NQ>
.
|
@mvilanova @arnaspet thank you for quick response, it helps - I really appreciate it! 👍 |
@mvilanova @arnaspet I just fixed a few HSTR leaks, but most probably not the one causing crash reported in this issue. It seems to be caused by freeing non-initialized/NULL pointer, but unfortunately it's not reproducible on my systems (Linux @ zsh / bash). Can you please run the following commands for and share
and:
|
It might be fixed by e9452d2 released as HSTR |
Not seeing this version in brew yet.
Marc
…On Sat, Dec 21, 2019 at 9:03 AM Martin Dvorak ***@***.***> wrote:
It might be fixed by e9452d2
<e9452d2>
released as HSTR 2.2, please verify.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#353?email_source=notifications&email_token=AJN5NGXEI7KKSG7Y4B4PU3TQZZD6FA5CNFSM4H53Q2N2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHO7XSY#issuecomment-568196043>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJN5NGXF5PR7VW5EVLMZF2DQZZD6FANCNFSM4H53Q2NQ>
.
|
Now 2.2 is available via brew. I installed it but I'm still seeing the malloc errors. Unfortunately there's no |
😞 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! |
I was able to solve this issue by downgrading to hstr 2.0 (2.1, 2.2 have this problem in my testing) |
I'm still seeing this same issue with 2.2 on Mac OS Catalina |
This is the commit that introduced this error c367541 Any C developers that can spot what's wrong with it?
|
Could be fixed by #410 as well. If you are experiencing this, are you using zsh by chance? Do any of the commands in your shell's history start with a colon |
I think you nailed it. I use zsh and there is indeed command in my history starting with |
Fixed by #410 thanks to joint work of @thibaultcha and @ostrolucky 💪 Thank you both! |
Whenever I use
hstr
I get the following errors: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 errorsI recently re-installed my machine from scratch but the problem persists.
My config:
The text was updated successfully, but these errors were encountered: