From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32719 invoked by alias); 26 Jul 2002 15:26:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 32701 invoked by uid 71); 26 Jul 2002 15:26:00 -0000 Resent-Date: 26 Jul 2002 15:26:00 -0000 Resent-Message-ID: <20020726152600.32700.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, blackkm@juno.com Received: (qmail 29945 invoked by uid 61); 26 Jul 2002 15:18:02 -0000 Message-Id: <20020726151802.29944.qmail@sources.redhat.com> Date: Fri, 26 Jul 2002 08:26:00 -0000 From: blackkm@juno.com Reply-To: blackkm@juno.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/7414: GCC 3.1 gens bad pointer arithmetic? SIGSEGV X-SW-Source: 2002-07/txt/msg00704.txt.bz2 List-Id: >Number: 7414 >Category: c >Synopsis: GCC 3.1 gens bad pointer arithmetic? SIGSEGV >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Fri Jul 26 08:26:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: K Black >Release: gcc version 3.1 >Organization: >Environment: Windows XP Home, Cygwin >Description: code appears to compile with no errors and no warnings. But always produces SIGSEGV at run time >How-To-Repeat: Line 10 (/* fails here */) appears to always fail with a segmentation fault (SIGSEGV?)? char *t[3]={ "\0one", "\0two", "zzz"}; main() { printf("t[1] before: %s\n",t[1]); t[1][0]=' '; /* fails here */ printf("t[1] afterwords: %s\n",t[1]); } >Fix: unknown - tried several variations on pointers and arrays >Release-Note: >Audit-Trail: >Unformatted: