Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 135676

Summary: dev-util/cgdb-0.6.2 segfaults on AMD64 due to Gentoo patch
Product: Gentoo Linux Reporter: Mike Mueller <mike>
Component: New packagesAssignee: Development Tools Team <dev-tools>
Status: VERIFIED FIXED    
Severity: normal CC: bsd+disabled, ka0ttic
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: files/cgdb-fbsd.patch

Description Mike Mueller 2006-06-05 13:31:41 UTC
The patch that gets added to dev-util/cgdb-0.6.2 (for fbsd) causes a crash on 64-bit architectures.  The problem is moving the #include <sys/types.h> above the #define _GNU_SOURCE causes there to be no prototype for ptsname() available to pseudo.c at compile time.  The compiler assumes it returns an int (4-byte), but it really returns a char * (8-byte).

Why was this patch introduced?  As far as we can tell, CGDB compiles on FreeBSD without any patches.  With more info from the person who patched this ebuild (ka0ttic@gentoo.org ?), we can figure out if there's a fix we need to put into CGDB mainline.

Also, CGDB 0.6.3 was released, and after we straighten out this issue, I'd like to get an updated ebuild in there.

Thanks!
Mike (CGDB developer)
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-06-05 13:51:27 UTC
dev-tools
Comment 2 Michael Dale Long 2006-09-03 22:40:25 UTC
I have the same problem on my Athlon64 Gentoo box.  Removing the fbsd patch fixes the problem.  I'm also able to emerge 0.6.3 without any problems if I remove both patches from its ebuild.
Comment 3 Mike Mueller 2006-12-13 14:24:31 UTC
BUMP!  We really need this to be fixed, and it's a really simple fix!
Comment 4 Mike Mueller 2006-12-13 14:33:52 UTC
By the way, that simple fix is: REMOVE THE PATCHES FROM THE EBUILD

Then everything will JUST WORK.
Comment 5 Petteri Räty (RETIRED) gentoo-dev 2006-12-16 10:26:45 UTC
BSD: Ok to remove the patch?
Comment 6 Timothy Redaelli (RETIRED) gentoo-dev 2006-12-16 11:48:38 UTC
Negative, without this patch cgdb 0.6.2 does not compile on non-linux systems.
I attach a new patch that should work everywere
Comment 7 Timothy Redaelli (RETIRED) gentoo-dev 2006-12-16 11:49:30 UTC
Created attachment 104155 [details, diff]
files/cgdb-fbsd.patch
Comment 8 Timothy Redaelli (RETIRED) gentoo-dev 2006-12-16 11:59:53 UTC
Patch corrected, thx
Comment 9 Mike Mueller 2007-02-14 16:55:32 UTC
Thanks, the crash on amd64 is resolved.