httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52252] New: luajit support broken for (at least) luajit 2.0
Date Sun, 27 Nov 2011 19:44:08 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52252

             Bug #: 52252
           Summary: luajit support broken for (at least) luajit 2.0
           Product: Apache httpd-2
           Version: 2.4-HEAD
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_lua
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: sf@sfritsch.de
    Classification: Unclassified


luajit 2.0 uses headers and library with different names than normal lua. For
example on Debian, headers are in /usr/include/luajit-2.0/ and the library is
called libluajit-5.1.so.2.

The library/header detection code of mod_lua does not have a special case for
luajit at all and does not look for the pathnames of luajit.

Also, if I fix the linking, httpd aborts with this message:

[Sun Nov 27 20:37:19.619445 2011] [lua:debug] [pid 22767] mod_lua.c(206):
[client 127.0.0.1:54230] request details scope:0,
filename:/home/stf/apache/perl-framework/t/htdocs/modules/lua/translate.lua,
function:translate_name
PANIC: unprotected error in call to Lua API (attempt to index a string value)


Commenting out the calls to luaopen_jit and loadjitmodule in lua_vmprep.c
"fixes" this insofar as t/modules/lua.t runs without error.

I don't have access to luajit 1.x, so I can't say if this is just an
incompatibility with 2.0. But considering that the lua 5.1 manual says that
"The luaopen_* functions (to open libraries) cannot be called directly, like a
regular C function. They must be called through Lua, like a Lua function." [1],
I think calling luaopen_jit is always wrong.

[1] http://www.lua.org/manual/5.1/manual.html#7.3

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message