Skip to content

Conversation

@TimWolla
Copy link
Member

@TimWolla TimWolla commented Oct 6, 2023

This macro is no longer used within php-src since
60ace13, it invokes undefined behavior depending on the input and the corresponding MT_RAND_PHP mode was deprecated in PHP 8.3.

Thus remove this macro. Any remaining non-php-src user should just inline it into their code, but should ideally migrate to a non-biased scaler. In any case the undefined behavior of the original implementation should be accounted for.

This macro is no longer used within php-src since
60ace13, it invokes undefined behavior
depending on the input and the corresponding MT_RAND_PHP mode was deprecated in
PHP 8.3.

Thus remove this macro. Any remaining non-php-src user should just inline it
into their code, but should ideally migrate to a non-biased scaler. In any case
the undefined behavior of the original implementation should be accounted for.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

UPGRADING.INTERNALS entry is probably needed.

@TimWolla
Copy link
Member Author

TimWolla commented Oct 6, 2023

UPGRADING.INTERNALS entry is probably needed.

Makes sense, done.

@Girgias Girgias merged commit 3bc63a3 into php:master Oct 7, 2023
@TimWolla TimWolla deleted the rand-range-badscaling branch October 7, 2023 14:47
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