-
Notifications
You must be signed in to change notification settings - Fork 15k
Open
Open
Copy link
Labels
Description
This could be the same issue as #119099. One of the test cases in the pybind11 package is failing and I've bisected it back to 7954a05. Here is a container file to reproduce the failure:
FROM registry.fedoraproject.org/fedora:41
RUN dnf install -y cmake ninja-build git binutils-devel clang
WORKDIR /root/
RUN git clone https://github.com/llvm/llvm-project
WORKDIR /root/llvm-project
RUN git checkout 7954a0514ba7de40dba6c598af830fd1b7a8bf0c
RUN cmake -G Ninja -B build -S llvm/ -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=Native -DLLVM_BINUTILS_INCDIR=/usr/include -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
RUN ninja -C build install-clang install-clang-resource-headers install-LLVMgold install-llvm-ar install-llvm-ranlib
WORKDIR /root/
RUN dnf builddep -y pybind11
RUN git clone https://github.com/pybind/pybind11
WORKDIR /root/pybind11
RUN git checkout v2.13.6
ENV CFLAGS='-O2 -flto=thin -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' \
CXXFLAGS='-O2 -flto=thin -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' \
FFLAGS='-O2 -flto=thin -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' \
FCFLAGS='-O2 -flto=thin -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' \
LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -flto=thin -ffat-lto-objects -Wl,--build-id=sha1 ' \
CC=clang \
CXX=clang++
RUN /usr/bin/cmake -S . -B redhat-linux-build -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -B python3 -DCMAKE_BUILD_TYPE=Debug -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYBIND11_INSTALL=TRUE -DUSE_PYTHON_INCLUDE_DIR=FALSE
RUN /usr/bin/make -O -j$(nproc) V=1 VERBOSE=1 -C python3
RUN /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -sP'
RUN make -C python3 check -j$(nproc)
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
thesamesam commentedon Dec 11, 2024
For completeness and to aid searching, could you include the details of the failure here as well like you did for adcli? Thanks.
tstellar commentedon Dec 11, 2024
Here is the output from the failing tests:
fhahn commentedon Dec 11, 2024
@tstellar I am trying to build this with TypeSanitizer, but I am hitting the following error. Do you know where to add the sanitizer library?
tstellar commentedon Dec 12, 2024
@fhahn Did you add it to the LDFLAGS? Sometimes the python modules use the same flags that were used to link the interpreter so it is hard to change them. How can I test this out myself? I tried pulling from users/fhahn/tysan-a-type-sanitizer-runtime-library, but the compile jobs seem to hang with
-fsantitize=type
.fhahn commentedon Dec 17, 2024
Unfortunately the instrumentation currently is quite heavy, so it might run into a case where it is stuck generating and optimizing a lot of IR for a large input file.
@gbMattN has been working on improvements to move more of the checks to the runtime library, reducing the added additional IR for instrumentation (https://github.com/gbMattN/llvm-project/tree/users/gbmattn/tysan-reduce-inlining)
Now that the initial patches started landing, hopefully we can try it on that case, assuming it didn't finish eventually.
tstellar commentedon Dec 19, 2024
I was able to get the type sanitizer to work. It looks like there is a type-aliasing violation: