{"id":18041309,"url":"https://github.com/ligurio/lua-c-api-tests","last_synced_at":"2025-04-09T16:50:30.203Z","repository":{"id":156586079,"uuid":"607301369","full_name":"ligurio/lua-c-api-tests","owner":"ligurio","description":"Lua C API tests","archived":false,"fork":false,"pushed_at":"2024-09-17T08:53:56.000Z","size":158,"stargazers_count":11,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-17T11:22:42.645Z","etag":null,"topics":["fuzzing","libfuzzer","lua","luajit","oss-fuzz"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ligurio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-27T18:07:56.000Z","updated_at":"2024-09-17T08:54:00.000Z","dependencies_parsed_at":"2023-10-05T15:32:54.085Z","dependency_job_id":"c6b89ea9-bb7b-4fbf-9c40-63c70ef941ef","html_url":"https://github.com/ligurio/lua-c-api-tests","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/ligurio%2Flua-c-api-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ligurio%2Flua-c-api-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ligurio%2Flua-c-api-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ligurio%2Flua-c-api-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ligurio","download_url":"https://codeload.github.com/ligurio/lua-c-api-tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248072495,"owners_count":21043244,"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":["fuzzing","libfuzzer","lua","luajit","oss-fuzz"],"created_at":"2024-10-30T15:09:07.335Z","updated_at":"2025-04-09T16:50:30.177Z","avatar_url":"https://github.com/ligurio.png","language":"C++","readme":"\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003ePUC Rio Lua\u003c/th\u003e\n    \u003ctd\u003e\u003ca href=\"https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened\u0026can=1\u0026q=proj:lua\"\u003e\u003cimg src=\"https://oss-fuzz-build-logs.storage.googleapis.com/badges/lua.svg\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/ispras/oss-sydr-fuzz/tree/master/projects/lua\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=oss-sydr-fuzz\u0026message=fuzzing\u0026color=brightgreen\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eLuaJIT\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/ispras/oss-sydr-fuzz/tree/master/projects/luajit\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=oss-sydr-fuzz\u0026message=fuzzing\u0026color=brightgreen\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eTarantool\u003c/th\u003e\n    \u003ctd\u003e\u003ca href=\"https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened\u0026can=1\u0026q=proj:tarantool\"\u003e\u003cimg src=\"https://oss-fuzz-build-logs.storage.googleapis.com/badges/tarantool.svg\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/ispras/oss-sydr-fuzz/tree/master/projects/tarantool\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=oss-sydr-fuzz\u0026message=fuzzing\u0026color=brightgreen\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n \u003c/tr\u003e\n\u003c/table\u003e\n\n# Lua C API tests\n\nis a set of fuzzing tests for C implementations of Lua runtime (PUC Rio Lua and\nLuaJIT).\n\n### Building\n\n```sh\ngit clone https://github.com/ligurio/lua-c-api-tests\ncd lua-c-api-tests\ngit clone https://github.com/ligurio/lua-c-api-corpus\nCC=clang CXX=clang++ cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DUSE_LUA=ON [-DUSE_LUAJIT=ON]\ncmake --build build --parallel\n```\n\nCMake options:\n\n- `USE_LUA` enables building PUC Rio Lua.\n- `USE_LUAJIT` enables building LuaJIT.\n- `LUA_VERSION` could be a Git branch, tag or commit. By default `LUA_VERSION` is\n`master` for PUC Rio Lua and `v2.1` for LuaJIT.\n- `ENABLE_LUAJIT_RANDOM_RA` enables randomness in a register allocation. Option\nis LuaJIT-specific.\n- `ENABLE_ASAN` enables AddressSanitizer.\n- `ENABLE_UBSAN` enables UndefinedBehaviorSanitizer.\n- `ENABLE_COV` enables coverage instrumentation.\n- `ENABLE_LUA_ASSERT` enables all assertions inside Lua source code.\n- `ENABLE_LUA_APICHECK` enables consistency checks on the C API.\n- `OSS_FUZZ` enables support of OSS Fuzz.\n- `ENABLE_BUILD_PROTOBUF` enables building Protobuf library, otherwise system\n  library is used.\n- `ENABLE_INTERNAL_TESTS` enables internal tests.\n\n### Running\n\n```sh\ncmake --build build --target test\ncd build \u0026\u0026 RUNS=100000 ctest -R luaL_gsub_test --verbose\n\u003csnipped\u003e\n1: Done 100000 runs in 5 second(s)\n```\n\n### References\n\n- [Lua 5.4 Reference Manual: 4 – The Application Program Interface](https://www.lua.org/manual/5.4/manual.html#4)\n- [Lua 5.3 Reference Manual: 4 – The Application Program Interface](https://www.lua.org/manual/5.3/manual.html#4)\n- [Lua 5.2 Reference Manual: 4 – The Application Program Interface](https://www.lua.org/manual/5.2/manual.html#4)\n- [Lua 5.1 Reference Manual: 3 – The Application Program Interface](https://www.lua.org/manual/5.1/manual.html#3)\n\n### License\n\nCopyright (C) 2022-2025 [Sergey Bronnikov](https://bronevichok.ru/),\nreleased under the ISC license. See a full Copyright Notice in the LICENSE file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fligurio%2Flua-c-api-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fligurio%2Flua-c-api-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fligurio%2Flua-c-api-tests/lists"}