{"action":"created","comment":{"url":"https://api.github.com/repos/gap-system/gap/pulls/comments/199704574","pull_request_review_id":133869355,"id":199704574,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTcwNDU3NA==","diff_hunk":"@@ -12,6 +12,61 @@ kernel among the developers.\n \n <Chapter Label=\"Chap-Lib\">\n <Heading>Maintaining the &GAP; kernel and library</Heading>\n+\n+<Section Label=\"Sect-debugging\">\n+<Heading>Debugging the GAP Kernel</Heading>\n+\n+The GAP kernel supports a variety of options which enabled when running <C>configure</C>,\n+to help writing and debugging GAP kernel code.\n+<P/>\n+\n+The first option, <C>--enable-debug</C>, is well supported can can be used\n+whenever the GAP kernel, or kernel modules, are being developed (although\n+developers should still check their code works without it).\n+<P/>\n+<C>--enable-debug</C> enables assertions throughout the kernel. These\n+assertions are implemented using the <C>GAP_ASSERT</C> macro. These\n+assertions are disabled when GAP is compiled without <C>--enable-debug</C>.\n+When <C>--enable-debug</C> is enabled, <C>KernelDebug</C> will be shown in\n+the Configuration line when GAP is started.\n+<P/>\n+\n+The next two options are more experimental, and are not designed to be constantly\n+enabled. They are particularly designed to track down bugs relating to memory\n+corruption relating to GASMAN (GAP's memory manager). They cannot both be enabled\n+at the same time.\n+<P/>\n+<C>--enable-memory-checking</C> makes GAP check for C pointers to the content of Bags\n+being used after a new Bag has been created or a Bag is resized. GASMAN\n+moves Bags during garbage collection, which can happen whenever a new Bag is created\n+or a Bag is resized. However, as it is very unlikely that any single allocation\n+will cause a garbage collection, these bugs trigger very rarely. Also the problems\n+caused by these bugs are, if the C pointer is written to, a random other Bag,\n+somewhere in GAP, is changed.\n+<P/>\n+\n+After configuring, the memory checking must still be turned on. This can be done\n+either by passing <C>--</C> to GAP's command line, or calling <C>GASMAN_MEM_CHECK(1)</C>.\n+Note that enabling these tests makes GAP VERY, VERY slow. It can (depending on the\n+machine and operating system) take GAP over a day to start, and load all standard\n+packages. The recommending way to use this option is to start GAP, and then load\n+small test files to try to isolate the problem. <C>MemCheck</C> will be shown in\n+the Configuration line when GAP is started.\n+<P/>\n+\n+Known bugs: GAP will crash if IO_fork is called while memory checking is enabled.\n+<P/>\n+\n+<C>--enable-valgrind</C> makes changes to GASMAN so it is compatible with the\n+valgrind memory checking program. Without this, valgrind will report many ","path":"doc/dev/lib.xml","position":50,"original_position":50,"commit_id":"9049245af12fe8b0380c361955f08ae907ba64ce","original_commit_id":"9049245af12fe8b0380c361955f08ae907ba64ce","user":{"login":"fingolfin","id":241512,"node_id":"MDQ6VXNlcjI0MTUxMg==","avatar_url":"https://avatars2.githubusercontent.com/u/241512?v=4","gravatar_id":"","url":"https://api.github.com/users/fingolfin","html_url":"https://github.com/fingolfin","followers_url":"https://api.github.com/users/fingolfin/followers","following_url":"https://api.github.com/users/fingolfin/following{/other_user}","gists_url":"https://api.github.com/users/fingolfin/gists{/gist_id}","starred_url":"https://api.github.com/users/fingolfin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fingolfin/subscriptions","organizations_url":"https://api.github.com/users/fingolfin/orgs","repos_url":"https://api.github.com/users/fingolfin/repos","events_url":"https://api.github.com/users/fingolfin/events{/privacy}","received_events_url":"https://api.github.com/users/fingolfin/received_events","type":"User","site_admin":false},"body":"Optional: How about adding a URL here?\r\n```\r\n<URL Text=\"valgrind\">http://valgrind.org</URL> memory checking program. Without this [...]\r\n```","created_at":"2018-07-03T07:15:46Z","updated_at":"2018-07-03T07:16:15Z","html_url":"https://github.com/gap-system/gap/pull/2602#discussion_r199704574","pull_request_url":"https://api.github.com/repos/gap-system/gap/pulls/2602","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/gap-system/gap/pulls/comments/199704574"},"html":{"href":"https://github.com/gap-system/gap/pull/2602#discussion_r199704574"},"pull_request":{"href":"https://api.github.com/repos/gap-system/gap/pulls/2602"}}},"pull_request":{"url":"https://api.github.com/repos/gap-system/gap/pulls/2602","id":198784383,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4Nzg0Mzgz","html_url":"https://github.com/gap-system/gap/pull/2602","diff_url":"https://github.com/gap-system/gap/pull/2602.diff","patch_url":"https://github.com/gap-system/gap/pull/2602.patch","issue_url":"https://api.github.com/repos/gap-system/gap/issues/2602","number":2602,"state":"open","locked":false,"title":"Debug improvements","user":{"login":"ChrisJefferson","id":811527,"node_id":"MDQ6VXNlcjgxMTUyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/811527?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisJefferson","html_url":"https://github.com/ChrisJefferson","followers_url":"https://api.github.com/users/ChrisJefferson/followers","following_url":"https://api.github.com/users/ChrisJefferson/following{/other_user}","gists_url":"https://api.github.com/users/ChrisJefferson/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisJefferson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisJefferson/subscriptions","organizations_url":"https://api.github.com/users/ChrisJefferson/orgs","repos_url":"https://api.github.com/users/ChrisJefferson/repos","events_url":"https://api.github.com/users/ChrisJefferson/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisJefferson/received_events","type":"User","site_admin":false},"body":"This PR:\r\n\r\na) Fixes MEMORY_CANARY and adds a configure option for it.\r\n\r\nb) Adds some awful, but at least existing, documentation for kernel debugging (further improvements / extensions welcome).","created_at":"2018-07-02T20:42:23Z","updated_at":"2018-07-03T07:16:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7417ba8adf3901f297b4ecbb73867dd60a68ed35","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gap-system/gap/pulls/2602/commits","review_comments_url":"https://api.github.com/repos/gap-system/gap/pulls/2602/comments","review_comment_url":"https://api.github.com/repos/gap-system/gap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gap-system/gap/issues/2602/comments","statuses_url":"https://api.github.com/repos/gap-system/gap/statuses/9049245af12fe8b0380c361955f08ae907ba64ce","head":{"label":"ChrisJefferson:debug-doc","ref":"debug-doc","sha":"9049245af12fe8b0380c361955f08ae907ba64ce","user":{"login":"ChrisJefferson","id":811527,"node_id":"MDQ6VXNlcjgxMTUyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/811527?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisJefferson","html_url":"https://github.com/ChrisJefferson","followers_url":"https://api.github.com/users/ChrisJefferson/followers","following_url":"https://api.github.com/users/ChrisJefferson/following{/other_user}","gists_url":"https://api.github.com/users/ChrisJefferson/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisJefferson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisJefferson/subscriptions","organizations_url":"https://api.github.com/users/ChrisJefferson/orgs","repos_url":"https://api.github.com/users/ChrisJefferson/repos","events_url":"https://api.github.com/users/ChrisJefferson/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisJefferson/received_events","type":"User","site_admin":false},"repo":{"id":31462738,"node_id":"MDEwOlJlcG9zaXRvcnkzMTQ2MjczOA==","name":"gap","full_name":"ChrisJefferson/gap","owner":{"login":"ChrisJefferson","id":811527,"node_id":"MDQ6VXNlcjgxMTUyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/811527?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisJefferson","html_url":"https://github.com/ChrisJefferson","followers_url":"https://api.github.com/users/ChrisJefferson/followers","following_url":"https://api.github.com/users/ChrisJefferson/following{/other_user}","gists_url":"https://api.github.com/users/ChrisJefferson/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisJefferson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisJefferson/subscriptions","organizations_url":"https://api.github.com/users/ChrisJefferson/orgs","repos_url":"https://api.github.com/users/ChrisJefferson/repos","events_url":"https://api.github.com/users/ChrisJefferson/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisJefferson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ChrisJefferson/gap","description":"GAP - Groups, Algorithms, Programming - a System for Computational Discrete Algebra","fork":true,"url":"https://api.github.com/repos/ChrisJefferson/gap","forks_url":"https://api.github.com/repos/ChrisJefferson/gap/forks","keys_url":"https://api.github.com/repos/ChrisJefferson/gap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChrisJefferson/gap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChrisJefferson/gap/teams","hooks_url":"https://api.github.com/repos/ChrisJefferson/gap/hooks","issue_events_url":"https://api.github.com/repos/ChrisJefferson/gap/issues/events{/number}","events_url":"https://api.github.com/repos/ChrisJefferson/gap/events","assignees_url":"https://api.github.com/repos/ChrisJefferson/gap/assignees{/user}","branches_url":"https://api.github.com/repos/ChrisJefferson/gap/branches{/branch}","tags_url":"https://api.github.com/repos/ChrisJefferson/gap/tags","blobs_url":"https://api.github.com/repos/ChrisJefferson/gap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChrisJefferson/gap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChrisJefferson/gap/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChrisJefferson/gap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChrisJefferson/gap/statuses/{sha}","languages_url":"https://api.github.com/repos/ChrisJefferson/gap/languages","stargazers_url":"https://api.github.com/repos/ChrisJefferson/gap/stargazers","contributors_url":"https://api.github.com/repos/ChrisJefferson/gap/contributors","subscribers_url":"https://api.github.com/repos/ChrisJefferson/gap/subscribers","subscription_url":"https://api.github.com/repos/ChrisJefferson/gap/subscription","commits_url":"https://api.github.com/repos/ChrisJefferson/gap/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChrisJefferson/gap/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChrisJefferson/gap/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChrisJefferson/gap/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChrisJefferson/gap/contents/{+path}","compare_url":"https://api.github.com/repos/ChrisJefferson/gap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChrisJefferson/gap/merges","archive_url":"https://api.github.com/repos/ChrisJefferson/gap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChrisJefferson/gap/downloads","issues_url":"https://api.github.com/repos/ChrisJefferson/gap/issues{/number}","pulls_url":"https://api.github.com/repos/ChrisJefferson/gap/pulls{/number}","milestones_url":"https://api.github.com/repos/ChrisJefferson/gap/milestones{/number}","notifications_url":"https://api.github.com/repos/ChrisJefferson/gap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChrisJefferson/gap/labels{/name}","releases_url":"https://api.github.com/repos/ChrisJefferson/gap/releases{/id}","deployments_url":"https://api.github.com/repos/ChrisJefferson/gap/deployments","created_at":"2015-02-28T13:00:32Z","updated_at":"2016-05-27T20:50:30Z","pushed_at":"2018-07-02T20:41:20Z","git_url":"git://github.com/ChrisJefferson/gap.git","ssh_url":"git@github.com:ChrisJefferson/gap.git","clone_url":"https://github.com/ChrisJefferson/gap.git","svn_url":"https://github.com/ChrisJefferson/gap","homepage":"http://www.gap-system.org","size":400510,"stargazers_count":0,"watchers_count":0,"language":"GAP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gap-system:master","ref":"master","sha":"b234e0ffdaf8885660d1b8b0bd25d69db0f53b4c","user":{"login":"gap-system","id":5344223,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzNDQyMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/5344223?v=4","gravatar_id":"","url":"https://api.github.com/users/gap-system","html_url":"https://github.com/gap-system","followers_url":"https://api.github.com/users/gap-system/followers","following_url":"https://api.github.com/users/gap-system/following{/other_user}","gists_url":"https://api.github.com/users/gap-system/gists{/gist_id}","starred_url":"https://api.github.com/users/gap-system/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gap-system/subscriptions","organizations_url":"https://api.github.com/users/gap-system/orgs","repos_url":"https://api.github.com/users/gap-system/repos","events_url":"https://api.github.com/users/gap-system/events{/privacy}","received_events_url":"https://api.github.com/users/gap-system/received_events","type":"Organization","site_admin":false},"repo":{"id":31270208,"node_id":"MDEwOlJlcG9zaXRvcnkzMTI3MDIwOA==","name":"gap","full_name":"gap-system/gap","owner":{"login":"gap-system","id":5344223,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzNDQyMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/5344223?v=4","gravatar_id":"","url":"https://api.github.com/users/gap-system","html_url":"https://github.com/gap-system","followers_url":"https://api.github.com/users/gap-system/followers","following_url":"https://api.github.com/users/gap-system/following{/other_user}","gists_url":"https://api.github.com/users/gap-system/gists{/gist_id}","starred_url":"https://api.github.com/users/gap-system/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gap-system/subscriptions","organizations_url":"https://api.github.com/users/gap-system/orgs","repos_url":"https://api.github.com/users/gap-system/repos","events_url":"https://api.github.com/users/gap-system/events{/privacy}","received_events_url":"https://api.github.com/users/gap-system/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gap-system/gap","description":"Main development repository for GAP - Groups, Algorithms, Programming, a System for Computational Discrete Algebra","fork":false,"url":"https://api.github.com/repos/gap-system/gap","forks_url":"https://api.github.com/repos/gap-system/gap/forks","keys_url":"https://api.github.com/repos/gap-system/gap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gap-system/gap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gap-system/gap/teams","hooks_url":"https://api.github.com/repos/gap-system/gap/hooks","issue_events_url":"https://api.github.com/repos/gap-system/gap/issues/events{/number}","events_url":"https://api.github.com/repos/gap-system/gap/events","assignees_url":"https://api.github.com/repos/gap-system/gap/assignees{/user}","branches_url":"https://api.github.com/repos/gap-system/gap/branches{/branch}","tags_url":"https://api.github.com/repos/gap-system/gap/tags","blobs_url":"https://api.github.com/repos/gap-system/gap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gap-system/gap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gap-system/gap/git/refs{/sha}","trees_url":"https://api.github.com/repos/gap-system/gap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gap-system/gap/statuses/{sha}","languages_url":"https://api.github.com/repos/gap-system/gap/languages","stargazers_url":"https://api.github.com/repos/gap-system/gap/stargazers","contributors_url":"https://api.github.com/repos/gap-system/gap/contributors","subscribers_url":"https://api.github.com/repos/gap-system/gap/subscribers","subscription_url":"https://api.github.com/repos/gap-system/gap/subscription","commits_url":"https://api.github.com/repos/gap-system/gap/commits{/sha}","git_commits_url":"https://api.github.com/repos/gap-system/gap/git/commits{/sha}","comments_url":"https://api.github.com/repos/gap-system/gap/comments{/number}","issue_comment_url":"https://api.github.com/repos/gap-system/gap/issues/comments{/number}","contents_url":"https://api.github.com/repos/gap-system/gap/contents/{+path}","compare_url":"https://api.github.com/repos/gap-system/gap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gap-system/gap/merges","archive_url":"https://api.github.com/repos/gap-system/gap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gap-system/gap/downloads","issues_url":"https://api.github.com/repos/gap-system/gap/issues{/number}","pulls_url":"https://api.github.com/repos/gap-system/gap/pulls{/number}","milestones_url":"https://api.github.com/repos/gap-system/gap/milestones{/number}","notifications_url":"https://api.github.com/repos/gap-system/gap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gap-system/gap/labels{/name}","releases_url":"https://api.github.com/repos/gap-system/gap/releases{/id}","deployments_url":"https://api.github.com/repos/gap-system/gap/deployments","created_at":"2015-02-24T16:47:50Z","updated_at":"2018-07-02T22:16:27Z","pushed_at":"2018-07-02T22:16:18Z","git_url":"git://github.com/gap-system/gap.git","ssh_url":"git@github.com:gap-system/gap.git","clone_url":"https://github.com/gap-system/gap.git","svn_url":"https://github.com/gap-system/gap","homepage":"https://www.gap-system.org","size":401871,"stargazers_count":208,"watchers_count":208,"language":"GAP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":74,"mirror_url":null,"archived":false,"open_issues_count":339,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":74,"open_issues":339,"watchers":208,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gap-system/gap/pulls/2602"},"html":{"href":"https://github.com/gap-system/gap/pull/2602"},"issue":{"href":"https://api.github.com/repos/gap-system/gap/issues/2602"},"comments":{"href":"https://api.github.com/repos/gap-system/gap/issues/2602/comments"},"review_comments":{"href":"https://api.github.com/repos/gap-system/gap/pulls/2602/comments"},"review_comment":{"href":"https://api.github.com/repos/gap-system/gap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gap-system/gap/pulls/2602/commits"},"statuses":{"href":"https://api.github.com/repos/gap-system/gap/statuses/9049245af12fe8b0380c361955f08ae907ba64ce"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"fingolfin"}}