From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9109 invoked by alias); 23 Apr 2002 11:56:06 -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 9066 invoked by uid 71); 23 Apr 2002 11:56:03 -0000 Resent-Date: 23 Apr 2002 11:56:03 -0000 Resent-Message-ID: <20020423115603.9065.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, msk@ignlabs.com Received:(qmail 2302 invoked by uid 61); 23 Apr 2002 11:49:35 -0000 Message-Id:<20020423114935.2300.qmail@sources.redhat.com> Date: Tue, 23 Apr 2002 04:56:00 -0000 From: msk@ignlabs.com Reply-To: msk@ignlabs.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: middle-end/6418: mangle.c #2199 (GCC3.04) - Emits *INTERNAL* when handling weak defined templates con- and destructors X-SW-Source: 2002-04/txt/msg01184.txt.bz2 List-Id: >Number: 6418 >Category: middle-end >Synopsis: mangle.c #2199 (GCC3.04) - Emits *INTERNAL* when handling weak defined templates con- and destructors >Confidential: no >Severity: critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Apr 23 04:56:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: IGNLabs OSResearch - DK >Release: 3.00 - 3.04 >Organization: >Environment: Linux IA32 RH6.2- >Description: mangle.c outputs *INTERNAL* into assembler file weak sections, when handling weak defined template constructors and destructors in line 2199 (3.04) - write_string(" *INTERNAL* "); Only con- and destructors are affected. With no support for the export keyword this flaw is fatal when building libraries which uses common templates defined in headers. >How-To-Repeat: Make a derivative of UX2ListNode in a c++ file, and try to compile it. Now examine the assembler output - The weak sections at the end of it will contain: .weak "mangled constructorname" *INTERNAL* .weak "mangled destructorname" *INTERNAL* >Fix: The comment above line 2199 in mangle.c states that the "*INTERNAL*" information should not be placed in the resulting assembler code, but it manages to end up in the asm code somehow. A quick fix is to change *INTERNAL* to #*INTERNAL* - The "not suppossed to be there statement" will now appear as comment to the assembler - not actually a fix to the problem, but a working for the moment solution. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="temptest.hpp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="temptest.hpp" I2RlZmluZSBGVU5DX1dFQUsoeCkgeCBfX2F0dHJpYnV0ZV9fKCh3ZWFrKSkKCnRlbXBsYXRlPGNs YXNzIE4+IGNsYXNzIFVYMkxpc3ROb2Rlewpwcml2YXRlOgogIE4qIHByZXZpb3VzTm9kZTsKICBO KiBuZXh0Tm9kZTsKcHJvdGVjdGVkOgpwdWJsaWM6CiAgRlVOQ19XRUFLKFVYMkxpc3ROb2RlKHZv aWQpKTsKICBGVU5DX1dFQUsodm9pZCBzZXROZXh0KE4qIE5leHQpKTsKICBGVU5DX1dFQUsodm9p ZCBzZXRQcmV2KE4qIFByZXYpKTsKICBGVU5DX1dFQUsoTiogZ2V0TmV4dCh2b2lkKSBjb25zdCk7 CiAgRlVOQ19XRUFLKE4qIGdldFByZXYodm9pZCkgY29uc3QpOwogIEZVTkNfV0VBSyh2aXJ0dWFs IH5VWDJMaXN0Tm9kZSgpKTsKfTs=