From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21376 invoked by alias); 20 Oct 2016 09:03:41 -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: 39682 Received: (qmail 5930 invoked from network); 20 Oct 2016 09:03:41 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f180.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.180):SA:0(0.0/5.0):. Processed in 0.848846 secs); 20 Oct 2016 09:03:41 -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=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable 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=mJs9mmpVq+3xJkcXi28hAVq1hSEubGmuafbvynDYFWI=; b=ag6rt2+qxgkmM4uT3ezHmhpYQ65N3EJuLfZZxg9qTgt6xp8CmwvE2o+kOKoIn0IitH Es4UXwOewjb6qrnuvqnKqJprrAB/aXxiwgOjdtOXX40etD9OwoJrU4pma8r/VXGonWVG iq6tE1aHW+VzKkxuGnzXn+gqb3qmf4xEHzpb0hhxoodF3/XJZ7D9Z/4U2y5LXzzxGVKq jIVgoEqili9vdVteuG85OHtPiA6Qd+EJc1nRk1tSEY9Cm2EsBqelBGTI3RkUpsvnZP41 +w2VvM5zgxfylSIB1HnsvRz/U/dqlxoPgN38PvExwUjTWemRSb9EyrwZUfUQ+j8utSNo KIGQ== 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=mJs9mmpVq+3xJkcXi28hAVq1hSEubGmuafbvynDYFWI=; b=di2eMKQo04WPVuuU8A8oQ7gk/WOqOaHJ12cdwGNN/GeD1iQxzJ5qW4tq7zxKtrL3TQ r9Ec0oaV3gwr3/mFeSCt+uC6TkyIXm6cJFVlNsox7FD+kTPfJ/OxTwFL2LsCWJGT0FVa Eu8hsFL567ikjEQR0BnKAauJwvsLrXb4gigwpICfnqDGyOFnVfDHKyTB4gByJVYNaGGT Myi8CEnTvUwCYNqKdpdntT6irgFJh7AWqeob6sFKU60+MndrOWmsjzIMLQBJ25JUc9wP bK7k2RCct4FoivC3hkxmDBWB1CjYxoQ9MjjGW0aSjo6jrtJj3By8kN7BIJUAGIvVsQQm NZBw== X-Gm-Message-State: ABUngvcvdTEjjdbd1043riFoEhkPlA9U2SdJZ+Fji3EWSkhkhYzV81Ldn3kPp8IvRgclhHDzddrmBHw67YANVA== X-Received: by 10.55.129.6 with SMTP id c6mr11017276qkd.4.1476953768743; Thu, 20 Oct 2016 01:56:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20161013104321.29159e3f@pwslap01u.europe.root.pri> <20161019141435.42eb6df2@pwslap01u.europe.root.pri> From: Bart Schaefer Date: Thu, 20 Oct 2016 01:56:08 -0700 Message-ID: Subject: Re: Cores almost on demand in patcompile() To: Sebastian Gniazdowski , Zsh hackers list Cc: Peter Stephenson Content-Type: text/plain; charset=UTF-8 Problems with mail from gmail reaching the mailing list, persist. On Wed, Oct 19, 2016 at 10:55 PM, Sebastian Gniazdowski wrote: > > Valgrind outputs two "Invalid read of size 8" messages. Don't know why > there are no line pointers to source, however the reads are in > patcompile(). I'm afraid that are PATNEXT invocations, final > segmentation-fault places. ---------- Forwarded message ---------- From: Bart Schaefer Date: Wed, Oct 19, 2016 at 10:31 PM Subject: valgrind of patcompile() errors To: zsh-workers@zsh.org I do not get these errors on a second machine architecture I tried. The difference seems to be that the error happens on the 64bit architecture but not on 32bit. This one line may be telling: ==26676== by 0x49F539: patcompile (pattern.c:672) That is inside a block where a metafied string is converted back to an unmetafied one to do a literal match. ==26676== Memcheck, a memory error detector ==26676== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==26676== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==26676== Command: Src/zsh -f test2.zsh ==26676== ==26676== Invalid read of size 8 ==26676== at 0x49F420: patcompile (pattern.c:651) ==26676== by 0x453ED0: compgetmatch (glob.c:2612) ==26676== by 0x453F84: getmatch (glob.c:2652) ==26676== by 0x4B6834: paramsubst (subst.c:3033) ==26676== by 0x4B0E7A: stringsubst (subst.c:247) ==26676== by 0x4B01FD: prefork (subst.c:85) ==26676== by 0x440AEF: addvars (exec.c:2388) ==26676== by 0x43C5AF: execsimple (exec.c:1158) ==26676== by 0x43CBD7: execlist (exec.c:1296) ==26676== by 0x43C464: execode (exec.c:1115) ==26676== by 0x462167: loop (init.c:208) ==26676== by 0x466688: zsh_main (init.c:1692) ==26676== Address 0x61d7c18 is 248 bytes inside a block of size 256 free'd ==26676== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==26676== by 0x47DB4F: zrealloc (mem.c:1008) ==26676== by 0x49EB04: patadd (pattern.c:414) ==26676== by 0x49F539: patcompile (pattern.c:672) ==26676== by 0x453ED0: compgetmatch (glob.c:2612) ==26676== by 0x453F84: getmatch (glob.c:2652) ==26676== by 0x4B6834: paramsubst (subst.c:3033) ==26676== by 0x4B0E7A: stringsubst (subst.c:247) ==26676== by 0x4B01FD: prefork (subst.c:85) ==26676== by 0x440AEF: addvars (exec.c:2388) ==26676== by 0x43C5AF: execsimple (exec.c:1158) ==26676== by 0x43CBD7: execlist (exec.c:1296) ==26676== ==26676== Invalid read of size 8 ==26676== at 0x49F48A: patcompile (pattern.c:652) ==26676== by 0x453ED0: compgetmatch (glob.c:2612) ==26676== by 0x453F84: getmatch (glob.c:2652) ==26676== by 0x4B6834: paramsubst (subst.c:3033) ==26676== by 0x4B0E7A: stringsubst (subst.c:247) ==26676== by 0x4B01FD: prefork (subst.c:85) ==26676== by 0x440AEF: addvars (exec.c:2388) ==26676== by 0x43C5AF: execsimple (exec.c:1158) ==26676== by 0x43CBD7: execlist (exec.c:1296) ==26676== by 0x43C464: execode (exec.c:1115) ==26676== by 0x462167: loop (init.c:208) ==26676== by 0x466688: zsh_main (init.c:1692) ==26676== Address 0x61d7c18 is 248 bytes inside a block of size 256 free'd ==26676== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==26676== by 0x47DB4F: zrealloc (mem.c:1008) ==26676== by 0x49EB04: patadd (pattern.c:414) ==26676== by 0x49F539: patcompile (pattern.c:672) ==26676== by 0x453ED0: compgetmatch (glob.c:2612) ==26676== by 0x453F84: getmatch (glob.c:2652) ==26676== by 0x4B6834: paramsubst (subst.c:3033) ==26676== by 0x4B0E7A: stringsubst (subst.c:247) ==26676== by 0x4B01FD: prefork (subst.c:85) ==26676== by 0x440AEF: addvars (exec.c:2388) ==26676== by 0x43C5AF: execsimple (exec.c:1158) ==26676== by 0x43CBD7: execlist (exec.c:1296) ==26676==