[FFmpeg-devel] avcodec/proresdec: align dequantization matrix buffers

Submitted by Carl Eugen Hoyos on Nov. 16, 2017, 3:38 a.m.

Details

Message ID CAB0OVGqiVTOETom=fJhu+tJ7s8thgQUcO0g-tVkb__LBmSv1og@mail.gmail.com
State New
Headers show

Commit Message

Carl Eugen Hoyos Nov. 16, 2017, 3:38 a.m.
2017-11-16 3:51 GMT+01:00 James Almer <jamrial@gmail.com>:

> gcc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow
> -fstack-protector-all -fPIE -c -o /tmp/ffconf.OTilhXct/test.o
> /tmp/ffconf.OTilhXct/test.c
> gcc -Wl,-z,relro -Wl,-z,now -fPIE -pie -o /tmp/ffconf.OTilhXct/test.exe
> /tmp/ffconf.OTilhXct/test.o
> F:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> unrecognized option '-z'
> F:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> use the --help option for usage information
> collect2.exe: error: ld returned 1 exit status
> C compiler test failed.
>
> configure can't even succeed with --toolchain=hardened on mingw-w64

Would the following work at all?
check_ldflags is not available yet at that point.




Carl Eugen

Comments

James Almer Nov. 16, 2017, 4:18 a.m.
On 11/16/2017 12:38 AM, Carl Eugen Hoyos wrote:
> 2017-11-16 3:51 GMT+01:00 James Almer <jamrial@gmail.com>:
> 
>> gcc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow
>> -fstack-protector-all -fPIE -c -o /tmp/ffconf.OTilhXct/test.o
>> /tmp/ffconf.OTilhXct/test.c
>> gcc -Wl,-z,relro -Wl,-z,now -fPIE -pie -o /tmp/ffconf.OTilhXct/test.exe
>> /tmp/ffconf.OTilhXct/test.o
>> F:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>> unrecognized option '-z'
>> F:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>> use the --help option for usage information
>> collect2.exe: error: ld returned 1 exit status
>> C compiler test failed.
>>
>> configure can't even succeed with --toolchain=hardened on mingw-w64
> 
> Would the following work at all?
> check_ldflags is not available yet at that point.
> 
> diff --git a/configure b/configure
> index f087ba6..828b018 100755
> --- a/configure
> +++ b/configure
> @@ -3860,6 +3860,13 @@ case "$toolchain" in
>          add_cflags   -fPIE
>          add_ldexeflags -fPIE -pie
>      ;;
> +    hardened-mingw)
> +        add_cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
> +        add_cflags   -fno-strict-overflow -fstack-protector-all
> +        add_ldflags  -fno-strict-overflow -fstack-protector-all
> +        add_cflags   -fPIE
> +        add_ldexeflags -fPIE -pie
> +    ;;
>      ?*)
>          die "Unknown toolchain $toolchain"
>      ;;

Yes, it works, but i can't seem to reproduce the crash with it.
I could however with -fstack-protector-all only.

Patch hide | download patch | download mbox

diff --git a/configure b/configure
index f087ba6..828b018 100755
--- a/configure
+++ b/configure
@@ -3860,6 +3860,13 @@  case "$toolchain" in
         add_cflags   -fPIE
         add_ldexeflags -fPIE -pie
     ;;
+    hardened-mingw)
+        add_cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+        add_cflags   -fno-strict-overflow -fstack-protector-all
+        add_ldflags  -fno-strict-overflow -fstack-protector-all
+        add_cflags   -fPIE
+        add_ldexeflags -fPIE -pie
+    ;;
     ?*)
         die "Unknown toolchain $toolchain"
     ;;