{"id":25633130,"url":"https://github.com/sonicstark/saninvs","last_synced_at":"2026-06-20T11:32:23.511Z","repository":{"id":232721470,"uuid":"784666470","full_name":"SonicStark/SanInvs","owner":"SonicStark","description":"SanitizerInvariants - Instrumenting a program to infer invariants with Daikon, on the top of LLVM compiler infrastructure","archived":false,"fork":false,"pushed_at":"2025-02-21T04:32:06.000Z","size":140,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-10-17T09:01:32.204Z","etag":null,"topics":["daikon","invariants","llvm","sancov","sanitizer"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SonicStark.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}},"created_at":"2024-04-10T10:02:06.000Z","updated_at":"2025-02-21T04:39:21.000Z","dependencies_parsed_at":"2024-04-11T05:27:53.323Z","dependency_job_id":"0965fb45-908a-4ec7-af32-291c28e4b222","html_url":"https://github.com/SonicStark/SanInvs","commit_stats":null,"previous_names":["sonicstark/invssan","sonicstark/saninvs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SonicStark/SanInvs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonicStark%2FSanInvs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonicStark%2FSanInvs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonicStark%2FSanInvs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonicStark%2FSanInvs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SonicStark","download_url":"https://codeload.github.com/SonicStark/SanInvs/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonicStark%2FSanInvs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34568741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["daikon","invariants","llvm","sancov","sanitizer"],"created_at":"2025-02-22T21:28:02.031Z","updated_at":"2026-06-20T11:32:23.492Z","avatar_url":"https://github.com/SonicStark.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# SanitizerInvariants\n\nA friend of [SanitizerCoverage](https://clang.llvm.org/docs/SanitizerCoverage.html), but for invariants to Daikon.\n\n## Introduction\n\n[Daikon](http://plse.cs.washington.edu/daikon/), an implementation of dynamic detection of likely invariants, provides [Kvasir](https://plse.cs.washington.edu/daikon/download/doc/daikon.html#Kvasir) as the front end for C and C++. And *Kvasir* uses [Valgrind](https://valgrind.org/) which is a framework for heavyweight DBI as its infrastructure. \n\nYears have been passed and nowadays people prefer to use [sanitizers](https://github.com/google/sanitizers) as an alternative to *Valgrind*. So perhaps it's the right time to try detecting invariants with state-of-the-art ﻿techniques from LLVM compiler infrastructure now, e.g. [AddressSanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer) and [MemorySanitizer](https://github.com/google/sanitizers/wiki/MemorySanitizer). And [Daikon Developer Manual - 2.7.2 Instrumenting C programs](https://plse.cs.washington.edu/daikon/download/doc/developer.pdf) also holds a positive attitude towards this:\n\n\u003e You may wish to infer invariants over C programs running on other platforms;\nfor instance, you want a robust C front end that works under Microsoft Windows.\nThis section will help you to either write such a front end or to hand-instrument your program to produce output that Daikon can process.\n\n\u003e We welcome additions and corrections to this part of the manual. And, if you write a C instrumenter\nthat might be of use to others, please contribute it back to the Daikon project.\n\n\u003e The problem of tracking C memory may seem daunting, but it is not insurmountable.\nThere exist many tools for detecting or debugging memory errors in C,\nand they need to perform exactly the same memory tracking as a Daikon front end must perform.\nTherefore, a Daikon front end can use the same well-known techniques, and possibly can even be built on top of such a tool.\n\n\u003e There are two basic approaches to instrumenting a C program (or a program in any other language):\ninstrument the source code, or instrument a compiled binary representation of the program.\nIn each case, additional code that tracks all memory allocations, deallocations, writes, and reads must be executed at run time.\nWhich approach is most appropriate for you depends on what tools you use when building your C instrumentation system.\n\n## *SanInvs* versus *SanCov*\n\n*SanitizerInvariants* (abbr. *SanInvs*) is designed almost same as *SanitizerCoverage* (abbr. *SanCov*), and they are friends naturally:\n - Walk and insert callbacks on LLVM IR, as a module pass.\n - Runtimes that give a default implementation of these callbacks.\n - Provide explicit identifier for callbacks, such as guard or pc.\n\n*TODO*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonicstark%2Fsaninvs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonicstark%2Fsaninvs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonicstark%2Fsaninvs/lists"}