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

Use undefined behavior sanitizer (ubsan) as part of CI #3565

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Sep 26, 2022

In addition to address and leak sanitizers, also turn on the undefined behavior sanitizer in our CI run. We can do it in the same job as asan/lsan.

Some things that come along for the ride, including fixes for things that ubsan uncovered:

  • src/build-scripts/ubsan-suppressions.txt can hold suppression list (though we don't have any now, it just sets up the space for it for future needs).

  • Split the "targa" test so that the parts that directly need the OIIO python module (which are all related to thumbnails) are now in "targa-thumbnails" test. That has to be disabled for the sanitizers, since we can't arrange for python to b linked to the sanitizer libraries.

  • Found vint4::store has a potentially unaligned integer store.

  • Found Strutil::concat is not necessarily safe if either of the strings are empty.

In addition to address and leak sanitizers, also turn on the undefined
behavior sanitizer in our CI run. We can do it in the same job as
asan/lsan.

Some things that come along for the ride, including fixes for things
that ubsan uncovered:

* src/build-scripts/ubsan-suppressions.txt can hold suppression list
  (though we don't have any now, it just sets up the space for it for
  future needs).

* Split the "targa" test so that the parts that directly need the OIIO
  python module (which are all related to thumbnails) are now in
  "targa-thumbnails" test. That has to be disabled for the sanitizers,
  since we can't arrange for python to b linked to the sanitizer
  libraries.

* Found vint4::store has a potentially unaligned integer store.

* Found Strutil::concat is not necessarily safe if either of the
  strings are empty.
@lgritz lgritz merged commit fcc4571 into AcademySoftwareFoundation:master Sep 27, 2022
@lgritz lgritz deleted the lg-ubsan branch September 27, 2022 19:12
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Oct 7, 2022
…reFoundation#3565)

In addition to address and leak sanitizers, also turn on the undefined
behavior sanitizer in our CI run. We can do it in the same job as
asan/lsan.

Some things that come along for the ride, including fixes for things
that ubsan uncovered:

* src/build-scripts/ubsan-suppressions.txt can hold suppression list
  (though we don't have any now, it just sets up the space for it for
  future needs).

* Split the "targa" test so that the parts that directly need the OIIO
  python module (which are all related to thumbnails) are now in
  "targa-thumbnails" test. That has to be disabled for the sanitizers,
  since we can't arrange for python to b linked to the sanitizer
  libraries.

* Found vint4::store has a potentially unaligned integer store.

* Found Strutil::concat is not necessarily safe if either of the
  strings are empty.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant