* Re: munmap_chunk(): invalid pointer
2023-10-05 16:40 munmap_chunk(): invalid pointer Sebastian Gniazdowski
@ 2023-10-05 14:31 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2023-10-05 14:31 UTC (permalink / raw)
To: Sebastian Gniazdowski; +Cc: Zsh hackers list
My fault, I forgot unmeta() re-uses its zalloc'd buffer.
diff --git a/Src/parse.c b/Src/parse.c
index f7285c2ed..c0a1e9f95 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -3421,10 +3421,8 @@ build_dump(char *nam, char *dump, char **files,
int ali, int map, int flags)
zwarnnam(nam, "can't open file: %s", *files);
noaliases = ona;
unlink(dump);
- zsfree(fnam);
return 1;
}
- zsfree(fnam);
file = (char *) zalloc(flen + 1);
file[flen] = '\0';
lseek(fd, 0, 0);
^ permalink raw reply [flat|nested] 2+ messages in thread
* munmap_chunk(): invalid pointer
@ 2023-10-05 16:40 Sebastian Gniazdowski
2023-10-05 14:31 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Gniazdowski @ 2023-10-05 16:40 UTC (permalink / raw)
To: Zsh hackers list
I'm getting frequent zsh: abort errors. Backtrace:
(gdb) bt
#0 0x00007ffff76b432c in ?? () from /lib64/libc.so.6
#1 0x00007ffff7665872 in raise () from /lib64/libc.so.6
#2 0x00007ffff7651464 in abort () from /lib64/libc.so.6
#3 0x00007ffff76a87a8 in ?? () from /lib64/libc.so.6
#4 0x00007ffff76bd11a in ?? () from /lib64/libc.so.6
#5 0x00007ffff76bd2d0 in ?? () from /lib64/libc.so.6
#6 0x00007ffff76c12c8 in free () from /lib64/libc.so.6
#7 0x0000000000476e46 in build_dump ()
#8 0x000000000047bcb1 in bin_zcompile ()
#9 0x0000000000420af7 in execbuiltin ()
#10 0x00000000004320e7 in execcmd_exec
--
Best regards,
Sebastian Gniazdowski
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-05 14:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-05 16:40 munmap_chunk(): invalid pointer Sebastian Gniazdowski
2023-10-05 14:31 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).