{"action":"created","issue":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/1417","labels_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1417/labels{/name}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1417/comments","events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1417/events","html_url":"https://github.com/chapel-lang/chapel/pull/1417","id":59422868,"number":1417,"title":"Rewrite getCwd() to fix valgrind error.","user":{"login":"thomasvandoren","id":530981,"avatar_url":"https://avatars.githubusercontent.com/u/530981?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasvandoren","html_url":"https://github.com/thomasvandoren","followers_url":"https://api.github.com/users/thomasvandoren/followers","following_url":"https://api.github.com/users/thomasvandoren/following{/other_user}","gists_url":"https://api.github.com/users/thomasvandoren/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasvandoren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasvandoren/subscriptions","organizations_url":"https://api.github.com/users/thomasvandoren/orgs","repos_url":"https://api.github.com/users/thomasvandoren/repos","events_url":"https://api.github.com/users/thomasvandoren/events{/privacy}","received_events_url":"https://api.github.com/users/thomasvandoren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-01T23:14:16Z","updated_at":"2015-03-02T16:41:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/1417","html_url":"https://github.com/chapel-lang/chapel/pull/1417","diff_url":"https://github.com/chapel-lang/chapel/pull/1417.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/1417.patch"},"body":"Valgrind was reporting: \"Invalid read of size 1\". getCwd() was dealing with two\r\nchar* buffers before, now it only deals with one and fixes the valgrind error. I\r\nalso moved getCwd() down in files.cpp next to sys_getcwd().\r\n\r\n### TODO:\r\n\r\n* [x] run valgrind testing over test/chpldoc/"},"comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments/76747286","html_url":"https://github.com/chapel-lang/chapel/pull/1417#issuecomment-76747286","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1417","id":76747286,"user":{"login":"lydia-duncan","id":2454710,"avatar_url":"https://avatars.githubusercontent.com/u/2454710?v=3","gravatar_id":"","url":"https://api.github.com/users/lydia-duncan","html_url":"https://github.com/lydia-duncan","followers_url":"https://api.github.com/users/lydia-duncan/followers","following_url":"https://api.github.com/users/lydia-duncan/following{/other_user}","gists_url":"https://api.github.com/users/lydia-duncan/gists{/gist_id}","starred_url":"https://api.github.com/users/lydia-duncan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lydia-duncan/subscriptions","organizations_url":"https://api.github.com/users/lydia-duncan/orgs","repos_url":"https://api.github.com/users/lydia-duncan/repos","events_url":"https://api.github.com/users/lydia-duncan/events{/privacy}","received_events_url":"https://api.github.com/users/lydia-duncan/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T16:41:46Z","updated_at":"2015-03-02T16:41:46Z","body":"I'm confused as to why the former case resulted into an invalid read while this one did not.  Was it because the additional array had not been allocated?"}}