Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent segmentation fault on Android #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Prevent segmentation fault on Android #40

wants to merge 1 commit into from

Conversation

develCuy
Copy link

somehow the method used produces a segfault, very obscure bug..., using rawset() as a workaround.

@mpeterv
Copy link
Member

mpeterv commented Jun 26, 2016

So is this a bug in rings? Maybe it can be fixed there?

@develCuy
Copy link
Author

All I get is a segmentation fault, I don't know how to debug that.

@ignacio
Copy link
Member

ignacio commented Jun 27, 2016

Can you post a stack trace or something?
El jun 27, 2016 6:07 PM, "Fernando Paredes García" [email protected]
escribió:

All I get is a segmentation fault, I don't know how to debug that.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#40 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AABZo4EXr7FGOviGO9HUJajwQkQ27pX9ks5qP_UqgaJpZM4I-fOk
.

@develCuy
Copy link
Author

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?

@mpeterv
Copy link
Member

mpeterv commented Jun 27, 2016

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.

@develCuy
Copy link
Author

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants