stack grow direction wrongly detected

Thomas Wolff towo@towo.net
Sat Mar 6 09:29:01 GMT 2021


Am 06.03.2021 um 09:29 schrieb Marco Atzeri via Cygwin:
> On 05.03.2021 15:43, gs-cygwin.com@gluelogic.com wrote:
>> On Fri, Mar 05, 2021 at 11:31:04PM +0900, Takashi Yano via Cygwin wrote:
>>> On Fri, 5 Mar 2021 13:18:38 +0100
>>> Marco Atzeri wrote:
>>>> Hi Guys,
>>>> noted trying to rebuild guile 1.8.8.
>>>>
>>>> The following piece of code in the past
>>>> was setting SCM_I_GSC_STACK_GROWS_UP=0
>>>> and now produces SCM_I_GSC_STACK_GROWS_UP=1
>>>>
>>>> I assume some change in the gcc compiler is causing the issue.
>>>> I presume most of the programs and libraries do not care,
>>>> but some special one like guile crashes during build for this issue,
>>>> so be aware.
>>>>
>>>> Regards
>>>> Marco
>>>>
>
>>
>> If the compiler is gcc or clang:
>>
>> __attribute__(__noinline__)
>
> thanks Glenn,
>
> as
> __attribute__((__noinline__))
>
> it seems to work
> for all variant of -Ox
>
>> int
>> find_stack_direction ()
>> {
>> ...
>> }
>>
>> Cheers, Glenn
Can somebody explain the weird behaviour previously described, address 
of the char going up 1 byte a few times, then skipping down, etc, and 
why recursive calls are affected at all by inline, and what gcc thinks 
it can optimize in that case?


More information about the Cygwin mailing list