delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Date: | Tue, 27 Mar 2001 17:35:31 -0500 |
From: | Christopher Faylor <cgf AT redhat DOT com> |
To: | Cygwin <cygwin AT cygwin DOT com> |
Cc: | matts AT bluesguitar DOT org |
Subject: | Re: Debugging setup.exe |
Message-ID: | <20010327173531.A11821@redhat.com> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | Cygwin <cygwin AT cygwin DOT com>, matts AT bluesguitar DOT org |
References: | <BF35D9C143BCCC4EB63181B67C9320C804DD69 AT serv-075 DOT icon-germany DOT local> <02b701c0b707$7c30a230$3c5350d8 AT bluesguitar DOT org> |
Mime-Version: | 1.0 |
User-Agent: | Mutt/1.3.11i |
In-Reply-To: | <02b701c0b707$7c30a230$3c5350d8@bluesguitar.org>; from matts@bluesguitar.org on Tue, Mar 27, 2001 at 03:47:14PM -0600 |
On Tue, Mar 27, 2001 at 03:47:14PM -0600, Matthew Smith wrote: >Changing 'int r' to 'volatile int r' seemed like a good idea, so I tried >that, and it works well. Now however, I've run into some stranger behavior >still. Take a look at this code snippet: > > r = (y + ROW_MARGIN/2) / row_height; > > if (r < 0 || r >= npackages) > return 0; > > int p = package_indexes[r]; > > if (x >= headers[NEW_COL].x - HMARGIN/2 && x <= headers[NEW_COL+1].x - >HMARGIN/2) > { > ... > > >Ok, I step through and 'r' is set to a reasonable number. 'p' is then set >to 0, which seems reasonable enough as well. We hit the 'if' conditional, >and get this....execution then goes BACKWARDS and executes the 'int p = >package_indexes[r];' line again! At that point, p is set to some gigantic >negative number, so when we use it as an array index a short time later, >everything blows up. Is this related to the optimizer too? Seems odd. DJ has already indicated that what you are seeing is an artifact of optimization. Build setup.exe without the -O2 if you are having problems. cgf -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |