From: Haegeun Park Date: Wed, 31 Jul 2013 05:39:59 +0000 (-0700) Subject: [Title] SIGILL will be occurred if an app queries an undefined extension. X-Git-Tag: submit/devel/coregl/20151204.063909^2~60^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=401e6661751b689bdbde21482473d4602c2f4135;p=platform%2Fcore%2Fuifw%2Fcoregl.git [Title] SIGILL will be occurred if an app queries an undefined extension. [Issue#] [Problem] [Cause] [Solution] - We will be able to register undefined extensions when detects SIGILL error. - eglSwapBuffersRegionSEC was renamed to 'eglSwapBuffersRegionEXT' --- diff --git a/include/EGL/sym_egl.h b/include/EGL/sym_egl.h index 61062d4..4e1c6ca 100644 --- a/include/EGL/sym_egl.h +++ b/include/EGL/sym_egl.h @@ -83,7 +83,7 @@ _COREGL_EXT_SYMBOL(GL_TRUE, EGLBoolean, eglUnlockSurfaceKHR, (EGLDisplay display _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() diff --git a/src/headers/sym_egl.h b/src/headers/sym_egl.h index 61062d4..4e1c6ca 100644 --- a/src/headers/sym_egl.h +++ b/src/headers/sym_egl.h @@ -83,7 +83,7 @@ _COREGL_EXT_SYMBOL(GL_TRUE, EGLBoolean, eglUnlockSurfaceKHR, (EGLDisplay display _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() diff --git a/src/modules/fastpath/coregl_fastpath_egl.c b/src/modules/fastpath/coregl_fastpath_egl.c index 80d7726..c1998ad 100644 --- a/src/modules/fastpath/coregl_fastpath_egl.c +++ b/src/modules/fastpath/coregl_fastpath_egl.c @@ -7,6 +7,8 @@ #include #include +#include +int kill(pid_t pid, int sig); #ifdef COREGL_FASTPATH_TRACE_CONTEXT_INFO @@ -1325,14 +1327,14 @@ fastpath_eglGetProcAddress(const char* procname) } #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; \ - } + } #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) \ - if (strcmp(procname, #FUNC_NAME) == 0) \ - goto finish; + if (strcmp(procname, #FUNC_NAME) == 0) \ + goto finish; #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 - 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;