Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16289 > unrolled thread

Re: '=~' crash on NetBSD

Started byChet Ramey <chet.ramey@case.edu>
First post2020-05-07 11:01 -0400
Last post2020-05-07 11:01 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: '=~' crash on NetBSD Chet Ramey <chet.ramey@case.edu> - 2020-05-07 11:01 -0400

#16289 — Re: '=~' crash on NetBSD

FromChet Ramey <chet.ramey@case.edu>
Date2020-05-07 11:01 -0400
SubjectRe: '=~' crash on NetBSD
Message-ID<mailman.2359.1588863686.3066.bug-bash@gnu.org>
On 5/7/20 10:55 AM, Martijn Dekker wrote:
> Op 07-05-20 om 14:20 schreef Chet Ramey:
>> On 5/6/20 2:08 PM, Martijn Dekker wrote:
>>> On NetBSD, bash (all versions, including current git) dumps core when using
>>> [[ to match against an ERE containing certain UTF-8 characters, for
>>> example, É ($'\303\211').
>>>
>>> | $ bin/bash-5.0-debug -c "[[ c =~ $'\303\211' ]]"
>>> |
>>> | malloc: unknown:0: assertion botched
>>> | malloc: 0x81ba08: allocated: last allocated from unknown:0
>>> | free: start and end chunk sizes differ
>>> | Aborting...Abort trap (core dumped)
>>
>> What version of NetBSD? I don't run NetBSD, and I can't reproduce this on
>> other platforms, so I'll have to go searching for something.
> 
> Sorry about that omission. I've tested NetBSD 8.0, 8.1 and 9.0 (all amd64)
> and the bug occurs on all of these.

It dies in regfree(). The pattern is correct at entry ("\303\211"), and
none of the allocations and frees in sh_regmatch fail. I'm calling it a
NetBSD bug.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web