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

Regression tests in make check, sanitisers in CI #631

Merged
merged 4 commits into from Jul 30, 2022

Conversation

TheOneric
Copy link
Member

@TheOneric TheOneric commented Jul 9, 2022

UBSAN seems to have found something in our UWP build on regression/karaoke/357-k-and-kf-desynced.ass, thus the UWP failure. As MSys2 doesn't ship the supporting UBSAN library, there's no report indicating what the problem is though (using -fsanitize-undefined-trap-on-error will cause SIGILLs (for Windows exit code 132) when something is found and allows the sanitiser to function without the library).
It would be good if someone can look into UBSAN’s findings; I don't see a way for me to investigate this myself. If nobody can, I'll probably just have to disable sanitisers for UWP.

The step's env settings are not forwarded to containers.
Use `-j 1` in CI for unmangled output.

In the future this could be improved by integrating with Automake's
test support to get better output with multiple jobs. Considering
the layour of the crash tests will likely change and that currently
the tests run in less 15 seconds even with just a single thread,
this should be good enough for now.
UBSAN finds something in the UWP build with the
regression/karaoke/357-k-and-kf-desynced.ass sample.
But due to lack of libubsan there's no report and
manual investigation is needed --- which requires a
Windows development setup.
macos-10.15 is being phased out and currently, prior to
full removal, fails unconditionally during specific times.
@TheOneric TheOneric merged commit 7e35f6d into libass:master Jul 30, 2022
@TheOneric TheOneric deleted the make_ART branch July 30, 2022 14:00
@TheOneric
Copy link
Member Author

TheOneric commented Jul 30, 2022

If someone with a Windows dev and/or debugging setup at hand wants to take a stab at the UBSAN findings, the options are:

  • using a debugger to locate roughly where the UB is located and then step through that part to find out the exact location (won't directly show why it is UB, but doesn't require libubsan)
  • Obtaining libubsan somehow.
    • search results suggests MSVC has UBSAN and libubsan, but I don't know if the lib is compatible or if compiling with MSVC finds the same bug(s).
    • At least on glibc Linux, building GCC from source (including bootstrapping) also yields a libubsan binary.
      As UBSAN should afaik support WIndows, it seems plausible building GCC from source in MSys2, will also yield a suitable libubsan — if there isn't some incompatibility with UWP...
      Building with bootstrapping may take an hour or more depending on machine and for me ~8GiB of object files were created (+2GiB for the sources and git repo).
    # Tested on glibc-Linux with e32ca426242f0e3c650f3122342792ad42255511
    git clone https://gcc.gnu.org/git/gcc.git gcc
    cd gcc
    autoreconf -ivf .
    ./contrib/downoad_prerequisites
    cd ..
    
    mkdir gcc-build
    cd gcc-build
    ../gcc/configure --enable-languages=c --disable-multilib
    make -j "$(nproc)"
    # for me the uninstalled lib binaries were located at
    #   x86_64-pc-linux-gnu/libsanitizer/ubsan/.libs/libubsan.*

@rcombs: rebasing #636 on master should now reveal the mentioned linking issues in the CI’s ubuntu+gcc build (clang seems to pull in pthreads automatically?)

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.

None yet

1 participant