This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/7877: Incorrect parameter passing to specializations of member function templates


>Number:         7877
>Category:       c++
>Synopsis:       Incorrect parameter passing to specializations of member function templates
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 10 02:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Anthony Williams
>Release:        g++ 3.1 (mingw32 and sparc-solaris-2.7) and g++ 3.2 (mingw32)
>Organization:
>Environment:
Reading specs from d:/local/mingw/bin/../lib/gcc-lib/mingw32/3.1/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable
-languages=f77,c++,objc,ada --disable-win32-registry --disable-shared
Thread model: win32
gcc version 3.1

and

Reading specs from d:/local/mingw/bin/../lib/gcc-lib/i686-pc-mingw32/3.2/specs
Configured with: ../gcc-3.2-20020817-1/configure --enable-languages=c,c++ --pref
ix=d:/local/mingw --enable-threads
Thread model: win32
gcc version 3.2 (mingw special 20020817-1)

and 

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.1/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.1
>Description:
When the attached program is run, the two output lines are different, when they should be the same. e.g.:

lhs=0x22ff6c, rhs=0x22ff68
lhs=0x22ff68, rhs=0x22ff70

This translates into serious bugs, as variables are read incorrectly and random memory is accessed and updated.
>How-To-Repeat:
Compile and run the attached program
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="testtemp.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="testtemp.cpp"

I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGU8dHlwZW5hbWUgVD4Kc3RydWN0IEEKewogICAg
dGVtcGxhdGU8dHlwZW5hbWUgSW5wdXRJdGVyYXRvcj4KICAgIHN0YXRpYyBpbnQgZihJbnB1dEl0
ZXJhdG9yJiBsaHMsSW5wdXRJdGVyYXRvciYgcmhzKTsKfTsKCnN0cnVjdCBUYWcxOwoKdGVtcGxh
dGU8Pgp0ZW1wbGF0ZTx0eXBlbmFtZSBJbnB1dEl0ZXJhdG9yPgppbnQgQTxUYWcxPjo6ZihJbnB1
dEl0ZXJhdG9yJiBsaHMsSW5wdXRJdGVyYXRvciYgcmhzKQp7CiAgICBzdGQ6OmNvdXQ8PCJsaHM9
Ijw8Jmxoczw8IiwgcmhzPSI8PCZyaHM8PHN0ZDo6ZW5kbDsKICAgIHJldHVybiAwOwp9CgppbnQg
bWFpbigpCnsKICAgIGNoYXIgKmxocywqcmhzOwogICAgc3RkOjpjb3V0PDwibGhzPSI8PCZsaHM8
PCIsIHJocz0iPDwmcmhzPDxzdGQ6OmVuZGw7CgogICAgQTxUYWcxPjo6ZihsaHMscmhzKTsKICAg
IHJldHVybiAwOwp9Cgo=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]