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

Force Siphash hashing #733

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion recipe/build_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ if [[ "${CONDA_BUILD_CROSS_COMPILATION}" == "1" ]]; then
echo "ac_cv_file__dev_ptc=no" >> config.site
echo "ac_cv_pthread=yes" >> config.site
echo "ac_cv_little_endian_double=yes" >> config.site
echo "ac_cv_aligned_required=no" >> config.site
if [[ "${target_platform}" == "osx-arm64" || "${target_platform}" == "linux-ppc64le" || "${target_platform}" == "linux-aarch64" ]]; then
echo "ac_cv_aligned_required=no" >> config.site
Comment on lines +183 to -184
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't change anything right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, it is just trying to replicate a similar change in #719, which I think ended up adding ac_cv_aligned_required=no twice to config.site.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you prefer, I can remove this change.

echo "ac_cv_pthread_is_default=yes" >> config.site
echo "ac_cv_working_tzset=yes" >> config.site
echo "ac_cv_pthread_system_supported=yes" >> config.site
Expand Down Expand Up @@ -277,6 +277,9 @@ if [[ ${PY_FREETHREADING} == yes ]]; then
_common_configure_args+=(--disable-gil)
fi

# Force siphash24 (https://github.com/conda-forge/python-feedstock/issues/718):
_common_configure_args+=(--with-hash-algorithm=siphash24)

Copy link
Member

Choose a reason for hiding this comment

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

Let's remove this so that if upstream changes the default algorithm, we won't fall behind.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in 8b77bac

# Add more optimization flags for the static Python interpreter:
declare -a PROFILE_TASK=()
if [[ ${_OPTIMIZED} == yes ]]; then
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% set ver2 = '.'.join(version.split('.')[0:2]) %}
{% set ver2nd = ''.join(version.split('.')[0:2]) %}
{% set ver3nd = ''.join(version.split('.')[0:3]) %}
{% set build_number = 0 %}
{% set build_number = 1 %}

# this makes the linter happy
{% set channel_targets = channel_targets or 'conda-forge main' %}
Expand Down
3 changes: 3 additions & 0 deletions recipe/run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,6 @@
print('OPENSSL_VERSION:', ssl.OPENSSL_VERSION)
CONDA_OPENSSL_VERSION = os.getenv('openssl')
assert CONDA_OPENSSL_VERSION in ssl.OPENSSL_VERSION

# See https://github.com/conda-forge/python-feedstock/issues/718 for context:
assert sys.hash_info.algorithm.startswith("siphash")
Loading