Prevent segmentation fault on Android#40
Prevent segmentation fault on Android#40DevElCuy wants to merge 1 commit intokeplerproject:masterfrom DevElCuy:patch-1
Conversation
|
So is this a bug in rings? Maybe it can be fixed there? |
|
All I get is a segmentation fault, I don't know how to debug that. |
|
Can you post a stack trace or something?
|
|
Unfortunately no, because there is not other message than: "segmentation fault", it looks like a deep C bug, so any idea on how to generate an stack trace for this? |
|
Another helpful thing would be providing a way to reproduce it, a minimal program that results in segfault. Even if it won't segfault under a system that's not Android, it could be helpful. |
|
I'm running a xavante server: local hfile = require "xavante.filehandler"
local hcgi = require "xavante.cgiluahandler"
local hredir = require "xavante.redirecthandler"
local xavante = require "xavante"
-- Define here where Xavante HTTP documents scripts are located
local webDir = './docroot'
local simplerules = {
{ -- URI remapping example
match = "^[^%./]*/$",
with = hredir,
params = {"index.lp"}
},
{ -- cgiluahandler example
match = {"%.lp$", "%.lp/.*$", "%.lua$", "%.lua/.*$" },
with = hcgi.makeHandler (webDir)
},
{ -- filehandler example
match = ".",
with = hfile,
params = {baseDir = webDir}
},
}
xavante.HTTP{
server = {host = "*", port = 80},
defaultHost = {
rules = {}
},
virtualhosts = {
["localhost"] = {
rules = simplerules
},
["fer-droid.cuy"] = {
rules = simplerules
},
}
}
xavante.start()And this is my index.lp: <!doctype html>
<html class="no-js" xml:lang="es" lang="es" dir="ltr">
<body>Hello Kitty!</body>
</html> |
somehow the method used produces a segfault, very obscure bug..., using rawset() as a workaround.