{"id":17500517,"url":"https://github.com/offlinemark/suicide","last_synced_at":"2026-03-15T14:42:22.824Z","repository":{"id":149184179,"uuid":"56464412","full_name":"offlinemark/suicide","owner":"offlinemark","description":"LLVM pass that detects one undefined behavior, and emits code to delete your hard drive","archived":false,"fork":false,"pushed_at":"2020-08-08T12:15:52.000Z","size":16,"stargazers_count":32,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T22:32:01.617Z","etag":null,"topics":["c","compilers","llvm","undefined-behavior"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/offlinemark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-17T23:53:03.000Z","updated_at":"2024-08-12T19:22:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"e42f388e-3b09-4afa-b2f7-9dfca8d6fe20","html_url":"https://github.com/offlinemark/suicide","commit_stats":{"total_commits":24,"total_committers":2,"mean_commits":12.0,"dds":"0.41666666666666663","last_synced_commit":"0d47e759282c2fdbbbbcfeea0dfc95dd59a6eabe"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/offlinemark/suicide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offlinemark%2Fsuicide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offlinemark%2Fsuicide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offlinemark%2Fsuicide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offlinemark%2Fsuicide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/offlinemark","download_url":"https://codeload.github.com/offlinemark/suicide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offlinemark%2Fsuicide/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30544413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-15T14:38:58.992Z","status":"ssl_error","status_checked_at":"2026-03-15T14:38:29.659Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","compilers","llvm","undefined-behavior"],"created_at":"2024-10-19T18:25:40.358Z","updated_at":"2026-03-15T14:42:22.806Z","avatar_url":"https://github.com/offlinemark.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# suicide cc\n\nA common illustrative example of something undefined behavior in C can do\nis \"format your hard drive\". Suicide CC is a\nLLVM pass which implements this. When compiling with this pass enabled,\neach function is checked for 1 type of undefined behavior. If it is found,\nthe pass emits code which executes an arbitrary shell command using `system()`.\n\nThe scope of detected undefined behavior is simply local uses of uninitialized\nstack variables of primitive type. It should support most POSIX like operating\nsystems.\n\nThis project is named for its similarity to [Suicide\nLinux](https://qntm.org/suicide).\n\n\u003e Note: For the safety of my dev machine, the pass in this source tree is\ndeclawed such that it will only emit code to delete a very specific file from\nthe system executing the program.  However, to achieve the fully advertised\nfunctionality, simply reassign `Suicide::SYSTEM_CMD` in `Suicide.cc` to your\nchoice of hard drive erasing shell command.\n\n## demo\n\n(slightly out of date)\n\n[![asciicast](https://asciinema.org/a/42649.png)](https://asciinema.org/a/42649)\n\n## building\n\nInstall LLVM 3.8.\n\nTo build the test program and pass.\n\n```\nmake\n```\n\nTo run the pass on the test program.\n\n```\nmake check\n```\n\n## misc\n\n- \"SURE\" means there is a code path between allocation of a stack variable, and\n  a read of it, before any writes to it\n- \"UNSURE\" means that in between the code path between allocation of a stack\n  variable, and a read of it, a pointer to that variable is passed into at\n  least one function\n- in some cases, \"SURE\" warnings might be misclassified as \"UNSURE\". this\n  occurs when the analysis encounters an \"UNSURE\" path before a \"SURE\" path\n  involving the same variable and memory read\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofflinemark%2Fsuicide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fofflinemark%2Fsuicide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofflinemark%2Fsuicide/lists"}