{"id":18694529,"url":"https://github.com/luickk/basicthreaderrordetector","last_synced_at":"2025-07-08T18:08:11.763Z","repository":{"id":122825080,"uuid":"608110781","full_name":"luickk/BasicThreadErrorDetector","owner":"luickk","description":"Very basic thread error detector based on DynamoRIO","archived":false,"fork":false,"pushed_at":"2023-03-15T11:48:44.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-15T21:13:42.655Z","etag":null,"topics":["concurrency","concurrency-testing"],"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/luickk.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":"2023-03-01T10:45:31.000Z","updated_at":"2023-03-22T11:15:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"b3662691-2f4f-4a77-896f-25f0c9ec2d7c","html_url":"https://github.com/luickk/BasicThreadErrorDetector","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/luickk%2FBasicThreadErrorDetector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luickk%2FBasicThreadErrorDetector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luickk%2FBasicThreadErrorDetector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luickk%2FBasicThreadErrorDetector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luickk","download_url":"https://codeload.github.com/luickk/BasicThreadErrorDetector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239552523,"owners_count":19657928,"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":["concurrency","concurrency-testing"],"created_at":"2024-11-07T11:11:14.910Z","updated_at":"2025-02-18T21:26:07.678Z","avatar_url":"https://github.com/luickk.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basic Thread Error Detector based on DynamoRIO\n\nThe project is split into `instrument.c` which only contains purely technical (memory instrumentation, fn wrapping..) DynamorRIO api setup/config and `race_detector.c` which contains the race detector implementation. The race detector is based on [this](https://storage.googleapis.com/pub-tools-public-publication-data/pdf/35604.pdf) paper.\nThis project is a simplified but accurate representation of the in section 4.3, described \"precise, slow\" detection mode.\nAll events are \"exported\" in instrument.h and implemented by race_detector.c (fed to DynamoRIO by `instrument.c`).\nThe detector is fully build on a clock-vector before/after relations mechanism to detect races.\n\n## Practicability\n\nThe project is able to detect basic write-write and write-read data races. Since DynamoRIO isn't super stable in multithreaded environments, the results can vary, so it's good practice to check the sets on potential differences(although there were no changes done to the checked program) if reproducibility is required.\n\n## Clock Vector Based Race Detection\n\nClock Vector Based detection can get very complex, very quickly, thus this implementation doesn't quantities memory accesses but instead check after every access, thus the clock vector doesn't need to contain accurate timestamps(instead a memory access counter is used). This isn't very performant and the slowest, but also most simple method.\n\nThe mathematical operators and logic is described in [this](https://dl.acm.org/doi/pdf/10.1145/3018610.3018611)(section 3.12) paper quite well.\n\n## Rough implementation summary\n\nMost of the race detector's code comes down to collecting and preparation of data. The detector has per thread data and a global allocations/locks array(which stores context information about allocated memory that has to be checked, and lock states). The per thread data contains sets that store all reads/ writes relating to allocated memory, as well as all lock accesses and states. Checks are performed on every memory access to allocated memory. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluickk%2Fbasicthreaderrordetector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluickk%2Fbasicthreaderrordetector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluickk%2Fbasicthreaderrordetector/lists"}