From: Laurent <[email protected]>
Change the check_exec_crash test to use a function pointer instead of
simply calling the function. The EBP availability test will crash when
compiled with ICL likely due to compiler optimization shenanigans.
Originally the check_exec_crash code was moved out of main to fix a
problem with gcc's treatment of non-leaf main on x86_32. libav already
moved the code out of main but the addition of the function pointer will
prevent any inlining which fixes the remaining problem.
A function pointer is used since it is compiler agnostic (as opposed to
say __attribute__ ((noinline)) which would only work with gcc compatible
compilers).
Conflicts:
configure
---
configure | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index e3cf0b9..819f9e6 100755
--- a/configure
+++ b/configure
@@ -908,9 +908,10 @@ check_exec_crash(){
static void sighandler(int sig){
raise(SIGTERM);
}
-int foo(void){
+int func(void){
$code
}
+int (*func_ptr)(void) = func;
int main(void){
signal(SIGILL, sighandler);
signal(SIGFPE, sighandler);
@@ -918,7 +919,7 @@ int main(void){
#ifdef SIGBUS
signal(SIGBUS, sighandler);
#endif
- foo();
+ return func_ptr();
}
EOF
}
--
1.8.1.msysgit.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel