public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: wuerkner@gmx.de
To: gcc-gnats@gcc.gnu.org
Subject: c++/7046: wrong template instantiation within #pragma pack(1) context
Date: Sun, 16 Jun 2002 06:46:00 -0000	[thread overview]
Message-ID: <20020616094930.22233.qmail@sources.redhat.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2239 bytes --]


>Number:         7046
>Category:       c++
>Synopsis:       wrong template instantiation within #pragma pack(1) context
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 16 02:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Frank Würkner
>Release:        gcc 2.95.3
>Organization:
>Environment:
SuSE Linux 7.3 (Kernel 2.4.18)
>Description:
templates that are instantiated within a #pragma pack(1) context, generate code as if they where defined with #pragma pack(1).
The result is, that one can create instantiations (in other compile units) that place class member variables on different memory locations for the SAME template arguments. Thus leeding to obvious data corruption when accessing them from different compile units.
>How-To-Repeat:
Unpack Attachment.
cd gcc_bug
./run.sh (compiles and runs example)
>Fix:
template instantiations should respect the #pragma pack-state of their definition. The current state when beeing instantiated should be irrelevant.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-gzip; name="gcc_bug.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gcc_bug.tar.gz"

H4sIAHtZDD0AA+2X32/aMBDHecV/xSmVKli14IQkSA1FqrY9IE1s0njYGwrBBGsQR8HR6Cr+99oh
oVBo6Uvoqt7nxYl/3Fl2vrm7KAxH4yxq1SqEUod2XFe1OU/bzXPHpW3qeE6nU6OWZXluDdwqN1WS
LWWQAtRSIeRL806Nv1Oi4v4XAY/NMEmq8EEtSj3Hefb+265X3n/b81S/ZXtU3T+tYjNP+eD3f8Hj
cJ5NGHS5WMqUBYseIdtOQ8gZS82ZQQiPJeiPpNEk96Qu2VJC4JN6KDIJ3S4YS/6PiWlDDzSBxxCK
RcLnDLKYbxbqrwvg5gYMPT8w9YLRuNHUbyyezF9tbLMnba00FjE5UpvPQtWolbs2ST1lMktjoD5Z
k7c+7f+PUv/FRVfi46T+bXerf+paWv9OG/V/FiRbJPNAsu5YiDkMe7DREWjpjcpBrXit/5V1bfvF
o50/bl5yKQdKdvdQqK0Q8Cc548umD+udeeMX562VZOVdwiZsur+HrtoX6+V9agpbSaaWa6MH4vdR
5q+n1H+axeayGvnn+u8c6n6rf9uySv07ltXW+rc9D/V/DqKrq52Auo3Tl5dgtgJTxWPCwpkAwyja
v1zOgK2SOQ9VKOaxOr1Y8kByEV8bRFv7/PXb75/f+1/6w1F/8Gt4Oxj2b4f9H4MTbt76ID4o+/G/
mgLgVPx3PHsb/11P139ttQD1fw6OpPqPJYEKqzyO8oJgqgPycWGTVgumfAXju2d+DKSM4cciuk8u
VKbOp8pJkgbRIoAkCP80rCYpMpGpEHsVx9GY/5hRFIWFykZ0OqHziT27zU0lc2BAu1CeYOVvK4aV
eSS1wBoCQRAEQRAEQRAEQRAEQRAEeQ88AE36bb8AKAAA


                 reply	other threads:[~2002-06-16  9:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20020616094930.22233.qmail@sources.redhat.com \
    --to=wuerkner@gmx.de \
    --cc=gcc-gnats@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).