From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31692 invoked by alias); 24 Nov 2009 18:16:46 -0000 Received: (qmail 31651 invoked by uid 48); 24 Nov 2009 18:16:35 -0000 Date: Tue, 24 Nov 2009 18:16:00 -0000 Message-ID: <20091124181635.31650.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug bootstrap/42157] [4.5 regression] ICE building stage 1 libgcc on IRIX 5.3: SEGV in compare_access_positions In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jamborm at gcc dot gnu dot org" 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-11/txt/msg02076.txt.bz2 ------- Comment #1 from jamborm at gcc dot gnu dot org 2009-11-24 18:16 ------- Can you please add a check before the qsort call (tree-sra.c, line 1407) whether all pointers in the access_vec seem OK or whether it is SRA that passes the invalid pointer to qsort? Nothing fancy, something as stupid as the loop below should do: for (i =0; i < access_count; i++) gcc_assert (((unsigned) VEC_index (access_p, access_vec, i)) > 0x1000); If it passes I can't see any other explanation but a bad qsort. If it doesn't we'll need to figure out how the bad pointers get there. I don't have access to the architecture so I can't try it myself. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42157