httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1351012 - in /httpd/httpd/trunk: CHANGES modules/lua/lua_vmprep.c
Date Sat, 16 Jun 2012 22:38:59 GMT
Author: sf
Date: Sat Jun 16 22:38:58 2012
New Revision: 1351012

URL: http://svn.apache.org/viewvc?rev=1351012&view=rev
Log:
Change prototype of vm_construct, to work around gcc bug which
causes a segfault.

PR: 52779
Submitted by: Dick Snippe <Dick Snippe tech omroep nl>

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/lua/lua_vmprep.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1351012&r1=1351011&r2=1351012&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sat Jun 16 22:38:58 2012
@@ -6,6 +6,9 @@ Changes with Apache 2.5.0
      possible XSS for a site where untrusted users can upload files to
      a location with MultiViews enabled. [Niels Heinen <heinenn google.com>]
 
+  *) mod_lua: Change prototype of vm_construct, to work around gcc bug which
+     causes a segfault. PR 52779. [Dick Snippe <Dick Snippe tech omroep nl>]
+
   *) mod_ssl: If exiting during initialization because of a fatal error,
      log a message to the main error log pointing to the appropriate
      virtual host error log. [Stefan Fritsch]

Modified: httpd/httpd/trunk/modules/lua/lua_vmprep.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_vmprep.c?rev=1351012&r1=1351011&r2=1351012&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_vmprep.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_vmprep.c Sat Jun 16 22:38:58 2012
@@ -240,6 +240,7 @@ AP_LUA_DECLARE(void) ap_lua_load_apache2
 /* callback for cleaning up a lua vm when pool is closed */
 static apr_status_t cleanup_lua(void *l)
 {
+    AP_DEBUG_ASSERT(l != NULL);
     lua_close((lua_State *) l);
     return APR_SUCCESS;
 }
@@ -319,7 +320,7 @@ static int loadjitmodule(lua_State *L, a
 
 #endif
 
-static apr_status_t vm_construct(void **vm, void *params, apr_pool_t *lifecycle_pool)
+static apr_status_t vm_construct(lua_State **vm, void *params, apr_pool_t *lifecycle_pool)
 {
     lua_State* L;
 
@@ -393,7 +394,8 @@ AP_LUA_DECLARE(lua_State*)ap_lua_get_lua
                       "creating lua_State with file %s", spec->file);
         /* not available, so create */
         
-        if(!vm_construct((void **)&L, spec, lifecycle_pool)) {
+        if(!vm_construct(&L, spec, lifecycle_pool)) {
+          AP_DEBUG_ASSERT(L != NULL);
           apr_pool_userdata_set(L, 
                                 spec->file, 
                                 cleanup_lua,



Mime
View raw message