Bug 154483

Summary: [patch] devel/cgdb -- fix segfault on amd64
Product: Ports & Packages Reporter: Pietro Cerutti <gahr>
Component: Individual Port(s)Assignee: Cheng-Lung Sung <clsung>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Pietro Cerutti freebsd_committer freebsd_triage 2011-02-03 11:20:07 UTC
A missing declaration of void *cgdb_malloc(size_t) makes the compiler assume that the function return int, thus truncating the returned 64-bit pointer to 32 bits.
This causes the returned malloc'd pointer to point to an invalid location, thus causing the seg-fault. This has been discussed with one of the authors on IRC, a fix will be included in the next version upstream. I think it is important nonetheless to include a patch immediately to prevent systematic segfaults on amd64.

Fix: Add this patch.

Patch attached with submission follows:
How-To-Repeat: Run cgdb on amd64.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-02-03 11:20:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->clsung

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2011-02-03 13:43:14 UTC
gahr        2011-02-03 13:43:10 UTC

  FreeBSD ports repository

  Modified files:
    devel/cgdb           Makefile distinfo 
  Added files:
    devel/cgdb/files     patch-rline.c 
  Log:
  - Fix a segfault at application start on amd64
  - Bump PORTREVISION
  - Remove MD5 checksum from distinfo
  
  PR:             154483
  Submitted by:   gahr
  Approved by:    clsung (maintainer)
  Feature safe:   yes
  
  Revision  Changes    Path
  1.21      +1 -0      ports/devel/cgdb/Makefile
  1.6       +0 -1      ports/devel/cgdb/distinfo
  1.1       +11 -0     ports/devel/cgdb/files/patch-rline.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Pietro Cerutti freebsd_committer freebsd_triage 2011-02-03 13:43:24 UTC
State Changed
From-To: open->closed

Committed. Thanks!