X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <47698460.408@telus.net> Date: Wed, 19 Dec 2007 12:51:44 -0800 From: pw

User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: _cygtls::handle_exceptions and segmentation fault while running bash script References: <47695D32 DOT 3020309 AT telus DOT net> In-Reply-To: <47695D32.3020309@telus.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com pw: wrote > An input file mock up script is as follows (tested/works): > > #!/bin/bash > #mockup_input_files.sh > > mkdir final > mkdir sunshine > > for FNUM in `seq 1 26`;do > OFILE=`echo $FNUM| awk '{print "./final/test_file_" $1 ".final.txt"}'`; > echo > "HEADER|HEADER|HEADER|HEADER|HEADER|HEADER|HEADER|HEADER|HEADER" > $OFILE > > for L in `seq 1 992`; do > LINE=`echo 9|awk '{for(i=1;i<=$1;i++){printf("%d000", > i);if(i<9){printf("|");}} printf("\n");}'`; > echo "$LINE" >> $OFILE; > done > done > > find -type f -iname '*.final.txt' | awk -F "/" '{print $NF > "|73.056977|6986" }'>latitudes.txt > > #END OF SCRIPT This script only produces 9 columns of data. Running the problem script against this mocked up data didn't cause any exceptions. I modified the script as follows to allow easier adjustment of the number of columns in the mock up input data: #!/bin/bash mkdir final mkdir sunshine export COLUMNS=16 for FNUM in `seq 1 26`;do OFILE=`echo $FNUM| awk '{print "./final/test_file_" $1 ".final.txt"}'`; LINE=`echo $COLUMNS|awk '{for(i=1;i<=$1;i++){printf("HEADER_%d",i);if(i<$1){printf("|");}} printf("\n");}'`; echo "$LINE" > $OFILE; for L in `seq 1 992`; do LINE=`echo $COLUMNS|awk '{for(i=1;i<=$1;i++){printf("%d000",i);if(i<$1){printf("|");}} printf("\n");}'`; echo "$LINE" >> $OFILE; done unix2dos $OFILE; done #END OF SCRIPT Using 9 columns didn't cause an exception or segfault. I increased the number of columns to 16 and ran the other problematic script again and again no exception or segfault. (??) I am wondering if the Windows XP system is actually violating the stack and not cygwin. Peter -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/