mingw-cross-env-list
[Top][All Lists]
Advanced

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

[Mingw-cross-env-list] shifting crashes


From: Daniel Wienzek
Subject: [Mingw-cross-env-list] shifting crashes
Date: Wed, 22 May 2019 08:52:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hello.

I'm trying to build 'Other-Life' [https://github.com/pjbroad/other-life] with mxe.
The code contains 'left shift' expressions like:

    a = (1 << n);

which crashes on win7 i686, but works fine under 'wine'. [built with i686-w64]
The x86_64-w64 code works find under Windows.

I've tried gcc 5/6.
Building a test executable  with just the following works:

    v = atoi(argv[1]);
    printf("\n 1 << %u = 0x%08x\n",v, (1 << v));

Also if i replace the 1 in the other-life code with an unsigned integer like:

    unsigned int b = 1;
    a = ( b << n );

there is no crash.

Is it because of shfting 1 (constant?) ?


Greetings, Daniel






reply via email to

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