{"id":25772852,"url":"https://github.com/risicle/cpytraceafl-regex","last_synced_at":"2026-05-15T06:03:34.569Z","repository":{"id":62565217,"uuid":"268914062","full_name":"risicle/cpytraceafl-regex","owner":"risicle","description":"A modified version of mrab-regex with added cpytraceafl instrumentation","archived":false,"fork":false,"pushed_at":"2020-06-22T17:33:34.000Z","size":50296,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T05:27:48.964Z","etag":null,"topics":["afl-fuzz","coverage","cpython","python","regular-expression","tracing"],"latest_commit_sha":null,"homepage":null,"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/risicle.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}},"created_at":"2020-06-02T21:37:56.000Z","updated_at":"2020-06-22T17:33:36.000Z","dependencies_parsed_at":"2022-11-03T16:00:49.787Z","dependency_job_id":null,"html_url":"https://github.com/risicle/cpytraceafl-regex","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/risicle%2Fcpytraceafl-regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/risicle%2Fcpytraceafl-regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/risicle%2Fcpytraceafl-regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/risicle%2Fcpytraceafl-regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/risicle","download_url":"https://codeload.github.com/risicle/cpytraceafl-regex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240976845,"owners_count":19887546,"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":["afl-fuzz","coverage","cpython","python","regular-expression","tracing"],"created_at":"2025-02-27T04:20:26.501Z","updated_at":"2026-05-15T06:03:29.529Z","avatar_url":"https://github.com/risicle.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cpytraceafl-regex\n\nThis is a thinly modified version of Matthew Barnett's\n[mrab-regex](https://bitbucket.org/mrabarnett/mrab-regex) regular expression library with\nadded instrumentation for use when fuzzing python code with\n[cpytraceafl](https://github.com/risicle/cpytraceafl).\n\nThe intention is for fuzzing harnesses to be able to substitute the builtin `re` module\nlibrary with this, highly compatible, module and thereby allow AFL to generate examples\nwhich pass regular expressions used in the target or explore their limits in interesting\nways.\n\nSee the original [README.mrab-regex.rst](./README.mrab-regex.rst) for more general\ninformation in this library's extended regex features.\n\n## Recommended usage\n\nEarly in the startup of the fuzzing harness, (though after the call to `install_rewriter()`):\n\n```python\nimport regex\nfrom sys import modules\nmodules[\"re\"] = regex\n```\n\ncode later importing/referencing the `re` module should instead be using this instrumented\n`regex` code. Note that before evaluating any regexes, `cpytraceafl.tracehook.set_map_start()`\nwill need to have been initialized with a memory region to write its intrumentation data\ninto. Otherwise you'll get segfaults.\n\nThis works unless the code under test attempts to use the `typing` module, at which point its\ntrick involving the `Pattern` type will trip up over itself. Some further hackery will need\nto be devised to get past this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frisicle%2Fcpytraceafl-regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frisicle%2Fcpytraceafl-regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frisicle%2Fcpytraceafl-regex/lists"}