From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17484 invoked by alias); 20 Dec 2002 15:06:34 -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 17450 invoked by uid 71); 20 Dec 2002 15:06:31 -0000 Resent-Date: 20 Dec 2002 15:06:31 -0000 Resent-Message-ID: <20021220150631.17449.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, d.petropoulos@encode-sec.com Received: (qmail 15801 invoked by uid 61); 20 Dec 2002 15:01:21 -0000 Message-Id: <20021220150121.15800.qmail@sources.redhat.com> Date: Fri, 20 Dec 2002 07:06:00 -0000 From: d.petropoulos@encode-sec.com Reply-To: d.petropoulos@encode-sec.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/9025: GNU C compiler does not honour 'const' type qualifier X-SW-Source: 2002-12/txt/msg01093.txt.bz2 List-Id: >Number: 9025 >Category: c >Synopsis: GNU C compiler does not honour 'const' type qualifier >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Fri Dec 20 07:06:30 PST 2002 >Closed-Date: >Last-Modified: >Originator: Dimitrios Petropoulos >Release: multiple >Organization: >Environment: * Solaris 8, sparc, GCC 3.1 * AIX 4.3, PowerPC, GCC 2.9-aix51-020209 * Linux, x86, GCC 2.96 >Description: The gcc compiler (multiple versions and platforms) does not honour the 'const' type qualifier (it allows the program to modify a variable declared as const). Depending on the scope of the declaration the effect of this can range from overwriting the variable which has been declared as constant to segmentation fault of the program (with associated overwriting of registers). The attached file causes a segmentation fault and overwrites the instruction pointer on Linux or the r0 register on PowerPC. >How-To-Repeat: Just compile (no special flags/directive needed) >Fix: >Release-Note: >Audit-Trail: >Unformatted: