This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: short C code that uses AVX and fails under Cygwin
- From: Warren Young <wyml at etr-usa dot com>
- To: The Cygwin Mailing List <cygwin at cygwin dot com>
- Date: Thu, 14 Jan 2016 13:58:36 -0700
- Subject: Re: short C code that uses AVX and fails under Cygwin
- Authentication-results: sourceware.org; auth=none
- References: <56980313 dot 5030205 at mit dot edu>
On Jan 14, 2016, at 1:20 PM, Ilya Razenshteyn <ilyaraz@mit.edu> wrote:
>
> the below C code fails under Cygwin.
It segfaults here. Is that what you mean by âfailsâ?
> the environment is: Windows 8.1, Cygwin 2.3.1, GCC 4.9.3, CPU 'Intel(R) Core(TM) i7-4510U CPU @ 2.00GHzâ
It fails on my recently-updated Windows 10 64-bit VM running a recently-updated 64-bit Cygwin on an Intel(R) Core i7-3770 CPU @ 3.40GHz.
> int main(void) {
> void *buf = malloc(1);
The problem isnât the malloc, the problem is the pointer pushing âresâ 4 or 8 bytes down the stack. The same thing happens with an int.
This feels like an alignment problem, so I started throwing other stuff ahead of res to see if I could make the symptom go away. This is the smallest object Iâve been able to make that does that:
uint8_t x[20] = { 0 };
I havenât tried every value between 1 and 19, but all of the obvious ones (8, 10, 12, 16) fail. I donât know what makes 20 magic.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple