{"id":18627531,"url":"https://github.com/yugr/flakyiterators","last_synced_at":"2025-04-11T05:31:44.185Z","repository":{"id":41436881,"uuid":"405606275","full_name":"yugr/FlakyIterators","owner":"yugr","description":"A fast and dirty checker based on libclang which detects non-deterministic iteration","archived":false,"fork":false,"pushed_at":"2022-07-01T19:52:15.000Z","size":47,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T09:52:58.619Z","etag":null,"topics":["flaky-tests","libclang","nondeterminism","static-analysis"],"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/yugr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-12T10:03:34.000Z","updated_at":"2023-01-09T17:20:52.000Z","dependencies_parsed_at":"2022-08-27T05:02:47.657Z","dependency_job_id":null,"html_url":"https://github.com/yugr/FlakyIterators","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/yugr%2FFlakyIterators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugr%2FFlakyIterators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugr%2FFlakyIterators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugr%2FFlakyIterators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yugr","download_url":"https://codeload.github.com/yugr/FlakyIterators/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248347478,"owners_count":21088660,"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":["flaky-tests","libclang","nondeterminism","static-analysis"],"created_at":"2024-11-07T04:42:43.630Z","updated_at":"2025-04-11T05:31:43.824Z","avatar_url":"https://github.com/yugr.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](http://img.shields.io/:license-MIT-blue.svg)](https://github.com/yugr/FlakyIterators/blob/master/LICENSE.txt)\n[![Build Status](https://github.com/yugr/FlakyIterators/actions/workflows/ci.yml/badge.svg)](https://github.com/yugr/FlakyIterators/actions)\n[![codecov](https://codecov.io/gh/yugr/FlakyIterators/branch/master/graph/badge.svg)](https://codecov.io/gh/yugr/FlakyIterators)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/yugr/FlakyIterators.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/yugr/FlakyIterators/alerts/)\n[![Coverity Scan](https://scan.coverity.com/projects/yugr-FlakyIterators/badge.svg)](https://scan.coverity.com/projects/yugr-FlakyIterators)\n\nA fast and dirty checker which detects non-deterministic iteration e.g.\n```\nstd::unordered_map\u003c...\u003e map;\nfor (auto [k, v] : map) {\n  ...\n}\n\nstd::map\u003cSomething *, ...\u003e map;\nfor (auto [k, v] : map) {\n  ...\n}\n```\n\nWarnings are reported only if functions with predefined names (e.g. `printf`)\nare encountered in a loop.\n\n# Comparison with Clang Static Analyzer\n\nCSA's [PointerIteration](https://clang.llvm.org/docs/analyzer/checkers.html#alpha-nondeterminism-pointeriteration-c) does not report nondeterministic iteration neither over ordered containers of pointers, nor over unordered containers of non-pointers.\n\n# How to build\n\nTo build, install (on Debian/Ubuntu) `llvm`, `libclang-dev` and `libpcre3-dev`:\n```\n$ sudo apt-get install llvm libclang-dev libpcre3-dev\n```\nand run\n```\n$ make clean all\n```\n\nTo build debug or sanitized versions run `make` with `DEBUG=1`, `ASAN=1` or `UBSAN=1`.\n\n# How to use\n\nRun `bin/find-flaky` on files you are interested in:\n```\n$ bin/find-flaky tests/3-unordered-map-notok.cc\nfind-flaky: warning: calling IO function 'printf' inside flaky loop\n```\n\nBy default tool looks for most common IO functions (like `printf`)\nbut you provide your own patterns:\n```\n$ cat patterns.txt\n# A useful comment\nmy_debug_fun\n# Another one\nother_fun\n$ bin/find-flaky --patterns patterns.txt ...\n```\n\nCustom compile flags (usually `-D` and `-I`) can be supplied with `--cflags` parameter and\nverbosity can be set with `-v` flag.\nFor additional options run `bin/find-flaky -h`.\n\n# How to test\n\nBuild and then run\n```\n$ make test\nFound no errors\n```\n\n# TODO\n\n* support other loop types\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyugr%2Fflakyiterators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyugr%2Fflakyiterators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyugr%2Fflakyiterators/lists"}