Skip to content

clang UBSan reports division by zero errors on unit tests #35

Description

@stessaris

Hi, I run the tests with the clang flags-fsanitize=address,undefined -fno-omit-frame-pointer, and it's reporting several division by zero errors.

E.g., the first two are:

unit_tests.c:4944:3: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior unit_tests.c:4944:3 
unit_tests.c:4944:3: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior unit_tests.c:4944:3 

I ran the tests on mcr.microsoft.com/devcontainers/cpp:ubuntu-24.04 (via devcontainers), the clang version is:

$ clang --version
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions