bugmake - Bugs: bug #61763, [PATCH] glob: Do not use realloc...

 
 

bug #61763: [PATCH] glob: Do not use realloc wrapper on FreeBSD

Submitter:  Jessica Clarke <jrtc27>
Submitted:  Tue 04 Jan 2022 03:44:02 PM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.3 Operating System:  Any
Fixed Release:  4.4.1 Triage Status:  Small Effort
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 02 Jan 2023 02:49:35 PM UTC, comment #2: 

I decided to own this glob implementation, at least for now: trying to upgrade to the latest gnulib glob implementation and maintain it on systems which don't provide POSIX tools / configure support is simple too daunting: the latest gnulib versions of glob and fnmatch have massively complex configure operations.

So I'll make a pass through these files and remove some of the ridiculously old and unnecessary elements, including this "my_realloc" wrapper.

Paul D. Smith <psmith>
Group administrator
Tue 18 Jan 2022 12:20:23 AM UTC, comment #1: 

Unfortunately the glob.c that comes from GNU make was copied from gnulib and isn't really maintained by GNU make.  Doubly-unfortunately the glob.c that now appears in the current gnulib is massively different AND cannot be used in any environment that doesn't support a complete autoconf deployment (that is, a full configure script with all the POSIX utilities that configure requires).

Since GNU make builds on, and is used by, DOS, Windows, and VMS users, none of which have the ability to run configure natively, we're sort of between a rock and a hard place.

We'll have to decide whether to keep the existing glob implementation, which is extremely outdated and contains some known bugs as well as build issues such as the one you raise, and tweak it, or replace it with the new implementation and figure out how to handle the systems where configure can't be invoked.

Paul D. Smith <psmith>
Group administrator
Tue 04 Jan 2022 03:44:02 PM UTC, original submission:  

FreeBSD's realloc, like any you're likely to encounter these days, is
totally fine for make's uses. The current my_realloc wrapper, by using
char instead of void , results in -Wincompatible-pointer-type warning
spew as, for example, it's passed char *'s, but only void is treated
specially when it comes to warning about implicit conversions.

  • lib/glob.c (my_realloc): Guard with !defined _FreeBSD_
Jessica Clarke <jrtc27>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by jrtc27 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-02 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Component Version4.4 4.3
        Operating SystemPOSIX-Based Any
        Fixed ReleaseNone 4.4.1
        Triage StatusNone Small Effort
    2022-01-04 jrtc27 Attached File- Added 0001-glob-Do-not-use-realloc-wrapper-on-FreeBSD.patch, #52612

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code