payload: {"action":"opened","issue":{"url":"https://api.github.com/repos/rapidsai/cugraph/issues/186","repository_url":"https://api.github.com/repos/rapidsai/cugraph","labels_url":"https://api.github.com/repos/rapidsai/cugraph/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/rapidsai/cugraph/issues/186/comments","events_url":"https://api.github.com/repos/rapidsai/cugraph/issues/186/events","html_url":"https://github.com/rapidsai/cugraph/issues/186","id":425619580,"node_id":"MDU6SXNzdWU0MjU2MTk1ODA=","number":186,"title":"[BUG] gdf_col_delete frees only data (does not free valid)","user":{"login":"seunghwak","id":45857425,"node_id":"MDQ6VXNlcjQ1ODU3NDI1","avatar_url":"https://avatars3.githubusercontent.com/u/45857425?v=4","gravatar_id":"","url":"https://api.github.com/users/seunghwak","html_url":"https://github.com/seunghwak","followers_url":"https://api.github.com/users/seunghwak/followers","following_url":"https://api.github.com/users/seunghwak/following{/other_user}","gists_url":"https://api.github.com/users/seunghwak/gists{/gist_id}","starred_url":"https://api.github.com/users/seunghwak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seunghwak/subscriptions","organizations_url":"https://api.github.com/users/seunghwak/orgs","repos_url":"https://api.github.com/users/seunghwak/repos","events_url":"https://api.github.com/users/seunghwak/events{/privacy}","received_events_url":"https://api.github.com/users/seunghwak/received_events","type":"User","site_admin":false},"labels":[{"id":1178373147,"node_id":"MDU6TGFiZWwxMTc4MzczMTQ3","url":"https://api.github.com/repos/rapidsai/cugraph/labels/?%20-%20Needs%20Triage","name":"? - Needs Triage","color":"e99695","default":false},{"id":1129039534,"node_id":"MDU6TGFiZWwxMTI5MDM5NTM0","url":"https://api.github.com/repos/rapidsai/cugraph/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-03-26T19:56:18Z","updated_at":"2019-03-26T19:56:18Z","closed_at":null,"author_association":"COLLABORATOR","body":"**Describe the bug**\r\ngdf_column has three pointers data, valid, and col_name, and these pointers can point dynamically allocated memory.\r\n\r\ngdf_col_delete in cpp/src/cugraph.cu frees col->data but does not free col->valid and col->col_name.\r\n\r\n```C++\r\nvoid gdf_col_delete(gdf_column* col) {\r\n  if (col) {\r\n    col->size = 0;\r\n    if(col->data) {\r\n      ALLOC_FREE_TRY(col->data, nullptr);\r\n    }\r\n    ...\r\n}\r\n```\r\n\r\ncol_name may be removed in the future (https://github.com/rapidsai/cudf/issues/1297), so we may not need to free col_name but we need to check col->valid and free col->valid if col->valid is not nullptr.\r\n\r\nAnd we may not create our own version of gdf_col_delete but better use cudf's gdf_column_free (but we cannot use it as is because it does not check col->data and col->valid are not nullptr)."}}
other: {"actor":{"display_login":"seunghwak"}}