{"action":"created","issue":{"url":"https://api.github.com/repos/craigbarnes/lua-gumbo/issues/41","labels_url":"https://api.github.com/repos/craigbarnes/lua-gumbo/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/craigbarnes/lua-gumbo/issues/41/comments","events_url":"https://api.github.com/repos/craigbarnes/lua-gumbo/issues/41/events","html_url":"https://github.com/craigbarnes/lua-gumbo/issues/41","id":65186761,"number":41,"title":"luajit version failing","user":{"login":"daurnimator","id":127971,"avatar_url":"https://avatars.githubusercontent.com/u/127971?v=3","gravatar_id":"","url":"https://api.github.com/users/daurnimator","html_url":"https://github.com/daurnimator","followers_url":"https://api.github.com/users/daurnimator/followers","following_url":"https://api.github.com/users/daurnimator/following{/other_user}","gists_url":"https://api.github.com/users/daurnimator/gists{/gist_id}","starred_url":"https://api.github.com/users/daurnimator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daurnimator/subscriptions","organizations_url":"https://api.github.com/users/daurnimator/orgs","repos_url":"https://api.github.com/users/daurnimator/repos","events_url":"https://api.github.com/users/daurnimator/events{/privacy}","received_events_url":"https://api.github.com/users/daurnimator/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-30T10:56:40Z","updated_at":"2015-03-30T11:35:21Z","closed_at":null,"body":"Lua 5.1 and 5.2 work fine:\r\n```\r\n$ lua5.2 -e'require \"gumbo\".parse \"<div/>\"'\r\n```\r\n```\r\n$ lua5.1 -e'require \"gumbo\".parse \"<div/>\"'\r\n```\r\nBut luajit fails:\r\n```\r\n$ luajit -e'require \"gumbo\".parse \"<div/>\"'\r\nluajit: /usr/share/lua/5.1/gumbo/ffi-parse.lua:166: Index out of bounds: 28250208\r\nstack traceback:\r\n        [C]: in function 'error'\r\n        /usr/share/lua/5.1/gumbo/ffi-parse.lua:33: in function '__index'\r\n        /usr/share/lua/5.1/gumbo/ffi-parse.lua:166: in function 'parse'\r\n        (command line):1: in main chunk\r\n        [C]: at 0x00404710\r\n```\r\n--------------------------------\r\nVersions and other info:\r\n```\r\n$ luajit\r\nLuaJIT 2.0.3 -- Copyright (C) 2005-2014 Mike Pall. http://luajit.org/\r\nJIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse\r\n```\r\n```\r\n$ luarocks-5.1 show gumbo\r\n\r\ngumbo 0.2-1 - Lua bindings for the Gumbo HTML5 parsing library\r\n\r\nLicense:        ISC\r\nHomepage:       https://github.com/craigbarnes/lua-gumbo\r\nInstalled in:   /usr\r\n\r\nModules:\r\n        gumbo (/usr/share/lua/5.1/gumbo.lua)\r\n        gumbo.Buffer (/usr/share/lua/5.1/gumbo/Buffer.lua)\r\n        gumbo.Set (/usr/share/lua/5.1/gumbo/Set.lua)\r\n        gumbo.dom.Attr (/usr/share/lua/5.1/gumbo/dom/Attr.lua)\r\n        gumbo.dom.CharacterData (/usr/share/lua/5.1/gumbo/dom/CharacterData.lua)\r\n        gumbo.dom.ChildNode (/usr/share/lua/5.1/gumbo/dom/ChildNode.lua)\r\n        gumbo.dom.Comment (/usr/share/lua/5.1/gumbo/dom/Comment.lua)\r\n        gumbo.dom.Document (/usr/share/lua/5.1/gumbo/dom/Document.lua)\r\n        gumbo.dom.DocumentType (/usr/share/lua/5.1/gumbo/dom/DocumentType.lua)\r\n        gumbo.dom.Element (/usr/share/lua/5.1/gumbo/dom/Element.lua)\r\n        gumbo.dom.HTMLCollection (/usr/share/lua/5.1/gumbo/dom/HTMLCollection.lua)\r\n        gumbo.dom.NamedNodeMap (/usr/share/lua/5.1/gumbo/dom/NamedNodeMap.lua)\r\n        gumbo.dom.Node (/usr/share/lua/5.1/gumbo/dom/Node.lua)\r\n        gumbo.dom.NodeList (/usr/share/lua/5.1/gumbo/dom/NodeList.lua)\r\n        gumbo.dom.NonElementParentNode (/usr/share/lua/5.1/gumbo/dom/NonElementParentNode.lua)\r\n        gumbo.dom.ParentNode (/usr/share/lua/5.1/gumbo/dom/ParentNode.lua)\r\n        gumbo.dom.Text (/usr/share/lua/5.1/gumbo/dom/Text.lua)\r\n        gumbo.dom.assertions (/usr/share/lua/5.1/gumbo/dom/assertions.lua)\r\n        gumbo.dom.util (/usr/share/lua/5.1/gumbo/dom/util.lua)\r\n        gumbo.ffi-cdef (/usr/share/lua/5.1/gumbo/ffi-cdef.lua)\r\n        gumbo.ffi-parse (/usr/share/lua/5.1/gumbo/ffi-parse.lua)\r\n        gumbo.parse (/usr/lib/lua/5.1/gumbo/parse.so)\r\n        gumbo.serialize.Indent (/usr/share/lua/5.1/gumbo/serialize/Indent.lua)\r\n        gumbo.serialize.html (/usr/share/lua/5.1/gumbo/serialize/html.lua)\r\n```\r\n```\r\n$ luarocks-5.2 show gumbo\r\n\r\ngumbo 0.2-1 - Lua bindings for the Gumbo HTML5 parsing library\r\n\r\nLicense:        ISC\r\nHomepage:       https://github.com/craigbarnes/lua-gumbo\r\nInstalled in:   /usr\r\n\r\nModules:\r\n        gumbo (/usr/share/lua/5.2/gumbo.lua)\r\n        gumbo.Buffer (/usr/share/lua/5.2/gumbo/Buffer.lua)\r\n        gumbo.Set (/usr/share/lua/5.2/gumbo/Set.lua)\r\n        gumbo.dom.Attr (/usr/share/lua/5.2/gumbo/dom/Attr.lua)\r\n        gumbo.dom.CharacterData (/usr/share/lua/5.2/gumbo/dom/CharacterData.lua)\r\n        gumbo.dom.ChildNode (/usr/share/lua/5.2/gumbo/dom/ChildNode.lua)\r\n        gumbo.dom.Comment (/usr/share/lua/5.2/gumbo/dom/Comment.lua)\r\n        gumbo.dom.Document (/usr/share/lua/5.2/gumbo/dom/Document.lua)\r\n        gumbo.dom.DocumentType (/usr/share/lua/5.2/gumbo/dom/DocumentType.lua)\r\n        gumbo.dom.Element (/usr/share/lua/5.2/gumbo/dom/Element.lua)\r\n        gumbo.dom.HTMLCollection (/usr/share/lua/5.2/gumbo/dom/HTMLCollection.lua)\r\n        gumbo.dom.NamedNodeMap (/usr/share/lua/5.2/gumbo/dom/NamedNodeMap.lua)\r\n        gumbo.dom.Node (/usr/share/lua/5.2/gumbo/dom/Node.lua)\r\n        gumbo.dom.NodeList (/usr/share/lua/5.2/gumbo/dom/NodeList.lua)\r\n        gumbo.dom.NonElementParentNode (/usr/share/lua/5.2/gumbo/dom/NonElementParentNode.lua)\r\n        gumbo.dom.ParentNode (/usr/share/lua/5.2/gumbo/dom/ParentNode.lua)\r\n        gumbo.dom.Text (/usr/share/lua/5.2/gumbo/dom/Text.lua)\r\n        gumbo.dom.assertions (/usr/share/lua/5.2/gumbo/dom/assertions.lua)\r\n        gumbo.dom.util (/usr/share/lua/5.2/gumbo/dom/util.lua)\r\n        gumbo.ffi-cdef (/usr/share/lua/5.2/gumbo/ffi-cdef.lua)\r\n        gumbo.ffi-parse (/usr/share/lua/5.2/gumbo/ffi-parse.lua)\r\n        gumbo.parse (/usr/lib/lua/5.2/gumbo/parse.so)\r\n        gumbo.serialize.Indent (/usr/share/lua/5.2/gumbo/serialize/Indent.lua)\r\n        gumbo.serialize.html (/usr/share/lua/5.2/gumbo/serialize/html.lua)\r\n```\r\n\r\n```\r\n$ pacman -Qi gumbo-parser-git\r\nName           : gumbo-parser-git\r\nVersion        : 1.0.e17f706-1\r\nDescription    : A pure-C HTML5 parser\r\nArchitecture   : x86_64\r\nURL            : https://github.com/google/gumbo-parser\r\nLicenses       : Apache\r\nGroups         : None\r\nProvides       : gumbo-parser\r\nDepends On     : glibc\r\nOptional Deps  : None\r\nRequired By    : None\r\nOptional For   : None\r\nConflicts With : None\r\nReplaces       : None\r\nInstalled Size : 925.00 KiB\r\nPackager       : Daurnimator <quae@daurnimator.com>\r\nBuild Date     : Wed 18 Mar 2015 18:39:54 EDT\r\nInstall Date   : Wed 18 Mar 2015 18:39:57 EDT\r\nInstall Reason : Explicitly installed\r\nInstall Script : No\r\nValidated By   : None\r\n```"},"comment":{"url":"https://api.github.com/repos/craigbarnes/lua-gumbo/issues/comments/87640880","html_url":"https://github.com/craigbarnes/lua-gumbo/issues/41#issuecomment-87640880","issue_url":"https://api.github.com/repos/craigbarnes/lua-gumbo/issues/41","id":87640880,"user":{"login":"daurnimator","id":127971,"avatar_url":"https://avatars.githubusercontent.com/u/127971?v=3","gravatar_id":"","url":"https://api.github.com/users/daurnimator","html_url":"https://github.com/daurnimator","followers_url":"https://api.github.com/users/daurnimator/followers","following_url":"https://api.github.com/users/daurnimator/following{/other_user}","gists_url":"https://api.github.com/users/daurnimator/gists{/gist_id}","starred_url":"https://api.github.com/users/daurnimator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daurnimator/subscriptions","organizations_url":"https://api.github.com/users/daurnimator/orgs","repos_url":"https://api.github.com/users/daurnimator/repos","events_url":"https://api.github.com/users/daurnimator/events{/privacy}","received_events_url":"https://api.github.com/users/daurnimator/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T11:35:20Z","updated_at":"2015-03-30T11:35:20Z","body":"btw, this error leaks memory, you should use `ffi.gc` to attach `gumbo_destroy_output` to `output`"}}