From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7492 invoked by alias); 11 Oct 2016 06:40:59 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39605 Received: (qmail 6414 invoked from network); 11 Oct 2016 06:40:58 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f170.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.220.170):SA:0(1.1/5.0):. Processed in 0.643826 secs); 11 Oct 2016 06:40:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=DATE_IN_PAST_03_06, HTML_MESSAGE,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=q9t3c1fs481Ml/c9Jr/Yfo5GJbylxQ1EkNFD1tE/swE=; b=QU1Ig1o5pmL81HIlttxITpWkdCngqQ7XlTV17msBRO/0h/O1gg4sDF/wCr3rj5sesE gnwvlhKgGFppJ+3dS+ChEI46v8p79ZqL2wgMufAzKAvtQd1KNBfmBKfGH9alVKk7LRdZ hi6sBzg1wObtwpnkgW9ok7MTwEQourlicuG4XeFfM46blTjSNuL3Zr5VkRbqBBvTdezR WYbgcPUY0nqOWHV1DDxM98kKV6cekvVff2iwWjpkZmU9tVkUG92ElhIc1yoBFBn7adrI ot3XegLzLJnimApQR7ZmqT5kJylvcO/ECI4l83qaA/rczC+gTEaDMWvrRkL0j1OT0i8j Axwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=q9t3c1fs481Ml/c9Jr/Yfo5GJbylxQ1EkNFD1tE/swE=; b=nD1EefcC5BBibgGLPsWNEIMznPUmtrTZlAjpJH39OtPeHMkL4TIDXI0mBT/NbZnoxA 2HrDWkqAUv78X1GXgN+LXZ1dL8dtfD26af/S32+m2GWFaj1OVvUh4k7YyQESNHUZLQDr jSvcbTFC3pCw9lyeI+mr5Kfe0+rV/iOzcvaiwBBx+oJiO0zYmVXLulEmpILGTdsYxIqU agjZ8U5x5KjHg1GZ8C7Rqb1EsZmQ3Apr0qWNECrraHukq51xMaW9jLhymtT1yfrQuhFo WD0H2pxM+oNZB8rR5+8kNb3VWIvOaRLHayRnCqb+80NJybSOYExGjyYbMcVJloM1qZia PN7A== X-Gm-Message-State: AA6/9RkZ3DIkBP+vb50d9YmYbOwiOiaJYUbKNXNbnesW0gYbe7iKHYkYTAREjUMoTdQiTnE8tU9wzQnDIxUvag== X-Received: by 10.55.200.75 with SMTP id c72mr1145557qkj.85.1476154409270; Mon, 10 Oct 2016 19:53:29 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Bart Schaefer Date: Mon, 10 Oct 2016 19:53:28 -0700 Message-ID: Subject: Re: Cores almost on demand in patcompile() To: Sebastian Gniazdowski Cc: Zsh hackers list Content-Type: multipart/alternative; boundary=001a1146e82c32dc75053e8dfb96 --001a1146e82c32dc75053e8dfb96 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable [Sorry, fat-fingered the send button] On Mon, Oct 10, 2016 at 7:46 PM, Bart Schaefer wrote: > On Mon, Oct 10, 2016 at 8:31 AM, Sebastian Gniazdowski < > sgniazdowski@gmail.com> wrote: > >> My new observations: >> =E2=80=93 the "ndash", .i.e. this char: >>> =E2=80=93 <<<, has a role, b= ecause >> replacing it with other char, also one like =C2=A7, stops core dump >> > > Your stack trace in the first message on this thread has a string as the > "exp" argument of patcompile() that makes me suspicious. The comments sa= y > that this argument is expected to be metafied (pattern.c 522), but as bes= t > I can tell it's passed down from paramsubst() tokenized but not metafied. > (I don't have access to my usual debugging platform this week.) One of t= he > multibyte characters in the string > ... in that exp argument, the character in the position where you identified ndash in input2b.txt, has a byte with hex value 0x83 which would cause it to be incorrectly interpreted as a metacharacter. If this is the case, this probably results in the pattern being mishandled. There were some changes made a while ago to try to optimize memory (re)allocation during pattern compilation and globbing. It's quite possible that miscounting of the number of characters in the pattern is causing problems with the allocated buffer. At this point though, I'm just speculating. --001a1146e82c32dc75053e8dfb96--