From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27084 invoked by alias); 2 Jul 2015 21:42:24 -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: 35669 Received: (qmail 79 invoked from network); 2 Jul 2015 21:42:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 Message-ID: <5595AEF8.3000508@inlv.org> Date: Thu, 02 Jul 2015 23:36:56 +0200 From: Martijn Dekker User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: zsh-workers@zsh.org Subject: Complicated segfault regression Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Just for the hell of it I decided to make zsh 5.0.8 run a GNU 'configure' script (in sh mode) to see how far it would come with that incredibly convoluted code. The result was a segfault. So I tried to find the code that triggers it. The following code block makes zsh 5.0.8 and current git zsh segfault reliably. It's now completely non-operational because I've tried to reduce it to the minimum necessary to make zsh crash. The strange thing is, almost *any* change in the crashing code block below will make it fail to produce a segfault. The 'if' is necessary. All three clauses in the case statement are necessary. All the extension tests in the first clause are necessary. The : with the parameter in that form, with the variable, is necessary (this used to be a 'rm'). Even the { : ; } at the end is necessary. Change any of those and it fails to segfault. It doesn't seem to make a difference whether 'emulate sh' is used or not, though. Oh, and zsh 4.2.7 and 4.3.11 are fine. I can't seem to narrow this down any further, but I figured it was worth reporting anyway. - M. #! /usr/bin/env zsh emulate sh set -x # --- begin crashing code block --- if true; then for ac_file in somestuff; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb \ | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) break;; * ) break;; esac break done fi : conftest$ac_cv_exeext { : ; } # --- end crashing code block ---