{"id":20527565,"url":"https://github.com/mpenick/no-global-alloc-tool","last_synced_at":"2026-04-16T23:34:18.379Z","repository":{"id":84610596,"uuid":"163337638","full_name":"mpenick/no-global-alloc-tool","owner":"mpenick","description":"A tool to detect usage of the global or system versions of operator new() and operator delete()","archived":false,"fork":false,"pushed_at":"2018-12-27T22:21:50.000Z","size":6,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-16T11:29:59.026Z","etag":null,"topics":["clang","llvm","memory-leak"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mpenick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-12-27T21:30:40.000Z","updated_at":"2020-01-15T20:33:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"6aa10a6e-cc6d-4ead-a66f-42fc5a830d97","html_url":"https://github.com/mpenick/no-global-alloc-tool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpenick%2Fno-global-alloc-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpenick%2Fno-global-alloc-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpenick%2Fno-global-alloc-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpenick%2Fno-global-alloc-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpenick","download_url":"https://codeload.github.com/mpenick/no-global-alloc-tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242133482,"owners_count":20077097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["clang","llvm","memory-leak"],"created_at":"2024-11-15T23:19:20.653Z","updated_at":"2026-04-16T23:34:18.280Z","avatar_url":"https://github.com/mpenick.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a tool can be used to detect usage of the global or system versions of\n`operator new()` and `operator delete()` (and their other allocating variants).\nIt will support `malloc()` and `free()` in the future. This tool is useful for\nfinding and preventing calls that go around a library's or application's custom\nallocator.\n\n# To run\n\n```\n./no-global-alloc-tool /path/to/source/cluster.cpp -- -I/some/include/directory\nIn file included from .../Code/cpp-driver/src/cluster.cpp:17:\nIn file included from .../Code/cpp-driver/src/cluster.hpp:20:\nIn file included from .../Code/cpp-driver/src/config.hpp:20:\nIn file included from .../Code/cpp-driver/src/auth.hpp:22:\nIn file included from .../Code/cpp-driver/src/host.hpp:22:\n.../Code/cpp-driver/src/copy_on_write_ptr.hpp:85:7: error: Using `operator delete()` from /usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/new:124:6\n      delete ref;\n      ^\n.../Code/cpp-driver/src/copy_on_write_ptr.hpp:74:54: error: Using `operator new()` from /usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/new:120:7\n      ptr_ = SharedRefPtr\u003cReferenced\u003e(new Referenced(new T(*(temp-\u003eref))));\n                                                     ^\n.../Code/cpp-driver/src/copy_on_write_ptr.hpp:85:7: error: Using `operator delete()` from /usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/new:124:6\n      delete ref;\n```\n\n*Note:* Includes and other compiler flags can be specified after `--`\n\n# To run in a cmake project\n\n```\nmkdir build \u0026\u0026 cd build\ncmake -DCMAKE_CXX_CLANG_TIDY=/path/to/tool/no-global-alloc-tool ..\nmake\n```\n\n# Dependencies\n\nRequires LLVM and clang (w/ clang's libtooling)\n\n## On Ubuntu\n\n```\nsudo apt install libclang-6.0-dev\n```\n\n# To build\n\n```\nmkdir build \u0026\u0026 cd build\nLIBCLANG_ROOT_DIR=/path/to/llvm/clang cmake ..\nmake\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpenick%2Fno-global-alloc-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpenick%2Fno-global-alloc-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpenick%2Fno-global-alloc-tool/lists"}