From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10037 invoked by alias); 29 Jan 2009 11:19:25 -0000 Received: (qmail 10013 invoked by uid 48); 29 Jan 2009 11:19:14 -0000 Date: Thu, 29 Jan 2009 11:19:00 -0000 Message-ID: <20090129111914.10012.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "l dot jirkovsky at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-01/txt/msg03204.txt.bz2 ------- Comment #11 from l dot jirkovsky at gmail dot com 2009-01-29 11:19 ------- First, I'd like to thank you for doing this hard work and for finding out which patch causes this problem. Anyway I've done more investigation to the problematic code. The problem actually begins in CachedFileImageIteratorBase::operator*() In correct build (without optimizations, with debugging enabled or with "--param inline-unit-growth=60") the currentRow pointer is pointer to "ordinary" array, I'm guessing it's array of unsigned shorts. But in segfaulting build my debugger (gdb) shows me, that currentRow is: vigra::TinyVectorBase > which _data structure doesn't exist in memory. Because it deems really weird I'm not sure the debugger was right (it was run with higly optimized code when only some parts of enblend actually had debugging information on). However if I'm wrong in previous statement, the currentRow should still be valid. I'd took if I was trying to access, lets say, currentRow[1000] which could be out of array bounds, but this code segfaults when I'm trying to access currentRow[0]. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625