mainThe GNU Bourne-Again SHell - Support: sr #110633, bash errorously uses strtoimax if...


sr #110633: bash errorously uses strtoimax if symbol exists even if missing in headers

Submitter:  None
Submitted:  Thu 07 Apr 2022 05:07:49 AM UTC
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup

Mon 11 Apr 2022 03:30:23 PM UTC, comment #3: 

So maybe the thing to do is to replace strtoimax if HAVE_DECL_STRTOIMAX is 0.

Chet Ramey <chet>
Group administrator
Sat 09 Apr 2022 07:00:13 AM UTC, comment #2: 

Here's the output
$ uname -a
AIX helios 3 4 0006DC2F4C00

$ grep STRTOIMAX config.h    

Michael Casadevall <ncommander>
Fri 08 Apr 2022 09:16:34 PM UTC, comment #1: 

What does `grep STRTOIMAX config.h' output?

Chet Ramey <chet>
Group administrator
Thu 07 Apr 2022 05:07:49 AM UTC, original submission:  

Been doing a retro computing project, and discovered that bash's configure script checks if strtoimax exists if the symbol is present even if the prototype is missing. This causes bash to use the system strtoimax even if its non-functional, and leads to breakage on old versions of AIX.

This results in legal_number always failing, and any error to use redirects to error out as such:

Tested on bash 5.1.16:
bash-2.05a# ./bash -c "echo test 2> /dev/null"
./bash: file descriptor out of range: A file descriptor does not refer to an open file.

Bash does have a replacement implementation for strtoimax, so this probably is just a matter of changing autoconf macros, and straight forward to fix.



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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by ncommander (Posted a comment)
  • -email is unavailable- added by chet (Posted a comment)

    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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-04-11 chet StatusIn Progress Done
    2022-04-08 chet StatusNone In Progress

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code