Skip to content

Improved fix for bug #54254 - #149

Closed
smalyshev wants to merge 5 commits into
php:masterfrom
smalyshev:bug54254
Closed

smalyshev wants to merge 5 commits into
php:masterfrom
smalyshev:bug54254

Conversation

@smalyshev

Copy link
Copy Markdown
Contributor

Improve version of #128

Comment thread ext/calendar/jewish.c Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One of us added a trailing space here

@emosenkis

Copy link
Copy Markdown
Contributor

It looks good except that you got the Hebrew name wrong for Adar I (it would translate to Adar 200 instead of 2). I also noticed and fixed two other things:

  1. The Hebrew for Adar I and II is not punctuated correctly - the apostrophe should be at the end, not the beginning[1]. I believe this was originally done due to some bidi mistake, but I have tested before and after using simple str_rev and piping through fribidi and it always works better with it moved to the end of the string.
  2. The lack of a space in AdarI and AdarII is ugly and seems to be for no reason. All of the tests still pass after I added spaces to make Adar I and Adar II.
    Rather than forking your branch, I just posted my changes as a diff at https://gist.github.com/3274062

[1] See http://en.wikipedia.org/wiki/Hebrew_numerals#Gershayim - the characters mentioned there don't seem to exist in ISO-8859-8 so we're stuck with single and double quotes

@smalyshev

Copy link
Copy Markdown
Contributor Author

These things are hard to do on my comp since it's in ISO-8859-8 and none of my text editors understands it and none supports bi-di without UTF-8, so I was doing it blind more or less. Thanks for fixing it. I wonder if we should move the strings to UTF-8 - everybody uses that nowdays anyway...

@emosenkis

Copy link
Copy Markdown
Contributor

Let's commit this set of fixes and when I get back from vacation I can try to change them all to UTF-8 - I type in Hebrew well enough that it shouldn't be too much trouble. It might be nice to add a note in the documentation that mentions that it's currently ISO-8859-8. There are a bunch of improvements that could be made to the Hebrew output of jdtojewish, but I don't have the time right now to do all of them and I want to make sure that the main part of this bug gets fixed in the next possible release.

@php-pulls

Copy link
Copy Markdown

Comment on behalf of stas at php.net:

merged

@php-pulls php-pulls closed this Aug 7, 2012
php-pulls pushed a commit that referenced this pull request Nov 8, 2013
Fixed issue #149 (Phar mount points not working with OPcache enabled).
php-pulls pushed a commit that referenced this pull request Nov 8, 2013
* PHP-5.5:
  Fixed issue #115 (path issue when using phar). Fixed issue #149 (Phar mount points not working with OPcache enabled).

Conflicts:
	NEWS
php-pulls pushed a commit that referenced this pull request Nov 8, 2013
* PHP-5.5:
  Fixed issue #115 (path issue when using phar). Fixed issue #149 (Phar mount points not working with OPcache enabled).

Conflicts:
	NEWS
igorw added a commit to igorw/php-src that referenced this pull request Nov 9, 2013
* upstream/PHP-5.6: (399 commits)
  Fixed issue php#115 (path issue when using phar). Fixed issue php#149 (Phar mount points not working with OPcache enabled).
  Added tests for PHAR/OPCahce incompatibilities
  Update NEWS
  Fixed bug #65947 (basename is no more working after fgetcsv in certain situation)
  Update NEWS
  Fixed Bug #66043 (Segfault calling bind_param() on mysqli)
  NEWS entry
  NEWS entry
  Fix bug #65946 - pdo_sql_parser.c permanently converts values bound to strings
  bump API versions
  Add a couple more test cases to parse_url() tests
  fix missing change from 'tcp_socket' to the more common 'server'
  fix many parallel test issues
  Cleanup temp test file
  Revert "Fixed issue php#115 (path issue when using phar)."
  Update LiteSpeed SAPI code to V6.4
  Fixed typo in Makefile.frag
  updated NEWS
  Remove outdate codes, make it clearer, although just a bit..
  Update NEWS
  ...

Conflicts:
	Zend/zend_compile.h
EdmondDantes added a commit to true-async/php-src that referenced this pull request May 25, 2026
… alive

ASAN: heap-use-after-free in php_stdiop_set_option at the post-SUSPEND
read of flock_data->result. flock_data is the inline tail of the libuv
task; the scheduler's WAKER_CLEAN_EVENTS runs between worker completion
and SUSPEND returning, releases the task's last ref, and libuv_task_dispose
pefree's the whole region — including flock_data — before our code wakes.

Fix: ADD_REF the task before SUSPEND, snapshot result/error_code into
locals after SUSPEND, then RELEASE. All error paths matched.

Repro: ext/async/tests/io/081-flock_non_blocking_event_loop.phpt under
LINUX_X64_DEBUG_ZTS_ASAN (PR php#149 job 77702704014). Local ASAN sweep on
ext/async/tests + ext/standard/tests/file + Zend/tests: 6795/6798 pass,
3 pre-existing unrelated fails (gh19983, 050/052 thread shutdown), no
new UAFs.
heyJordanParker referenced this pull request in heyJordanParker/php-sharp Oct 13, 2026
…upstream pins

Problem: eight analyzer twins asserted the `.php` file's upstream message text.
In each one, the `.sharp` rule reports another issue instead of rewording the
same one, so the text guarded nothing PHP# changes and only pinned Mago's
wording. Two more twins pinned an upstream miss, so fixing the miss would fail
the test.

Solution: a twin keeps the `.php` text only where the `.sharp` branch rewrites
the same issue. There, a leak keeps the code and the position and changes only
the text. Where the branch picks another issue, the twin asserts codes and
positions, which catch a leak. The two pins go, with mago-sharp issues #148 and
#149.

crates/analyzer/tests/sharp.rs
  a_property_with_accessors_over_a_php_parents_untyped_property_is_not_supported_yet
                                      codes and positions, not the text
  exit_with_a_value_that_cannot_be_a_message_names_the_int_status
                                      codes and positions, not the text
  a_template_refuses_every_type_but_int_float_string_and_bool
                                      codes and positions, not the text
  a_spread_of_a_value_that_is_neither_a_list_nor_a_map_is_an_error
                                      codes and positions, not the text
  ordering_a_nullable_instance_is_refused_until_it_is_tested_for_null
                                      codes and positions, not the text
  equality_of_a_class_instance_is_refused_until_the_class_declares_operator_equality
                                      drops the text; master's codes stay
  ordering_a_nullable_value_is_refused_until_it_is_tested_for_null
                                      drops the text; master's codes stay
  a_named_argument_never_fills_a_variadic_parameter_of_a_method_or_a_php_function
                                      drops the text; master's codes stay
  a_php_self_arrow_call_keeps_its_upstream_issue
                                      deleted, #149
  an_override_of_a_variadic_parameter_is_variadic
                                      drops its .php half, #148
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.

3 participants