stack grow direction wrongly detected

Marco Atzeri marco.atzeri@gmail.com
Sat Mar 6 09:12:46 GMT 2021


On 06.03.2021 02:06, Takashi Yano via Cygwin wrote:
> On Fri, 5 Mar 2021 21:29:49 +0100
> Marco Atzeri wrote:

>>     dir = depth ? find_stack_direction (addr, depth - 1) : 0;
>                     ^^^^^^^^^^^^^^^^^^^^
> This calls find_stack_direction() recursively, isn't it?

yeah. Never write when tired ...

> 
>>     return dir + dummy;
>> }
>>
>> int
>> main (int argc, char **argv)
>> {
>>     return find_stack_direction (0, argc + !argv + 20) < 0;
>> }])],
> 
> Recursion depth seems to be increased to more than 20.

probably to produce a portable result without going inline





More information about the Cygwin mailing list