Bug 47039 - [BENTO FIX] devel/cxref
Summary: [BENTO FIX] devel/cxref
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-14 09:50 UTC by Chris Knight
Modified: 2003-06-12 05:33 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (830 bytes, patch)
2003-01-14 09:50 UTC, Chris Knight
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Knight 2003-01-14 09:50:02 UTC
cxref self-references itself during the build of the doc subdirectory.
On bento, this results in a core dump of cxref.
However, none of the doc target gets installed.
So, the easiest fix is to not build the doc target.

How-To-Repeat: Build cxref on bento.
Comment 1 corecode@corecode.ath.cx 2003-01-14 15:28:27 UTC
Lately Chris Knight told:

> >Description:
> cxref self-references itself during the build of the doc subdirectory.
> On bento, this results in a core dump of cxref.
> However, none of the doc target gets installed.
> So, the easiest fix is to not build the doc target.

this is the completely wrong approach. don't ignore the problem, fix it:
new file: files/patch-af; bump portrevision (i'd vote for it)?


Index: files/patch-af
===================================================================
RCS file: files/patch-af
diff -N files/patch-af
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-af	14 Jan 2003 15:23:10 -0000
@@ -0,0 +1,16 @@
+--- comment.c.orig	Tue Nov 16 20:11:38 1999
++++ comment.c	Tue Jan 14 16:17:17 2003
+@@ -158,8 +158,11 @@
+ 
+  if(comment)
+    {
+-    malloc_comment=Realloc(malloc_comment,strlen(comment)+1);
+-    strcpy(malloc_comment,comment);
++    if(malloc_comment != comment)
++      {
++       malloc_comment=Realloc(malloc_comment,strlen(comment)+1);
++       strcpy(malloc_comment,comment);
++      }
+     current_comment=malloc_comment;
+    }
+  else


dunno why this was never noticed; mebe because of special malloc()
behavior on tested platforms.

cheers
  simon

-- 
/"\   http://corecode.ath.cx/#donate
\ /
 \     ASCII Ribbon Campaign
/ \  Against HTML Mail and News
Comment 2 Chris Knight 2003-01-14 21:08:48 UTC
Howdy,

> -----Original Message-----
> From: Simon 'corecode' Schubert [mailto:corecode@corecode.ath.cx]
> Sent: Wednesday, 15 January 2003 2:28
> To: Chris Knight
> Cc: FreeBSD-gnats-submit@FreeBSD.org
> Subject: Re: ports/47039: [BENTO FIX] devel/cxref
> 
> [snip]
> 
> this is the completely wrong approach. don't ignore the problem, fix
> it:
> new file: files/patch-af; bump portrevision (i'd vote for it)?
> 
Well, I wasn't deliberately ignoring the problem - my 5.0-RC (20020112)
system built the package just fine without modification. I made the
wrong assumption that it was a bento only issue.

> [snip]
> 
> dunno why this was never noticed; mebe because of special malloc()
> behavior on tested platforms.
> 
My successful build prior to patching used the default malloc settings.

> cheers
>   simon

Regards,
Chris Knight
Systems Administrator
AIMS Independent Computer Professionals
Tel: +61 3 6334 6664  Fax: +61 3 6331 7032  Mob: +61 419 528 795
Web: http://www.aims.com.au
Comment 3 Will Andrews freebsd_committer freebsd_triage 2003-06-12 05:33:39 UTC
State Changed
From-To: open->closed

Committed, thanks.  PORTREVISION bump added.