Bug 505163 - gdb calculates wrong address on zero-length arrays inside structure
Summary: gdb calculates wrong address on zero-length arrays inside structure
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 505333
TreeView+ depends on / blocked
 
Reported: 2009-06-10 20:37 UTC by Miao ZhiCheng
Modified: 2009-06-18 11:51 UTC (History)
2 users (show)

Fixed In Version: 6.8.50.20090302-27.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 505333 (view as bug list)
Environment:
Last Closed: 2009-06-16 01:54:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miao ZhiCheng 2009-06-10 20:37:59 UTC
Version-Release number of selected component (if applicable):
6.8-29.fc10

How reproducible:
example code,

struct {
    int n;
    int a[0];
} b;

(gdb) p &b->a
$1 = (int (*)[]) 0x80495ec
(gdb) p &b->a[0]
$2 = (int *) 0x9a0458c

but b->a and &b->a[0] should be the same address.

Comment 1 Fedora Update System 2009-06-11 21:59:32 UTC
gdb-6.8.50.20090302-25.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/gdb-6.8.50.20090302-25.fc11

Comment 2 Fedora Update System 2009-06-11 22:01:44 UTC
gdb-6.8.50.20090302-25.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/gdb-6.8.50.20090302-25.fc11

Comment 3 Jan Kratochvil 2009-06-11 22:03:27 UTC
There is also an F10 update:
https://admin.fedoraproject.org/updates/gdb-6.8-30.fc10

It was a bug from the VLA (variable-length-arrays) + Fortran-dynamic-arrays support, thanks.

Comment 4 Miao ZhiCheng 2009-06-12 09:29:23 UTC
I've tried the updates, and it solves the problem.

Thanks for your work.

Comment 5 Fedora Update System 2009-06-13 10:05:20 UTC
gdb-6.8-24.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/gdb-6.8-24.fc9

Comment 6 Fedora Update System 2009-06-15 13:14:12 UTC
gdb-6.8.50.20090302-27.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/gdb-6.8.50.20090302-27.fc11

Comment 7 Fedora Update System 2009-06-16 01:54:36 UTC
gdb-6.8-30.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2009-06-16 02:05:20 UTC
gdb-6.8-24.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2009-06-18 11:51:39 UTC
gdb-6.8.50.20090302-27.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.