{"action":"created","issue":{"url":"https://api.github.com/repos/AlexeyG/PySAIS/issues/3","labels_url":"https://api.github.com/repos/AlexeyG/PySAIS/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/AlexeyG/PySAIS/issues/3/comments","events_url":"https://api.github.com/repos/AlexeyG/PySAIS/issues/3/events","html_url":"https://github.com/AlexeyG/PySAIS/issues/3","id":54757389,"number":3,"title":"Segmentation fault in lcp for the terminal symbol alone","user":{"login":"hynekcer","id":251738,"avatar_url":"https://avatars.githubusercontent.com/u/251738?v=3","gravatar_id":"","url":"https://api.github.com/users/hynekcer","html_url":"https://github.com/hynekcer","followers_url":"https://api.github.com/users/hynekcer/followers","following_url":"https://api.github.com/users/hynekcer/following{/other_user}","gists_url":"https://api.github.com/users/hynekcer/gists{/gist_id}","starred_url":"https://api.github.com/users/hynekcer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hynekcer/subscriptions","organizations_url":"https://api.github.com/users/hynekcer/orgs","repos_url":"https://api.github.com/users/hynekcer/repos","events_url":"https://api.github.com/users/hynekcer/events{/privacy}","received_events_url":"https://api.github.com/users/hynekcer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-19T12:21:08Z","updated_at":"2015-02-22T14:15:24Z","closed_at":null,"body":"I'm testing the package on random data:\r\n```\r\n>>> sequence = '$'\r\n>>> sa = pysais.sais(sequence)\r\n>>> lcp, lcp_lm, lcp_mr = pysais.lcp(sequence, sa)\r\nSegmentation fault (core dumped)\r\n```\r\n(I observed segmentation faults also on normal data sometimes if I omitted the terminal symbol. But I understand that you strictly require it.)\r\n"},"comment":{"url":"https://api.github.com/repos/AlexeyG/PySAIS/issues/comments/75437279","html_url":"https://github.com/AlexeyG/PySAIS/issues/3#issuecomment-75437279","issue_url":"https://api.github.com/repos/AlexeyG/PySAIS/issues/3","id":75437279,"user":{"login":"AlexeyG","id":186266,"avatar_url":"https://avatars.githubusercontent.com/u/186266?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexeyG","html_url":"https://github.com/AlexeyG","followers_url":"https://api.github.com/users/AlexeyG/followers","following_url":"https://api.github.com/users/AlexeyG/following{/other_user}","gists_url":"https://api.github.com/users/AlexeyG/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexeyG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexeyG/subscriptions","organizations_url":"https://api.github.com/users/AlexeyG/orgs","repos_url":"https://api.github.com/users/AlexeyG/repos","events_url":"https://api.github.com/users/AlexeyG/events{/privacy}","received_events_url":"https://api.github.com/users/AlexeyG/received_events","type":"User","site_admin":false},"created_at":"2015-02-22T14:15:24Z","updated_at":"2015-02-22T14:15:24Z","body":"The corner case of sequence = '$' should be easily fixable with an if statement. Same goes for checking the presence of the terminal symbol. But the way I see it, these checks of input data just eat up CPU cycles. And the only reason why I'm using the SAIS C module is to gain the speed that would be unattainable with a pure python implementation.\r\n\r\nYou're very welcome to add the checks and I'll merge it."}}