A new build of libvpx-0.9.1 has been uploaded to the repository. It includes the -fno-common CFLAG. The effect of not having that there is a known mingw32 bug that doesn’t properly align some global variables. It lead to crashes on shared builds (should also have happened for static builds, but for mysterious reasons it didn’t). Thanks to James for reporting the bug.
2010/06/30
3 Comments »
RSS feed for comments on this post.
If I don’t ask this I won’t sleep! How did you figure out that -fno-common (I know what it does) could be the workaround for this bug.
Comment by James — 2010/07/01 @ 7:18 am
I checked what was the value in that %edi and where it had come from. then traced it back to a global array, checked the declaration of the array (it would have to be 16-byte aligned, and indeed in the code it was), compiled entropy.c again with -save-temps, looked at the assembly file generated, and noticed it had “.comm” in there (as in that array could be in a common section) and no alignment information. Then I remembered of a gcc < 4.5 bug on MinGW that .comm dropped alignment information, and -fno-common could be used to counter that. That flag is set unconditionally by FFmpeg for quite some time now.
Comment by ramiro — 2010/07/01 @ 12:17 pm
Thanks for all your effort. I knew it was not easy!, that is really a weird bug and one hard to trace, as I was looking at the runtime and not at the compiler / linker.
Comment by James — 2010/07/01 @ 3:46 pm