bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in aclocal.m4 / configure ? BASH_STRUCT_WEXITSTATUS_OFFSET


From: Chet Ramey
Subject: Re: Bug in aclocal.m4 / configure ? BASH_STRUCT_WEXITSTATUS_OFFSET
Date: Mon, 14 Sep 2020 09:34:03 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

On 9/13/20 6:17 PM, Andreas K. Hüttel wrote:
> Hi, 
> 
> in aclocal.m4 (and thus also configure), the test for 
> BASH_STRUCT_WEXITSTATUS_OFFSET contains
> 
>   /* crack s */
>   for (i = 0; i < (sizeof(s) - 8); i++)
> 
> Shouldnt this be 
> 
>   /* crack s */
>   for (i = 0; i < (sizeof(s) * 8); i++)
> 
> (* instead of -), see attached trivial patch? The minus sign makes no sense 
> at 
> all since even on x86-64 sizeof(int)=4 ...

Yes, thanks. It's a typo, but has no effect on obtaining the right answer.
On some weird yet-to-be-encountered system, if the exit status were not
available at some offset in the status word, it would result in an infinite
loop.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]