{"action":"closed","issue":{"url":"https://api.github.com/repos/google/jsonnet/issues/256","repository_url":"https://api.github.com/repos/google/jsonnet","labels_url":"https://api.github.com/repos/google/jsonnet/issues/256/labels{/name}","comments_url":"https://api.github.com/repos/google/jsonnet/issues/256/comments","events_url":"https://api.github.com/repos/google/jsonnet/issues/256/events","html_url":"https://github.com/google/jsonnet/issues/256","id":189292301,"number":256,"title":"jsonnet_native_callback comment should mention that params array is null-terminated","user":{"login":"anguslees","id":224224,"avatar_url":"https://avatars.githubusercontent.com/u/224224?v=3","gravatar_id":"","url":"https://api.github.com/users/anguslees","html_url":"https://github.com/anguslees","followers_url":"https://api.github.com/users/anguslees/followers","following_url":"https://api.github.com/users/anguslees/following{/other_user}","gists_url":"https://api.github.com/users/anguslees/gists{/gist_id}","starred_url":"https://api.github.com/users/anguslees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anguslees/subscriptions","organizations_url":"https://api.github.com/users/anguslees/orgs","repos_url":"https://api.github.com/users/anguslees/repos","events_url":"https://api.github.com/users/anguslees/events{/privacy}","received_events_url":"https://api.github.com/users/anguslees/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-15T03:41:26Z","updated_at":"2016-11-15T05:09:09Z","closed_at":"2016-11-15T05:09:09Z","body":"I haven't dug much deeper than finding that jsonnet seems to cast the C++ argv vector to create the `jsonnet_native_callback` C `const char * const *params` arg.  Afaics, there is no way to specify the *length* of this array, and this is a bug.\r\n\r\nI note the python API tracks the length of this array in the context.  This works for the python callback itself to examine the arguments passed, and I thought this was sufficient.  I've just tried using this feature (not via python) and discovered that jsonnet also uses the argument list to validate the number of arguments passed before calling my callback - and this means jsonnet itself is trying to determine the size of this array!  Without an understanding of how the length is passed, how does this work?  Is this a segfault waiting to happen?"}}
{"actor":{"display_login":"sparkprime"}}