{"action":"created","issue":{"url":"https://api.github.com/repos/playframework/anorm/issues/18","labels_url":"https://api.github.com/repos/playframework/anorm/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/playframework/anorm/issues/18/comments","events_url":"https://api.github.com/repos/playframework/anorm/issues/18/events","html_url":"https://github.com/playframework/anorm/issues/18","id":59742373,"number":18,"title":"SQL parser causes StackOverflowError","user":{"login":"carymrobbins","id":3103764,"avatar_url":"https://avatars.githubusercontent.com/u/3103764?v=3","gravatar_id":"","url":"https://api.github.com/users/carymrobbins","html_url":"https://github.com/carymrobbins","followers_url":"https://api.github.com/users/carymrobbins/followers","following_url":"https://api.github.com/users/carymrobbins/following{/other_user}","gists_url":"https://api.github.com/users/carymrobbins/gists{/gist_id}","starred_url":"https://api.github.com/users/carymrobbins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carymrobbins/subscriptions","organizations_url":"https://api.github.com/users/carymrobbins/orgs","repos_url":"https://api.github.com/users/carymrobbins/repos","events_url":"https://api.github.com/users/carymrobbins/events{/privacy}","received_events_url":"https://api.github.com/users/carymrobbins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-04T02:42:47Z","updated_at":"2015-03-04T08:43:59Z","closed_at":null,"body":"The following snippet causes a `StackOverflowError`.\r\n\r\n```scala\r\nanorm.SQL(s\"select '{${(1 to 1000).mkString(\",\")}}'::int[]\")\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/playframework/anorm/issues/comments/77117375","html_url":"https://github.com/playframework/anorm/issues/18#issuecomment-77117375","issue_url":"https://api.github.com/repos/playframework/anorm/issues/18","id":77117375,"user":{"login":"cchantep","id":166062,"avatar_url":"https://avatars.githubusercontent.com/u/166062?v=3","gravatar_id":"","url":"https://api.github.com/users/cchantep","html_url":"https://github.com/cchantep","followers_url":"https://api.github.com/users/cchantep/followers","following_url":"https://api.github.com/users/cchantep/following{/other_user}","gists_url":"https://api.github.com/users/cchantep/gists{/gist_id}","starred_url":"https://api.github.com/users/cchantep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchantep/subscriptions","organizations_url":"https://api.github.com/users/cchantep/orgs","repos_url":"https://api.github.com/users/cchantep/repos","events_url":"https://api.github.com/users/cchantep/events{/privacy}","received_events_url":"https://api.github.com/users/cchantep/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T08:43:59Z","updated_at":"2015-03-04T08:43:59Z","body":"Hi,\r\n\r\nThe SOE seems to be raised by JVM regexp classes (on which are based parser combinators).\r\n\r\n```\r\njava.lang.StackOverflowError\r\n\tat java.util.regex.Pattern$7.isSatisfiedBy(Pattern.java:5271)\r\n\tat java.util.regex.Pattern$CharProperty.match(Pattern.java:3776)\r\n\tat java.util.regex.Pattern$Branch.match(Pattern.java:4604)\r\n\tat java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)\r\n\tat java.util.regex.Pattern$Loop.match(Pattern.java:4785)\r\n\tat java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)\r\n\tat java.util.regex.Pattern$BranchConn.match(Pattern.java:4568)\r\n\tat java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)\r\n\tat java.util.regex.Pattern$Branch.match(Pattern.java:4604)\r\n\tat java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)\r\n\tat java.util.regex.Pattern$Loop.match(Pattern.java:4785)\r\n...\r\n```\r\n\r\nIf instead of that you use Anorm string interpolation, there is no such issue:\r\n\r\n```scala\r\nimport anorm._\r\nSQL\"select '{#${(1 to 1000).mkString(\",\")}}'::int[]\"\r\n```"}}