[Title] SIGILL will be occurred if an app queries an undefined extension.
authorHaegeun Park <haegeun.park@samsung.com>
Wed, 31 Jul 2013 05:39:59 +0000 (22:39 -0700)
committerHaegeun Park <haegeun.park@samsung.com>
Wed, 31 Jul 2013 05:39:59 +0000 (22:39 -0700)
[Issue#]
[Problem]
[Cause]
[Solution]
- We will be able to register undefined extensions when detects SIGILL error.
- eglSwapBuffersRegionSEC was renamed to 'eglSwapBuffersRegionEXT'

include/EGL/sym_egl.h
src/headers/sym_egl.h
src/modules/fastpath/coregl_fastpath_egl.c

index 61062d4..4e1c6ca 100644 (file)
@@ -83,7 +83,7 @@ _COREGL_EXT_SYMBOL(GL_TRUE, EGLBoolean, eglUnlockSurfaceKHR, (EGLDisplay display
 _COREGL_EXT_SYMBOL_ALIAS(eglUnlockSurfaceKHR, eglUnlockSurface)
 
 // Verified extensions
 _COREGL_EXT_SYMBOL_ALIAS(eglUnlockSurfaceKHR, eglUnlockSurface)
 
 // Verified extensions
-_COREGL_EXT_SYMBOL_FASTPATH_PASS(eglSwapBuffersRegionSEC)
+_COREGL_EXT_SYMBOL_FASTPATH_PASS(eglSwapBuffersRegionEXT)
 
 // Blocked extensions
 //_COREGL_EXT_SYMBOL_FASTPATH_BLOCK()
 
 // Blocked extensions
 //_COREGL_EXT_SYMBOL_FASTPATH_BLOCK()
index 61062d4..4e1c6ca 100644 (file)
@@ -83,7 +83,7 @@ _COREGL_EXT_SYMBOL(GL_TRUE, EGLBoolean, eglUnlockSurfaceKHR, (EGLDisplay display
 _COREGL_EXT_SYMBOL_ALIAS(eglUnlockSurfaceKHR, eglUnlockSurface)
 
 // Verified extensions
 _COREGL_EXT_SYMBOL_ALIAS(eglUnlockSurfaceKHR, eglUnlockSurface)
 
 // Verified extensions
-_COREGL_EXT_SYMBOL_FASTPATH_PASS(eglSwapBuffersRegionSEC)
+_COREGL_EXT_SYMBOL_FASTPATH_PASS(eglSwapBuffersRegionEXT)
 
 // Blocked extensions
 //_COREGL_EXT_SYMBOL_FASTPATH_BLOCK()
 
 // Blocked extensions
 //_COREGL_EXT_SYMBOL_FASTPATH_BLOCK()
index 80d7726..c1998ad 100644 (file)
@@ -7,6 +7,8 @@
 
 #include <sys/types.h>
 #include <unistd.h>
 
 #include <sys/types.h>
 #include <unistd.h>
+#include <signal.h>
+int kill(pid_t pid, int sig);
 
 #ifdef COREGL_FASTPATH_TRACE_CONTEXT_INFO
 
 
 #ifdef COREGL_FASTPATH_TRACE_CONTEXT_INFO
 
@@ -1325,14 +1327,14 @@ fastpath_eglGetProcAddress(const char* procname)
        }
 
 #define _COREGL_EXT_SYMBOL_ALIAS(FUNC_NAME, ALIAS_NAME) \
        }
 
 #define _COREGL_EXT_SYMBOL_ALIAS(FUNC_NAME, ALIAS_NAME) \
-   if (strcmp(procname, #ALIAS_NAME) == 0) \
-   { \
+       if (strcmp(procname, #ALIAS_NAME) == 0) \
+       { \
                _eng_fn ret_orig = NULL; \
                ret_orig = _orig_fastpath_eglGetProcAddress(#FUNC_NAME); \
                if (ret_orig != NULL) \
                        ret = (_eng_fn)ovr_##FUNC_NAME; \
                goto finish; \
                _eng_fn ret_orig = NULL; \
                ret_orig = _orig_fastpath_eglGetProcAddress(#FUNC_NAME); \
                if (ret_orig != NULL) \
                        ret = (_eng_fn)ovr_##FUNC_NAME; \
                goto finish; \
-   }
+       }
 
 #include "../../headers/sym_egl.h"
 #include "../../headers/sym_gl.h"
 
 #include "../../headers/sym_egl.h"
 #include "../../headers/sym_gl.h"
@@ -1344,22 +1346,23 @@ fastpath_eglGetProcAddress(const char* procname)
        {
 
 #define _COREGL_EXT_SYMBOL_FASTPATH_PASS(FUNC_NAME) \
        {
 
 #define _COREGL_EXT_SYMBOL_FASTPATH_PASS(FUNC_NAME) \
-   if (strcmp(procname, #FUNC_NAME) == 0) \
-      goto finish;
+       if (strcmp(procname, #FUNC_NAME) == 0) \
+               goto finish;
 
 #define _COREGL_EXT_SYMBOL_FASTPATH_BLOCK(FUNC_NAME) \
 
 #define _COREGL_EXT_SYMBOL_FASTPATH_BLOCK(FUNC_NAME) \
-   if (strcmp(procname, #FUNC_NAME) == 0) \
-   { \
-      ret = NULL; \
-      goto finish; \
-   }
+       if (strcmp(procname, #FUNC_NAME) == 0) \
+       { \
+               ret = NULL; \
+               goto finish; \
+       }
 
 #include "../../headers/sym_egl.h"
 #include "../../headers/sym_gl.h"
 #undef _COREGL_EXT_SYMBOL_FASTPATH_PASS
 #undef _COREGL_EXT_SYMBOL_FASTPATH_BLOCK
 
 
 #include "../../headers/sym_egl.h"
 #include "../../headers/sym_gl.h"
 #undef _COREGL_EXT_SYMBOL_FASTPATH_PASS
 #undef _COREGL_EXT_SYMBOL_FASTPATH_BLOCK
 
-               COREGL_WRN("\E[40;31;1mFASTPATH can't support '%s' (unmanaged situation will be occur!)\E[0m\n", procname);
+               COREGL_ERR("\E[40;31;1mFASTPATH can't support '%s' (will be terminated with Illegal instruction!)\E[0m\n", procname);
+               kill(getpid(), SIGILL);
        }
 
        goto finish;
        }
 
        goto finish;