Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 511573 - FTBFS gnupg-1.4.9-5.fc11
Summary: FTBFS gnupg-1.4.9-5.fc11
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnupg
Version: rawhide
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Fedora Extras Quality Assurance
URL: http://linux.dell.com/files/fedora/Fi...
Whiteboard:
Depends On:
Blocks: F12FTBFS
TreeView+ depends on / blocked
 
Reported: 2009-07-15 03:25 UTC by FTBFS
Modified: 2009-07-22 21:30 UTC (History)
3 users (show)

Fixed In Version: gcc-4.4.0-15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-07-22 21:30:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
root.log (336.06 KB, text/plain)
2009-07-15 03:25 UTC, FTBFS
no flags Details
build.log (120.39 KB, text/plain)
2009-07-15 03:25 UTC, FTBFS
no flags Details
mock.log (1023 bytes, text/plain)
2009-07-15 03:25 UTC, FTBFS
no flags Details
root.log (455.88 KB, text/plain)
2009-07-15 03:25 UTC, FTBFS
no flags Details
build.log (114.67 KB, text/plain)
2009-07-15 03:25 UTC, FTBFS
no flags Details
mock.log (954 bytes, text/plain)
2009-07-15 03:25 UTC, FTBFS
no flags Details
cut-down reproducer (412 bytes, text/x-csrc)
2009-07-16 17:32 UTC, Nalin Dahyabhai
no flags Details
repro.i (51.02 KB, text/plain)
2009-07-16 18:21 UTC, Nalin Dahyabhai
no flags Details

Description FTBFS 2009-07-15 03:25:25 UTC
gnupg-1.4.9-5.fc11.src.rpm Failed To Build From Source against the rawhide tree.  See http://fedoraproject.org/wiki/FTBFS for more information.

Comment 1 FTBFS 2009-07-15 03:25:28 UTC
Setting to ASSIGNED per Fedora Bug Triage workflow.  https://fedoraproject.org/wiki/BugZappers/BugStatusWorkFlow

Comment 2 FTBFS 2009-07-15 03:25:31 UTC
Created attachment 352540 [details]
root.log

root.log for i386

Comment 3 FTBFS 2009-07-15 03:25:32 UTC
Created attachment 352541 [details]
build.log

build.log for i386

Comment 4 FTBFS 2009-07-15 03:25:34 UTC
Created attachment 352542 [details]
mock.log

mock.log for i386

Comment 5 FTBFS 2009-07-15 03:25:35 UTC
Created attachment 352543 [details]
root.log

root.log for x86_64

Comment 6 FTBFS 2009-07-15 03:25:36 UTC
Created attachment 352544 [details]
build.log

build.log for x86_64

Comment 7 FTBFS 2009-07-15 03:25:38 UTC
Created attachment 352545 [details]
mock.log

mock.log for x86_64

Comment 8 Nalin Dahyabhai 2009-07-16 17:31:04 UTC
Hmm, __builtin_object_size() doesn't seem to allow for how gnupg allocates and uses "struct para_data_s" in g10/keygen.c.  Changing the way the structure is
laid out will work as a temporary fix, but we should probably ask the toolchain folks about it, too.

Comment 9 Nalin Dahyabhai 2009-07-16 17:32:49 UTC
Created attachment 354021 [details]
cut-down reproducer

Comment 10 Nalin Dahyabhai 2009-07-16 18:21:41 UTC
Created attachment 354030 [details]
repro.i

preprocessed version of repro.c (attachment #354021 [details])

Comment 11 Nalin Dahyabhai 2009-07-16 18:30:03 UTC
Jakub, I boiled down the code in gnupg that crashes during the test suite down to attachment #354030 [details].  Building it with -O2 using gcc-4.4.0-12 triggers __fortify_fail on my x86_64 system.

Do you know if this is something that gcc needs to be allowing for, or should I be looking at reworking the structure definition in gnupg?  I'd appreciate any advice you have.  Thanks!

Comment 12 Jakub Jelinek 2009-07-16 18:54:39 UTC
Yes, this is considered invalid for str*/stp* functions with -D_FORTIFY_SOURCE=2 (valid for -D_FORTIFY_SOURCE=1 and -U_FORTIFY_SOURCE).
Either use memcpy instead of strcpy (memcpy accross field boundaries is valid even with -D_FORTIFY_SOURCE=2, memcpy (l->u.value, "DSA", sizeof "DSA")), or rework the data structures.  Say:
struct list_item {
 struct list_item *next;
 int blah;
};
union list_item_union {
 struct list_item header;
 struct list_item_foo { struct list_item header; foo *foo; } foo;
 struct list_item_bar { struct list_item header; bar *bar; } bar;
 struct list_item_baz { struct list_item header; uint32_t baz; } baz;
 struct list_item_value { struct list_item header; char value[1]; } value;
};
should work (or obviously you can have union for the stuff you don't abuse as wannabe flexible array member).

Comment 13 Nalin Dahyabhai 2009-07-16 21:28:21 UTC
Is there a reference for what's valid and what isn't?  I've found mention of some things that aren't valid in assorted bug reports and mailing list archives, but haven't found a full list to check against.  I'd like to avoid proposing a change upstream that happens to be accepted now but later turns out to be problematic.

Comment 14 Jakub Jelinek 2009-07-20 14:49:22 UTC
Actually, now that I got another similar report (#512689), after some discussions on upstream IRC I'm considering allowing this:
http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01136.html

Comment 15 Nalin Dahyabhai 2009-07-22 21:30:50 UTC
Thanks, Jakub!  The scratch build now succeeds with 4.4.0-15, so I'll mark this as fixed in Raw Hide.


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