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

GH-43688: [C++] Prevent Snappy from disabling RTTI when bundled #43706

Merged
merged 6 commits into from
Aug 16, 2024

Conversation

pitrou
Copy link
Member

@pitrou pitrou commented Aug 15, 2024

Rationale for this change

Snappy's CMakeLists.txt unconditionally disables RTTI. This is incompatible with some other options, such as activating UBSAN for a fuzzing build:
google/snappy#189

What changes are included in this PR?

Add -frtti at the end of compiler options when compiling a bundled Snappy build.

Are these changes tested?

On CI; also manually checked that this allows enabling Snappy on OSS-Fuzz builds.

Are there any user-facing changes?

No.

@pitrou
Copy link
Member Author

pitrou commented Aug 15, 2024

@github-actions crossbow submit -g cpp

This comment was marked as outdated.

@pitrou
Copy link
Member Author

pitrou commented Aug 15, 2024

@github-actions crossbow submit -g python

This comment was marked as outdated.

@pitrou
Copy link
Member Author

pitrou commented Aug 15, 2024

cc @kou

@pitrou pitrou marked this pull request as ready for review August 15, 2024 10:09
@pitrou pitrou requested a review from kou August 15, 2024 10:09
@pitrou
Copy link
Member Author

pitrou commented Aug 15, 2024

CI failures are unrelated.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

cpp/cmake_modules/ThirdpartyToolchain.cmake Outdated Show resolved Hide resolved
cpp/cmake_modules/ThirdpartyToolchain.cmake Outdated Show resolved Hide resolved
set(SNAPPY_ADDITIONAL_CXX_FLAGS "${SNAPPY_ADDITIONAL_CXX_FLAGS} -frtti")
endif()

if(NOT MSVC)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this if()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Aug 15, 2024
@pitrou
Copy link
Member Author

pitrou commented Aug 15, 2024

@github-actions crossbow submit -g cpp

This comment was marked as outdated.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Aug 16, 2024
@kou
Copy link
Member

kou commented Aug 16, 2024

@github-actions crossbow submit -g cpp -g python

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Aug 16, 2024

This comment was marked as outdated.

@kou
Copy link
Member

kou commented Aug 16, 2024

@github-actions crossbow submit -g cpp -g python

Copy link

Revision: 1d0aefa

Submitted crossbow builds: ursacomputing/crossbow @ actions-5b7a47bd42

Task Status
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
test-alpine-linux-cpp GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-cython2 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.10-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.10-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.10-substrait GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.8 GitHub Actions
test-conda-python-3.8-pandas-1.0-numpy-1.19 GitHub Actions
test-conda-python-3.9 GitHub Actions
test-conda-python-3.9-pandas-latest-numpy-latest GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-cpp GitHub Actions
test-cuda-python GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-fedora-39-cpp GitHub Actions
test-fedora-39-python-3 GitHub Actions
test-ubuntu-20.04-cpp GitHub Actions
test-ubuntu-20.04-cpp-bundled GitHub Actions
test-ubuntu-20.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-20.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-20.04-python-3 GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@kou kou merged commit a970fd7 into apache:main Aug 16, 2024
34 of 35 checks passed
@kou kou removed the awaiting change review Awaiting change review label Aug 16, 2024
@github-actions github-actions bot added the awaiting merge Awaiting merge label Aug 16, 2024
@pitrou pitrou deleted the gh43688-snappy-add-rtti branch August 16, 2024 10:17
Copy link

After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit a970fd7.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 143 possible false positives for unstable benchmarks that are known to sometimes produce them.

DavidKorczynski pushed a commit to google/oss-fuzz that referenced this pull request Aug 21, 2024
In PR #12320, we enabled more compression algorithms for Arrow C++, but
had to disable Snappy because of build issues.

Since then, the Arrow project merged a PR
(apache/arrow#43706) which enables RTTI when
building Snappy.

Therefore, we can now enable Snappy in the OSS-Fuzz builds of Arrow C++
as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants