Subject: pkg/17377: texinfo's texindex broken - missing prototype for malloc()/xmalloc()
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cagney@mac.com>
List: netbsd-bugs
Date: 06/24/2002 11:41:12
>Number:         17377
>Category:       pkg
>Synopsis:       texinfo's texindex broken - missing prototype for malloc()/xmalloc()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 24 11:42:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Cagney
>Release:        1.5.2 head userland, April current kernel
>Organization:
>Environment:
NetBSD localhost 1.5ZC NetBSD 1.5ZC (NETLUX) #0: Sun Apr  7 14:25:14 EDT 2002     boor@localhost:/usr/src/new/sys/arch/macppc/compile/NETLUX macppc

>Description:
The GNU texinfo package's texindex program doesn't work on NetBSD/PPC.  The created index file always being empty.

The problem is the sequence (texinfo.c):

    off_t ptr;
    ....
    char *data = (char *) xmalloc (ptr + 1);

where xmalloc() isn't prototyped.

Replacing xmalloc() with a malloc() (and including <stdio.h>) eliminates the problem.

Problem debugged using texinfo 4.2.  Also applies to texinfo 3.x and other 4.x's.


>How-To-Repeat:
Try creating a TeX or pdfTeX version of a GNU packages documentation - the index ends up empty.

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted: