From: Bart Schaefer <schaefer@brasslantern.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Cc: Eduardo Bustamante <dualbus@gmail.com>
Subject: Re: Zsh parser segmentation fault in strcatsub
Date: Wed, 17 May 2017 11:37:26 -0700 [thread overview]
Message-ID: <170517113726.ZM27232@torch.brasslantern.com> (raw)
In-Reply-To: <CAOSMAuvh6XLhfLYd37v_JQC+DQ7yMv_M4VEAM6DiXB4TLf2N1A@mail.gmail.com>
On May 15, 8:36pm, Eduardo Bustamante wrote:
}
} dualbus@debian:~/src/zsh/zsh$ ./Src/zsh -nf strcatsub
} =================================================================
} ==2860==ERROR: AddressSanitizer: heap-buffer-overflow on address
} 0x6290000041f8 at pc 0x56236c85fac3 bp 0x7ffe5ddad580 sp
} 0x7ffe5ddad578
} READ of size 1 at 0x6290000041f8 thread T0
} #0 0x56236c85fac2 in mb_metacharlenconv
} /home/dualbus/src/zsh/zsh/Src/utils.c:5370
} #1 0x56236c82ee04 in dopadding /home/dualbus/src/zsh/zsh/Src/subst.c:922
So this is
cl = MB_METACHARLENCONV(t, &cchar);
and at least from my sources the reported error is on
STOUC(*s)
that is, on the dereference of the pointer "t" from dopadding.
Could this be an architecture endian-ness issue while trying to interpret
bytes as belonging to a multibyte character?
Can you repeat the crash with multibyte support disabled in the compile?
I don't have clang readily available to try that compiler.
next prev parent reply other threads:[~2017-05-17 18:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 21:30 Eduardo Bustamante
2017-05-16 0:48 ` Bart Schaefer
2017-05-16 1:36 ` Eduardo Bustamante
2017-05-16 3:38 ` Bart Schaefer
2017-05-17 18:37 ` Bart Schaefer [this message]
2017-05-18 2:21 ` Eduardo Bustamante
2017-05-16 8:47 ` Peter Stephenson
2017-05-16 13:30 ` Daniel Shahaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=170517113726.ZM27232@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=dualbus@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).