1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

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>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351012 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Fritsch
2012-06-16 22:38:58 +00:00
parent 36dc44a89f
commit ca02d628a6
2 changed files with 7 additions and 2 deletions

View File

@@ -240,6 +240,7 @@ AP_LUA_DECLARE(void) ap_lua_load_apache2_lmodule(lua_State *L)
/* 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, apr_pool_t *lifecycle_pool) {
#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_state(apr_pool_t *lifecycle_pool,
"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,