Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Feb 2001 18:03:35 +0100 (CET)
From:      Stefan `Sec` Zehl <sec@yoda.fwe.pi.musin.de>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        schilling@fokus.gmd.de, dirk@freebsd.org
Subject:   ports/25286: mkisofs-1.13 core dump.
Message-ID:  <200102221703.f1MH3Z146889@yoda.fwe.pi.musin.de>

next in thread | raw e-mail | index | archive | help

>Number:         25286
>Category:       ports
>Synopsis:       mkisofs-1.13 core dump.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 22 09:10:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Stefan `Sec` Zehl
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
>Environment:

mkisofs-1.13 built on an FreeBSD-4.2 system from the ports

>Description:

mkisofs cores when generating iso's with more than a few bytes.

I traced this down to a segmentation fault in __dtoa. This occures when
mkisofs tries to ouput the:
"  2.60% done, estimate finish Thu Feb 22 17:56:16 2001"
message.

After much debugging, I found out that mkisofs uses a wrong prototype for
the __dtoa function. After I corrected it, and the two offending calls,
it now works fine.

<de>Das kommt davon wenn man nicht-oeffentliche Funktionen benutzt
    *seufz*</de>

>How-To-Repeat:

mkisofs -o /tmp/test.img /directory
(/directory should have somewhere between 100 and 600 MB in size)

>Fix:

Apply this patch.

--- mkisofs-1.13/lib/cvt.c.org	Wed Sep  8 15:03:20 1999
+++ mkisofs-1.13/lib/cvt.c	Thu Feb 22 17:54:38 2001
@@ -31,7 +31,7 @@
 #include <standard.h>
 
 #ifdef	HAVE_DTOA	/* 4.4BSD floating point implementation */
-extern	char *__dtoa	__PR((double value, int mode, int ndigit, int *decpt, int *sign, char **ep));
+extern	char *__dtoa	__PR((double value, int mode, int ndigit, int *decpt, int *sign, char **ep, char ** rp));
 #endif
 
 #ifndef	HAVE_ECVT
@@ -57,7 +57,7 @@
 static	char	*buf;
 	char	*bufend;
 	char	*ep;
-	char	*bp = __dtoa(value, 2, ndigit, decpt, sign, &ep);
+	char	*bp = __dtoa(value, 2, ndigit, decpt, sign, &ep, &bp);
 
 	if (value == 0.0) {
 		/*
@@ -102,7 +102,7 @@
 static	char	*buf;
 	char	*bufend;
 	char	*ep;
-	char	*bp = __dtoa(value, 3, ndigit, decpt, sign, &ep);
+	char	*bp = __dtoa(value, 3, ndigit, decpt, sign, &ep, &bp);
 
 	if (value == 0.0) {
 		/*
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102221703.f1MH3Z146889>