Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci/sanitizer: add undefined behavior sanitizer #1132

Merged
merged 3 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
sanitizer: [thread, address]
sanitizer: [thread, address, undefined]
env:
CC: clang-17
CMAKE_GENERATOR: Ninja
CFLAGS: "-fsanitize=${{ matrix.sanitizer }}"
CFLAGS: "-fsanitize=${{ matrix.sanitizer }} -fno-sanitize-recover=all -fno-sanitize=function"
ASAN_OPTIONS: fast_unwind_on_malloc=0

steps:
Expand Down
6 changes: 3 additions & 3 deletions test/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,9 @@ static void http_resp_handler(int err, const struct http_msg *msg, void *arg)

/* verify HTTP response */
TEST_STRCMP("1.1", 3, msg->ver.p, msg->ver.l);
TEST_STRCMP("", 0, msg->met.p, msg->met.l);
TEST_STRCMP("", 0, msg->path.p, msg->path.l);
TEST_STRCMP("", 0, msg->prm.p, msg->prm.l);
TEST_ASSERT(!msg->met.p);
TEST_ASSERT(!msg->path.p);
TEST_ASSERT(!msg->prm.p);
TEST_EQUALS(200, msg->scode);
TEST_STRCMP("OK", 2, msg->reason.p, msg->reason.l);
TEST_EQUALS(t->clen, msg->clen);
Expand Down
3 changes: 3 additions & 0 deletions test/vidconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ int test_vidconv_pixel_formats(void)

size_t size = test->dst_planev[p].sz;

if (!test->dst_planev[p].data)
continue;

TEST_MEMCMP(test->dst_planev[p].data,
test->dst_planev[p].sz,
fdst->data[p],
Expand Down
Loading