* [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION
2008-12-25 10:12 [Bug c++/38625] New: Segmentation fault when dereferencing valid pointer, probably REGRESSION l dot jirkovsky at gmail dot com
@ 2008-12-25 15:38 ` pinskia at gcc dot gnu dot org
2008-12-25 17:27 ` l dot jirkovsky at gmail dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-25 15:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-25 15:36 -------
>I think it can be somewhat connected to bug #32896.
Unlikely.
Anyways does it segfault when compiled at -O0. How about -O2
-fno-strict-aliasing ?
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION
2008-12-25 10:12 [Bug c++/38625] New: Segmentation fault when dereferencing valid pointer, probably REGRESSION l dot jirkovsky at gmail dot com
2008-12-25 15:38 ` [Bug c++/38625] " pinskia at gcc dot gnu dot org
@ 2008-12-25 17:27 ` l dot jirkovsky at gmail dot com
2008-12-25 18:08 ` l dot jirkovsky at gmail dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: l dot jirkovsky at gmail dot com @ 2008-12-25 17:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from l dot jirkovsky at gmail dot com 2008-12-25 17:25 -------
I've already tested it with -O2 -fno-strict-aliasing without success. I'll test
it with -O0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION
2008-12-25 10:12 [Bug c++/38625] New: Segmentation fault when dereferencing valid pointer, probably REGRESSION l dot jirkovsky at gmail dot com
2008-12-25 15:38 ` [Bug c++/38625] " pinskia at gcc dot gnu dot org
2008-12-25 17:27 ` l dot jirkovsky at gmail dot com
@ 2008-12-25 18:08 ` l dot jirkovsky at gmail dot com
2008-12-25 18:10 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: l dot jirkovsky at gmail dot com @ 2008-12-25 18:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from l dot jirkovsky at gmail dot com 2008-12-25 18:07 -------
with -O0 no segfault
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION
2008-12-25 10:12 [Bug c++/38625] New: Segmentation fault when dereferencing valid pointer, probably REGRESSION l dot jirkovsky at gmail dot com
` (2 preceding siblings ...)
2008-12-25 18:08 ` l dot jirkovsky at gmail dot com
@ 2008-12-25 18:10 ` pinskia at gcc dot gnu dot org
2008-12-25 18:52 ` l dot jirkovsky at gmail dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-25 18:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2008-12-25 18:09 -------
How about -O2 -fno-strict-overflow ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION
2008-12-25 10:12 [Bug c++/38625] New: Segmentation fault when dereferencing valid pointer, probably REGRESSION l dot jirkovsky at gmail dot com
` (3 preceding siblings ...)
2008-12-25 18:10 ` pinskia at gcc dot gnu dot org
@ 2008-12-25 18:52 ` l dot jirkovsky at gmail dot com
2009-01-10 16:42 ` l dot jirkovsky at gmail dot com
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: l dot jirkovsky at gmail dot com @ 2008-12-25 18:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from l dot jirkovsky at gmail dot com 2008-12-25 18:51 -------
-O2 -fno-strict-overflow also segfaults
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION
2008-12-25 10:12 [Bug c++/38625] New: Segmentation fault when dereferencing valid pointer, probably REGRESSION l dot jirkovsky at gmail dot com
` (4 preceding siblings ...)
2008-12-25 18:52 ` l dot jirkovsky at gmail dot com
@ 2009-01-10 16:42 ` l dot jirkovsky at gmail dot com
2009-01-10 16:47 ` l dot jirkovsky at gmail dot com
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: l dot jirkovsky at gmail dot com @ 2009-01-10 16:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from l dot jirkovsky at gmail dot com 2009-01-10 16:42 -------
I've tried it with gcc 4.2.4 and it works perfectly, so it have to be caused by
some change between 4.2.4 and 4.3.2.
I'll try to use svn to find out which commit causes this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION
2008-12-25 10:12 [Bug c++/38625] New: Segmentation fault when dereferencing valid pointer, probably REGRESSION l dot jirkovsky at gmail dot com
` (5 preceding siblings ...)
2009-01-10 16:42 ` l dot jirkovsky at gmail dot com
@ 2009-01-10 16:47 ` l dot jirkovsky at gmail dot com
2009-01-11 23:32 ` hjl dot tools at gmail dot com
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: l dot jirkovsky at gmail dot com @ 2009-01-10 16:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from l dot jirkovsky at gmail dot com 2009-01-10 16:47 -------
I've forgot to post info about gcc 4.2.4:
$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.2.4/configure --prefix=/home/lukas/gcc
--enable-shared --enable-languages=c,c++ --enable-threads=posix
--enable-__cxa_atexit
Thread model: posix
gcc version 4.2.4
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION
2008-12-25 10:12 [Bug c++/38625] New: Segmentation fault when dereferencing valid pointer, probably REGRESSION l dot jirkovsky at gmail dot com
` (6 preceding siblings ...)
2009-01-10 16:47 ` l dot jirkovsky at gmail dot com
@ 2009-01-11 23:32 ` hjl dot tools at gmail dot com
2009-01-11 23:33 ` hjl dot tools at gmail dot com
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-11 23:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from hjl dot tools at gmail dot com 2009-01-11 23:32 -------
This patch
http://gcc.gnu.org/ml/gcc-patches/2007-02/msg00886.html
triggers this crash. It failed at -O1. With gcc 4.4, it failed at -O2.
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl dot tools at gmail dot
| |com
Last reconfirmed|0000-00-00 00:00:00 |2009-01-11 23:32:10
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION
2008-12-25 10:12 [Bug c++/38625] New: Segmentation fault when dereferencing valid pointer, probably REGRESSION l dot jirkovsky at gmail dot com
` (7 preceding siblings ...)
2009-01-11 23:32 ` hjl dot tools at gmail dot com
@ 2009-01-11 23:33 ` hjl dot tools at gmail dot com
2009-01-11 23:47 ` hjl dot tools at gmail dot com
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-11 23:33 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]
------- Comment #9 from hjl dot tools at gmail dot com 2009-01-11 23:33 -------
There are warnings like
../include/vigra/accessor.hxx: In function âvoid
vigra::read_bands(vigra::Decoder*, ImageIterator, Accessor, SrcValueType) [with
ImageIterator = vigra::CachedFileImageIterator<vigra::RGBValue<double, 0u, 1u,
2u> >, Accessor = vigra::RGBAccessor<vigra::RGBValue<double, 0u, 1u, 2u> >,
SrcValueType = double]â:
../include/vigra/accessor.hxx:813: warning: array subscript is above array
bounds
In file included from enblend.h:39,
from enblend.cc:124:
../include/vigra/diff2d.hxx: In function âvoid enblend::maskBounds(MaskType*,
vigra::Rect2D&, vigra::Rect2D&) [with MaskType =
enblend::enblendMain(std::list<vigra::ImageImportInfo*,
std::allocator<vigra::ImageImportInfo*> >&, vigra::ImageExportInfo&,
vigra::Rect2D&) [with ImagePixelType = vigra::RGBValue<unsigned char, 0u, 1u,
2u>]::MaskType]â:
../include/vigra/diff2d.hxx:1108: warning: assuming signed overflow does not
occur when assuming that (X - c) > X is always false
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2009-01-11 23:32:10 |2009-01-11 23:33:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION
2008-12-25 10:12 [Bug c++/38625] New: Segmentation fault when dereferencing valid pointer, probably REGRESSION l dot jirkovsky at gmail dot com
` (8 preceding siblings ...)
2009-01-11 23:33 ` hjl dot tools at gmail dot com
@ 2009-01-11 23:47 ` hjl dot tools at gmail dot com
2009-01-29 11:19 ` l dot jirkovsky at gmail dot com
2010-01-02 19:40 ` rguenth at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-11 23:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from hjl dot tools at gmail dot com 2009-01-11 23:46 -------
Adding "--param inline-unit-growth=60" fixed gcc 4.4 revision 143274
at -O2.
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jh at suse dot cz
Status|WAITING |NEW
Ever Confirmed|0 |1
Last reconfirmed|2009-01-11 23:33:14 |2009-01-11 23:46:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION
2008-12-25 10:12 [Bug c++/38625] New: Segmentation fault when dereferencing valid pointer, probably REGRESSION l dot jirkovsky at gmail dot com
` (9 preceding siblings ...)
2009-01-11 23:47 ` hjl dot tools at gmail dot com
@ 2009-01-29 11:19 ` l dot jirkovsky at gmail dot com
2010-01-02 19:40 ` rguenth at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: l dot jirkovsky at gmail dot com @ 2009-01-29 11:19 UTC (permalink / raw)
To: gcc-bugs
------- 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<unsigned char, 3, unsigned char [3],
vigra::TinyVector<unsigned char, 3> >
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/38625] Segmentation fault when dereferencing valid pointer, probably REGRESSION
2008-12-25 10:12 [Bug c++/38625] New: Segmentation fault when dereferencing valid pointer, probably REGRESSION l dot jirkovsky at gmail dot com
` (10 preceding siblings ...)
2009-01-29 11:19 ` l dot jirkovsky at gmail dot com
@ 2010-01-02 19:40 ` rguenth at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-02 19:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2010-01-02 19:40 -------
Looks like invalid code in the first place.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625
^ permalink raw reply [flat|nested] 13+ messages in thread