Bug 505163 - gdb calculates wrong address on zero-length arrays inside structure
gdb calculates wrong address on zero-length arrays inside structure
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: Jan Kratochvil
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 505333
  Show dependency treegraph
 
Reported: 2009-06-10 16:37 EDT by Miao ZhiCheng
Modified: 2009-06-18 07:51 EDT (History)
2 users (show)

See Also:
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-15 21:54:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miao ZhiCheng 2009-06-10 16:37:59 EDT
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 17:59:32 EDT
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 18:01:44 EDT
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 18:03:27 EDT
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 05:29:23 EDT
I've tried the updates, and it solves the problem.

Thanks for your work.
Comment 5 Fedora Update System 2009-06-13 06:05:20 EDT
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 09:14:12 EDT
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-15 21:54:36 EDT
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-15 22:05:20 EDT
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 07:51:39 EDT
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.