public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "l dot jirkovsky at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/38625]  New: Segmentation fault when dereferencing valid pointer, probably REGRESSION
Date: Thu, 25 Dec 2008 10:12:00 -0000	[thread overview]
Message-ID: <bug-38625-16054@http.gcc.gnu.org/bugzilla/> (raw)

First, I'd like to apologize that I wasn't able to extract the problematic
code. I hope somebody more experienced will find the way how to do it.

Problematic code is in enblend, which can be downloaded from cvs using cvs:
cvs -z3 -d :pserver:anonymous@enblend.cvs.sourceforge.net:/cvsroot/enblend -f
enblend

The problem is in src/mask.h:228 in (*mxLeft != *mx). It seems that it crashes
when dereferencing pointer (which should be valid because it's used before),
because it even doesn't get to overloaded operator!= function in
include/vigra/diff2d.hxx:1093

I've tested it with gcc 3.4.6 and it works without segfaults, so I think that
it can be some regression. Moreover, windows version compiled with MSVC seems
do be unaffected too.

I think it can be somewhat connected to bug #32896.

It has already been reported in hugin's bugtracker (enblend is a part of it):
https://sourceforge.net/tracker2/?func=detail&aid=2121647&group_id=77506&atid=550441

Steps to reproduce:
-------------------
compile enblend:
  make -f Makefile.cvs
  ./configure --prefix=/usr --enable-debug=no --with-x
  sed -i 's|#define\ malloc\ rpl_malloc|/* & */|' config.h # sometimes maloc is
not detected corectly
  make
Download test files which cause segfault and unzip them from:
  http://blender6xx.ic.cz/pub/DEBUG.zip
run enblend:
  enblend kladruby00* -o test.tif

After some time it segfaults

System information
------------------
OS: Archlinux current (but it affect wide spectrum of distributions, so it's
not problem in only one distro)

uname -a: Linux red_dragon 2.6.27.10 #2 Sat Dec 20 09:47:07 CET 2008 i686
Intel(R) Pentium(R) 4 CPU 2.00GHz GenuineIntel GNU/Linux

gcc -v:
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr --enable-shared
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --enable-threads=posix
--mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit
--disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu
--disable-libstdcxx-pch --with-tune=generic
Thread model: posix
gcc version 4.3.2 (GCC)

gcc-3.4 -v
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/specs
Configured with: ../gcc-3.4.6/configure --prefix=/usr --enable-shared
--enable-languages=c,c++ --enable-threads=posix --mandir=/usr/share/man
--libexecdir=/usr/lib --enable-__cxa_atexit --disable-multilib
--libdir=/usr/lib --enable-clocale=gnu --program-suffix=-3.4
Thread model: posix
gcc version 3.4.6


-- 
           Summary: Segmentation fault when dereferencing valid pointer,
                    probably REGRESSION
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: l dot jirkovsky at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38625


             reply	other threads:[~2008-12-25 10:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-25 10:12 l dot jirkovsky at gmail dot com [this message]
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
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
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
2009-01-29 11:19 ` l dot jirkovsky at gmail dot com
2010-01-02 19:40 ` rguenth at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-38625-16054@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).