Bug 505163

Summary: gdb calculates wrong address on zero-length arrays inside structure
Product: [Fedora] Fedora Reporter: Miao ZhiCheng <hellwolf.misty>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: dvlasenk, jan.kratochvil
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 6.8.50.20090302-27.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 505333 (view as bug list) Environment:
Last Closed: 2009-06-16 01:54:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 505333    

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.