This is the mail archive of the gcc-bugs@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]

c++/4807: A very specific, but simple class heirchy causes gcc to make what appears to be mislocated objects. After the object is created, the address is not accessable, and can not be viewed in the debugger. Adding or removing some variables from the cla


>Number:         4807
>Category:       c++
>Synopsis:       A very specific, but simple class heirchy causes gcc to make what appears to be mislocated objects. After the object is created, the address is not accessable, and can not be viewed in the debugger. Adding or removing some variables from
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 06 14:26:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     amendola@altavista.net
>Release:        2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)
>Organization:
>Environment:
Mandrake 8.1, Intel PIII. 

>Description:
A very specific, but simple class heirchy causes gcc to 
make what appears to be mislocated objects. After the 
object is created, the address is not accessable, 
and can not be viewed in the debugger. Adding or removing 
some variables from the class definition returns the 
behavior to normal. 
>How-To-Repeat:
run the program in gdb:
gdb program
b main
n
display *ufo

This will now display the error message: Cannot access memory at address 0x90983d6

>Fix:
If you change the code by commenting out three variables:

ClTestVector velocity55;
ClTestVector *drawPosition5657;
ClTestVector velocity1retet;

and recompile. All will be well. The object will now be
viewable in the debugger. 

>Release-Note:
>Audit-Trail:
>Unformatted:
  the class definition returns the behavior to normal. 
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="glOrbit.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="glOrbit.ii"

IyAyICJnbE9yYml0LmNjIgpjbGFzcyBDbFRlc3RWZWN0b3J7CnB1YmxpYzoKICBDbFRlc3RWZWN0
b3IoKTsKICB+Q2xUZXN0VmVjdG9yKCk7Cn07CgpjbGFzcyBtZXNoTHsKICBpbnQgaTsKICBtZXNo
TCgpewogICAgaT0wOwogIH0K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IoKXsKfQoKQ2xUZXN0T2JqZWN0OjpDbFRlc3RPYmplY3QoKXsKfQoKQ2xUZXN0T2Jq
ZWN0Ojp+Q2xUZXN0T2JqZWN0KCl7Cn0KCkNsVWZvOjpDbFVmbygpCiAgOiBDbFRlc3RPYmplY3Qo
KXsKfQoKCmludCBtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pewpDbFVmbyAqdWZvOwogIHVm
byA9IG5ldyBDbFVmbygpOwoKfQo=


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