[PHP-DEV] Switching max_execution_time from CPU time to wall-clock time and from SIGPROF to SIGALRM

2024-05-17 Thread Arnaud Le Blanc
Hi internals, There is an issue with max_execution_time on MacOS, probably only MacOS 14 on Apple Silicon, that causes timeouts to fire too early [1]. max_execution_time is implemented with setitimer(ITIMER_PROF) on this platform, and the SIGPROF signal is delivered too early for some reason.

Re: [PHP-DEV] Requiring GPG Commit Signing

2024-04-02 Thread Arnaud Le Blanc
On Tue, Apr 2, 2024 at 4:16 PM Derick Rethans wrote: > What do y'all think about requiring GPG signed commits for the php-src > repository? > +1

Re: [PHP-DEV] XSLTProcessor recursion limit

2024-03-18 Thread Arnaud Le Blanc
Hi Niels, On Sat, Mar 16, 2024 at 5:49 PM Niels Dossche wrote: > Hi internals > > Based on https://bugs.php.net/bug.php?id=71571 I've opened a PR to > implement two new properties for XSLTProcessor: maxTemplateDepth and > maxTemplateVars. The reasoning behind this is that large templates with >

Re: [PHP-DEV] New gc_status() fields, and WeakMap cycle collection

2023-07-07 Thread Arnaud Le Blanc
Thus care should be taken to ensure that value objects do not strongly refer to their own keys, either directly or indirectly, since that will prevent the keys from being discarded". On Fri, Jul 7, 2023 at 4:03 PM Larry Garfield wrote: > > On Fri, Jul 7, 2023, at 1:09 PM, Arnaud Le Bla

[PHP-DEV] New gc_status() fields, and WeakMap cycle collection

2023-07-07 Thread Arnaud Le Blanc
Hi everyone, I'm considering merging the following two PRs: https://github.com/php/php-src/pull/11523: Exposes the time spent in the cycle collector via new gc_status() fields. https://github.com/php/php-src/pull/10932: Allows the GC to collect certain types of cycles involving WeakMaps. The

Re: [PHP-DEV] Preventing stack overflows

2022-10-07 Thread Arnaud Le Blanc
On 07/10/2022 16:14, Yasuo Ohgaki wrote: The root cause that users cannot understand what happened is this: $ php -n -r 'set_error_handler(function ($severity,$message, $filename, $lineno) { throw new ErrorException($message, 0, $severity, $filename, $lineno); });  function f() { f(); } f();'

[PHP-DEV] Preventing stack overflows

2022-10-07 Thread Arnaud Le Blanc
Hi internals, I would like to propose a way to detect stack overflows before they happen, with the goal of improving debugability. Stack overflows are caused by excessive stack usage, typically due to deep recursions. Recursion in PHP doesn't use recursion internally, but some constructs

Re: [PHP-DEV] [RFC][Vote] Auto-capture closures

2022-07-16 Thread Arnaud Le Blanc
On vendredi 1 juillet 2022 16:04:30 CEST Larry Garfield wrote: > Greetings, Internalians. > > The vote for auto-capture closures is now open. It will run until 15 July. > > https://wiki.php.net/rfc/auto-capture-closure Hi Internals, The RFC has been declined with a vote of 27 in favor and 16

Re: [PHP-DEV] [RFC][Vote] Auto-capture closures

2022-07-05 Thread Arnaud Le Blanc
On mardi 5 juillet 2022 09:27:34 CEST Marco Pivetta wrote: > This is fine, but it creates a bidirectional dependency between components > where the dependency graph was previously (in theory) acyclic. > > This will become "someone else's problem"  I don't think that the Optimizer conceptually

Re: [PHP-DEV] [RFC][Vote] Auto-capture closures

2022-07-04 Thread Arnaud Le Blanc
Hi, On lundi 4 juillet 2022 11:47:03 CEST Nicolas Grekas wrote: > I'm just wondering if there could be a way to enable the auto-capture > optimization for arrow functions. Having three kinds of rules for capturing > feels too much, especially when there are that subtles for short closures. >

Re: [PHP-DEV] [RFC][Vote] Auto-capture closures

2022-07-04 Thread Arnaud Le Blanc
Hi, On lundi 4 juillet 2022 12:04:59 CEST Marco Pivetta wrote: > I ended up voting NO due to the fact that there is no mention of `$this` > behavior changes ( https://externals.io/message/117888#117889 ) : I also > disagree with NikiC's stance on this being the same construct as before ( >

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-07-01 Thread Arnaud Le Blanc
Hi Björn, On Wed, Jun 29, 2022 at 8:09 PM Björn Larsson via internals < internals@lists.php.net> wrote: > Would it be an option to include a "Future scope" with the features: > - Explicit capture that list only the variables to be captured by value > or reference, nothing else. > - Extending the

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-07-01 Thread Arnaud Le Blanc
Hi Rowan, Since this still has a small chance of breaking existing code, we preferred to exclude arrow functions from this change, for now. We have added this in Future Scope. This is something we could do in a follow-up RFC. Regards,

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-07-01 Thread Arnaud Le Blanc
Hi Guilliam, Thank you for noticing. The PR is now fully in sync with the RFC (no arrow function changes, no explicit use support). The RFC also now clarifies that arrow functions are not changed by the RFC.

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-30 Thread Arnaud Le Blanc
On jeudi 30 juin 2022 18:29:44 CEST Guilliam Xavier wrote: > Ah? Sorry, I had interpreted > https://github.com/php/php-src/pull/8330/files#diff-85701127596aca0e597bd796 > 1b5d59cdde4f6bb3e2a109a22be859ab7568b4d2R7318-R7320 as "capture the > *minimal* set of variables for *both* arrow functions and

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-30 Thread Arnaud Le Blanc
Hi, On jeudi 30 juin 2022 16:18:44 CEST Robert Landers wrote: > Are > optimizations going to be applied to single-line arrow functions (I > didn't see that in the RFC, but I admittedly didn't look that hard and > I vaguely remember reading something about it in one of these > threads)? If so, it

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-30 Thread Arnaud Le Blanc
ound_stmts.html#with [4] https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/ keywords/using-statement Cheers, -- Arnaud Le Blanc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-14 Thread Arnaud Le Blanc
On lundi 13 juin 2022 15:36:26 CEST Rowan Tommins wrote: > > Auto-capture in PHP is by-value. This makes this impossible. It also makes > > explicit declarations non-necessary and much less useful. > > > > Live-variable analysis is mentioned in as part of implementation details. > > It should not

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-14 Thread Arnaud Le Blanc
>value = 'explicit scope is nice'; > }; Do you have an example where the intent would be less obvious ? With code you would actually write ? Cheers, -- Arnaud Le Blanc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-13 Thread Arnaud Le Blanc
With a block scoping keyword, they can mark > local variables explicitly, as they would in other languages. Live-variable analysis is mentioned in as part of implementation details. It should not be necessary to understand these details to understand the behavior of auto-capture. I've updated the "Auto-capture semantics" section of the RFC. Regards, -- Arnaud Le Blanc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-13 Thread Arnaud Le Blanc
g your comment, I have clarified a few things in the "Auto-capture semantics" section. This includes a list of way in which these effects can be observed. These are really marginal cases that are not relevant for most programs. Cheers -- Arnaud Le Blanc -- PHP Internals - PHP Runtim

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-13 Thread Arnaud Le Blanc
On lundi 13 juin 2022 12:28:17 CEST Robert Landers wrote: > From a maintainer and code review aspect, I prefer the longer syntax > because it is 100% clear on which variables are being closed over and > utilized in the anonymous function. fn($x) => $x + $y is pretty clear > that $y is being pulled

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-13 Thread Arnaud Le Blanc
On dimanche 12 juin 2022 19:54:06 CEST Mark Baker wrote: > Did many of those closures use "pass by reference" in the use clause, > because that's one real differentiator between traditional closures and > short lambdas. There's also the fact that use values are bound at the > point where the

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-09 Thread Arnaud Le Blanc
; captured > > Would that allow us to get rid of `static fn () {` declarations, when > creating one of these closures in an instance method context? It would be great to get rid of this, but ideally this would apply to Arrow Functions and Anonymous Functions as well. This could be a separate RFC

Re: [PHP-DEV] instance version of match ?

2022-03-31 Thread Arnaud Le Blanc
On mardi 29 mars 2022 15:33:41 CEST Thomas Nunninger wrote: > Hi, > > Am 29.03.22 um 14:34 schrieb Rowan Tommins: > > On 29/03/2022 11:59, Robert Landers wrote: > >> $object instanceof AnotherInterface => 'bar', > >> > >> We can see that `SomeInterface` will resolve the interface and

Re: [PHP-DEV] [RFC][Under discussion] Arbitrary string interpolation

2022-03-25 Thread Arnaud Le Blanc
Hi Ilija I find that sprintf() is easier to read in most cases. One reason for this is that the text is separated from the code. It's also easier to review for humans and linters. The strtoupper example would look like this with sprintf: $world = 'world'; echo sprintf('Hello %s!',

Re: [PHP-DEV] Disabling the GC during shutdown

2013-06-22 Thread Arnaud Le Blanc
Hi, This bug may be related (and has a reproducing script) : https://bugs.php.net/bug.php?id=63734 On Sat, Jun 22, 2013 at 4:41 AM, Andi Gutmans a...@zend.com wrote: -Original Message- From: Stas Malyshev [mailto:smalys...@sugarcrm.com] Sent: Thursday, June 20, 2013 8:20 PM To:

[PHP-DEV] [PATCH] Bug #60139 closure memory leaks

2011-10-29 Thread Arnaud Le Blanc
Hi, Closures can hold references to variables, but don't expose them to the garbage collector. The GC is unable to find cycles in which a closure is involved, and this can create memory leaks. I've reported this problem in https://bugs.php.net/bug.php?id=60139 and posted a patch. Can someone

Re: [PHP-DEV] Ternary operator performance improvements

2011-10-18 Thread Arnaud Le Blanc
Hi, Le Monday 17 October 2011 15:07:30, Alain Williams a écrit : On Fri, Oct 14, 2011 at 08:08:56PM +0200, Arnaud Le Blanc wrote: Hi, I've already posted this patch and it has since been reviewed and improved. I'm re-posting it for discussion before eventually commiting

[PHP-DEV] Ternary operator performance improvements

2011-10-14 Thread Arnaud Le Blanc
Hi, I've already posted this patch and it has since been reviewed and improved. I'm re-posting it for discussion before eventually commiting it. The ternary operator always copies its second or third operand, which is very slow compared to an if/else when the operand is an array for example:

[PHP-DEV] Re: Ternary operator improvements

2011-07-11 Thread Arnaud Le Blanc
to me. Also, I would probably prefer to use new opcodes ZEND_QM_ASSIGN_VAR and ZEND_JMP_SET_VAR. Ok, I'll change the patch to use new opcodes instead I'll try to think a bit more about it later today. Thanks Thanks. Dmitry. On 07/08/2011 06:39 PM, Arnaud Le Blanc wrote: Hi

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-22 Thread Arnaud Le Blanc
Hi, Le mardi 18 janvier 2011 à 23:36 +0100, Hannes Landeholm a écrit : Just a simple threading implementation with a strictly defined way to IPC would be very helpful. If you just want to throw some executors and pass messages between them you can already fork processes with pcntl [1] and pass

Re: [PHP-DEV] Upload progress in sessions

2010-05-10 Thread Arnaud Le Blanc
Le vendredi 07 mai 2010 à 18:57 +0200, Hannes Magnusson a écrit : 2010/5/4 Jaroslav Hanslik konfere...@kukulich.cz: Hi, upload progress in session is implemented in old trunk. Is there a change to apply the patch also to the new trunk? http://wiki.php.net/rfc/session_upload_progress

Re: [PHP-DEV] Implementing fdopen in PHP

2010-03-15 Thread Arnaud Le Blanc
Le dimanche 14 mars 2010 à 17:38 +1100, Dennis Hotson a écrit : Hi all, It's my first post, so go easy on me. :-) I'm trying to implement PHP support for github's erlang RPC server called ernie. So basically I've been porting the following ruby code to PHP:

Re: [PHP-DEV] Stream: Cast and Seek

2009-12-05 Thread Arnaud Le Blanc
Hi, Le samedi 05 décembre 2009 à 00:01 +0100, Samuel ROZE a écrit : Hello, I'm working on the use of a PHP SSH2 Stream returned by ssh2_shell function with stream_select() function. Within the PHP code, before being used into the select() C function, a stream have to be casted... The

Re: [PHP-DEV] Stream: Cast and Seek

2009-12-05 Thread Arnaud Le Blanc
it may be a _channel_data instead). That my cast code (patch on PHP 5.3 branche): http://www.d-sites.com/wp-content/uploads/2009/12/cast_ssh2_stream.patch Is there something wrong ? Regards, Samuel. Le samedi 05 décembre 2009 à 13:40 +0100, Arnaud Le Blanc a écrit : Hi, Le

[PHP-DEV] Re: extending ignore_errors inside http_fopen_wrappers.c

2009-05-16 Thread Arnaud Le Blanc
a point of discussion; my apologies if this has been outright rejected before ;-) On 5/16/09, Arnaud Le Blanc lbarn...@php.net wrote: On Fri, 2009-05-15 at 11:49 -0400, Ilia Alshanetsky wrote: the patch looks good. Same here. Lukas, Johannes, can this be commited to 5.3 ? Regards

Re: [PHP-DEV] Re: extending ignore_errors inside http_fopen_wrappers.c

2009-05-16 Thread Arnaud Le Blanc
reported for also.. --Jani Arnaud Le Blanc kirjoitti: I commited your change as it fixes a bug, thanks for the patch :) I also followed your idea of a server to test http streams (ftp extension does this, too) and wrote a test for this bug. Other http tests are welcome if you

Re: [PHP-DEV] extending ignore_errors inside http_fopen_wrappers.c

2009-05-15 Thread Arnaud Le Blanc
Hi, On Fri, 2009-05-15 at 22:16 +0800, Tjerk Anne Meesters wrote: Hi, I've been extending the pecl/oauth code to work with php stream wrappers in cases whereby curl is not enabled, but I've hit a snag. The documentation states that enabling the ignore_errors flag will fetch the content

Re: [PHP-DEV] extending ignore_errors inside http_fopen_wrappers.c

2009-05-15 Thread Arnaud Le Blanc
patch attached. Best, Tjerk On Fri, May 15, 2009 at 10:58 PM, Arnaud Le Blanc lbarn...@php.net wrote: Hi, On Fri, 2009-05-15 at 22:16 +0800, Tjerk Anne Meesters wrote: Hi, I've been extending the pecl/oauth code to work with php stream wrappers in cases whereby curl

[PHP-DEV] Re: Fix for bug #45540 not in PHP_5_2

2009-05-14 Thread Arnaud Le Blanc
Hi, On Thu, 2009-05-14 at 17:14 +0300, Jani Taskinen wrote: Hi, Why wasn't this fix merged to PHP_5_2? It's clearly a bug and it really should be fixed in the stable branch as well.. The fix changes a parameter of php_stream_url_wrap_http_ex(), I guess that I thought that it was

Re: [PHP-DEV] Bug 47468: enabling readline/libedit/pcntl/ncurses with --enable-embed

2009-05-09 Thread Arnaud Le Blanc
On Sat, 2009-05-09 at 03:45 +0300, Jani Taskinen wrote: Arnaud Le Blanc kirjoitti: On Fri, 2009-05-08 at 16:12 +0100, Paul Biggar wrote: Hi Arnaud, Thanks for looking at this. On Fri, May 8, 2009 at 2:11 PM, Arnaud Le Blanc lbarn...@php.net wrote: Does the following patch works

Re: [PHP-DEV] Bug 47468: enabling readline/libedit/pcntl/ncurses with --enable-embed

2009-05-08 Thread Arnaud Le Blanc
Hi, On Wed, 2009-05-06 at 20:42 +0100, Paul Biggar wrote: Hi folks, Could I get someone to look at http://bugs.php.net/bug.php?id=47468?. It includes a patch which is confirmed to fix the problem. Does the following patch works for you ? (use ./buildconf after applying, then reconfigure).

Re: [PHP-DEV] Bug 47468: enabling readline/libedit/pcntl/ncurses with --enable-embed

2009-05-08 Thread Arnaud Le Blanc
On Fri, 2009-05-08 at 16:12 +0100, Paul Biggar wrote: Hi Arnaud, Thanks for looking at this. On Fri, May 8, 2009 at 2:11 PM, Arnaud Le Blanc lbarn...@php.net wrote: Does the following patch works for you ? (use ./buildconf after applying, then reconfigure). It does the same thing

Re: [PHP-DEV] PHP 5.3.0RC2

2009-05-05 Thread Arnaud Le Blanc
On Mon, May 4, 2009 at 5:29 PM, Lukas Kahwe Smith m...@pooteeweet.org wrote: until then we need to make sure we can get that re2c bug fixed and a new release out. this might require reducing the bus factor on re2c. A good starting point for re2c internals is the following paper:

Re: [PHP-DEV] [PATCH] Scanner diet with fixes, etc.

2009-05-04 Thread Arnaud Le Blanc
Hi, On Mon, May 4, 2009 at 9:36 AM, shire sh...@php.net wrote: Regarding the ZEND_MMAP_AHEAD issue and the temp. fix that Dmitry put in we need to find a solution to that, perhaps I can play with that this week too as I think I'm seeing some related issues in my testing of 5.3.  Essentially we

Re: [PHP-DEV] [PATCH] Scanner diet with fixes, etc.

2009-05-04 Thread Arnaud Le Blanc
On Mon, May 4, 2009 at 5:51 PM, shire sh...@php.net wrote: Arnaud Le Blanc wrote: Hi, On Mon, May 4, 2009 at 9:36 AM, shiresh...@php.net  wrote: Regarding the ZEND_MMAP_AHEAD issue and the temp. fix that Dmitry put in we need to find a solution to that, perhaps I can play

Re: [PHP-DEV] Support for Transfer-Encoding: chunked in http stream wrapper

2009-04-15 Thread Arnaud Le Blanc
Hi, On Tue, 2009-04-14 at 18:59 +0400, Dmitry Stogov wrote: Some PHP applications which check for Transfer-Encoding HTTP header and perform manual decoding might be broken. What about not adding the Transfer-Encoding header to wrapper_data ? (not making it visible so that scripts would not

Re: [PHP-DEV] un-deprecating ticks ?

2009-03-26 Thread Arnaud Le Blanc
On Thu, 2009-03-26 at 08:51 +0100, Lukas Kahwe Smith wrote: On 26.03.2009, at 01:30, Arnaud Le Blanc wrote: On Wed, 2009-03-25 at 20:05 +0100, Lukas Kahwe Smith wrote: On 19.03.2009, at 14:32, Arnaud Le Blanc wrote: Hi, After having seen some complaints about ticks being deprecated

Re: [PHP-DEV] un-deprecating ticks ?

2009-03-25 Thread Arnaud Le Blanc
On Wed, 2009-03-25 at 20:05 +0100, Lukas Kahwe Smith wrote: On 19.03.2009, at 14:32, Arnaud Le Blanc wrote: Hi, After having seen some complaints about ticks being deprecated I'm wondering if they could be un-deprecated for now. Ticks are used by the pcntl extension to call signal

[PHP-DEV] un-deprecating ticks ?

2009-03-19 Thread Arnaud Le Blanc
Hi, After having seen some complaints about ticks being deprecated I'm wondering if they could be un-deprecated for now. Ticks are used by the pcntl extension to call signal handlers when signals are triggered. I added some functions as an alternative, but this does not covers all use cases (and

Re: [PHP-DEV] 5.3 todos

2009-02-12 Thread Arnaud Le Blanc
Hi, On Wed, 2009-02-11 at 18:07 +0100, Lukas Kahwe Smith wrote: - pcntl_signal needs declare(ticks) which is deprecated since 5.3 I marked this as a documentation issue. This has been discussed when it was decided to deprecate ticks. Although it would be great to keep ticks, at least for use

Re: [PHP-DEV] [PATCH] Allow unsetting headers previously set usingheader()

2008-11-28 Thread Arnaud Le Blanc
Hi, On Friday 28 November 2008 18:24:38 Uwe Schindler wrote: Just one question here: When implementing this into NSAPI, I found the following problem: NSAPI does not directly allows to remove all headers, you can only do this step by step. So there are three possibilities to ship around

Re: [PHP-DEV] [PATCH] Allow unsetting headers previously set usingheader()

2008-11-13 Thread Arnaud Le Blanc
this. - Uwe Schindler [EMAIL PROTECTED] - http://www.php.net NSAPI SAPI developer Bremen, Germany -Original Message- From: Arnaud LB [mailto:[EMAIL PROTECTED] On Behalf Of Arnaud Le Blanc Sent: Sunday, November 09, 2008 10:02 PM To: internals@lists.php.net Cc: Christian Schmidt

Re: [PHP-DEV] quick polls for 5.3

2008-11-12 Thread Arnaud Le Blanc
On Wednesday 12 November 2008 20:14:31 Lukas Kahwe Smith wrote: Hi, 1) ext/mhash in 5.3. ext/hash has all the functions, so the entire BC break will be that if (extension_loaded('mhash')) will need fixing if mhash is removed (answer both) I) enable ext/hash by default +1 II) remove

Re: [PHP-DEV] [PATCH] Allow unsetting headers previously set usingheader()

2008-11-09 Thread Arnaud Le Blanc
On Sunday 09 November 2008 19:51:31 Christian Schmidt wrote: Stan Vassilev | FM wrote: I suggest header_remove('*') or simply header_remove() /no param/ removes all headers (including the one PHP sets by default), so we can start with a clear state. I added header_remove('Foo').

Re: [PHP-DEV] [PATCH] parse_ini_string()

2008-11-05 Thread Arnaud Le Blanc
On Wednesday 05 November 2008 17:30:21 Olivier Grange-Labat wrote: Hello, Here's a patch again PHP_5_3 to add a parse_ini_string() function. It just works as parse_ini_file(), except it accepts a string instead of a filename, obviously. We've been using for months a simple PHP function

[PHP-DEV] Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/sockets sockets.c

2008-10-23 Thread Arnaud Le Blanc
On Thursday 23 October 2008 08:54:19 Hannes Magnusson wrote: On Wed, Oct 22, 2008 at 20:59, Arnaud Le Blanc [EMAIL PROTECTED] wrote: lbarnaudWed Oct 22 18:59:34 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/sockets

[PHP-DEV] Making ereg extension optional ?

2008-09-12 Thread Arnaud Le Blanc
Hi, PHP now builds and works without ereg, is it planed to make it optional ? Regards, Arnaud -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Opinion needed (bug #45928)

2008-09-10 Thread Arnaud Le Blanc
On Wednesday 10 September 2008 11:25:40 Christian Schneider wrote: Am 10.09.2008 um 10:52 schrieb Tullio Andreatta ML: fstat on a open-ed fd can't stat a symbolic link, since open(symlink) returns a file descriptor of the target file, or -1 if it's a dangling link ... Yes, that's

Re: [PHP-DEV] Opinion needed (bug #45928)

2008-09-09 Thread Arnaud Le Blanc
Hi, On Tuesday 09 September 2008 14:39:05 Alexey Zakhlestin wrote: http://bugs.php.net/bug.php?id=45928 Christian Schneider wrote: I had a quick look at this bug and found the problem to be in Zend/zend_stream.c function zend_stream_fsize(): It uses fstat() to determine the filesize

Re: [PHP-DEV] Opinion needed (bug #45928)

2008-09-09 Thread Arnaud Le Blanc
Hi, On Tuesday 09 September 2008 17:35:54 Christian Schneider wrote: Arnaud Le Blanc wrote: The following may (no MacOS X to test) fix the problem by returning 0 from zend_stream_fsize() when the file descriptor is not a regular file: http://arnaud.lb.s3.amazonaws.com/45928.patch Your

[PHP-DEV] [PATCH][HEAD] Upload progress in sessions

2008-09-08 Thread Arnaud Le Blanc
Hi, I have written a patch to implement upload progress feedback in session data. The file upload feature in PHP allows extensions to be called back on some events. A few extensions use this to implement some sort of upload progress feedback, but none of them are released with PHP, which makes

Re: [PHP-DEV] [PATCH][HEAD] Upload progress in sessions

2008-09-08 Thread Arnaud Le Blanc
Hi, On Monday 08 September 2008 13:03:11 Pierre Joye wrote: On Mon, Sep 8, 2008 at 12:18 PM, Arnaud Le Blanc [EMAIL PROTECTED] wrote: Hi, I have written a patch to implement upload progress feedback in session data. The file upload feature in PHP allows extensions to be called back

Re: [PHP-DEV] [PATCH][HEAD] Upload progress in sessions

2008-09-08 Thread Arnaud Le Blanc
Hi, On Monday 08 September 2008 13:06:50 Martin Jansen wrote: On Mon, Sep 8, 2008 at 12:18 PM, Arnaud Le Blanc [EMAIL PROTECTED] wrote: The patch allows to store upload progress informations in session variables. These informations can be retrieved by an other script while the upload

Re: [PHP-DEV] [PATCH][HEAD] Upload progress in sessions

2008-09-08 Thread Arnaud Le Blanc
Hi, On Monday 08 September 2008 15:19:07 Richard Quadling wrote: 2008/9/8 Arnaud Le Blanc [EMAIL PROTECTED]: Hi, On Monday 08 September 2008 13:06:50 Martin Jansen wrote: On Mon, Sep 8, 2008 at 12:18 PM, Arnaud Le Blanc [EMAIL PROTECTED] wrote: The patch allows to store upload

Re: [PHP-DEV] BUG #45392

2008-09-02 Thread Arnaud Le Blanc
Hi, On Tuesday 02 September 2008 12:15:02 Dmitry Stogov wrote: Jani Taskinen wrote: Dmitry Stogov wrote: Hi, Attached is a proposed fix for http://bugs.php.net/bug.php?id=45392 for PHP_5_3. I don't know output buffering part very well, and I'm not completely sure about this fix, so

[PHP-DEV] Re: [RFC] Native TLS for globals in ZTS

2008-08-26 Thread Arnaud Le Blanc
2008 with IIS (older Windows cannot use TLS in LoadLibrary()-loaded DLLs). This works as expected, but there are still some restrictions. Regards, Arnaud On Sunday 24 August 2008 18:37:09 Arnaud Le Blanc wrote: Hi, I have written a RFC about my patch at http://wiki.php.net/rfc/tls

[PHP-DEV] [RFC] Native TLS for globals in ZTS

2008-08-24 Thread Arnaud Le Blanc
Hi, I have written a RFC about my patch at http://wiki.php.net/rfc/tls The goal of this patch is to reduce the performance overhead of ZTS builds. Since the initial patch I made more research on various implementations of TLS: Linux, FreeBSD, Solaris, Windows. Based on what I found I wrote a

Re: [PHP-DEV] Something to ponder on ZTS/TSRM

2008-08-24 Thread Arnaud Le Blanc
Hi, On Friday 22 August 2008 21:15:56 William A. Rowe, Jr. wrote: As far as the future direction of embedded PHP (and let's agree here we aren't talking about every application, for mass vhosters some fcgi or suid flavor of PHP is going to remain a better choice, and for others, so we can

Re: [PHP-DEV] [PATCH] ZTS as fast as non-ZTS

2008-08-21 Thread Arnaud Le Blanc
Hi, On Thursday 21 August 2008 09:37:12 Dmitry Stogov wrote: Arnaud Le Blanc wrote: Hi, On Tuesday 19 August 2008 09:22:46 Dmitry Stogov wrote: Hi Arnaud, Arnaud Le Blanc wrote: Hi, On Monday 18 August 2008 19:46:46 Dmitry Stogov wrote: Hi Arnaud, The patch looks very

Re: [PHP-DEV] [PATCH] ZTS as fast as non-ZTS

2008-08-21 Thread Arnaud Le Blanc
Hi, On Wednesday 20 August 2008 21:51:05 Kalle Sommer Nielsen wrote: 2008/8/20 Arnaud Le Blanc [EMAIL PROTECTED]: Hi, On Tuesday 19 August 2008 18:22:44 Andi Gutmans wrote: OK checked with Zeev. It seems there are some significant limitations at least on Windows including

Re: [PHP-DEV] [PATCH] ZTS as fast as non-ZTS

2008-08-20 Thread Arnaud Le Blanc
Message- From: Arnaud Le Blanc [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2008 7:00 AM To: Andi Gutmans Cc: PHP Development Subject: Re: [PHP-DEV] [PATCH] ZTS as fast as non-ZTS Hi, Yes, I have looked for the issue with --with-tsrm-full-__thread-tls

Re: [PHP-DEV] [PATCH] ZTS as fast as non-ZTS

2008-08-19 Thread Arnaud Le Blanc
Hi, On Tuesday 19 August 2008 09:22:46 Dmitry Stogov wrote: Hi Arnaud, Arnaud Le Blanc wrote: Hi, On Monday 18 August 2008 19:46:46 Dmitry Stogov wrote: Hi Arnaud, The patch looks very interesting. I think it may be committed to the HEAD in the nearest future. I don't have

Re: [PHP-DEV] [PATCH] ZTS as fast as non-ZTS

2008-08-19 Thread Arnaud Le Blanc
into this further? Yes, I will try at least with Windows (XP, so no IIS) and FreeBSD. Andi -Original Message- From: Arnaud Le Blanc [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2008 10:00 PM To: Andi Gutmans Cc: PHP Development Subject: Re: [PHP-DEV] [PATCH] ZTS

Re: [PHP-DEV] [PATCH] ZTS as fast as non-ZTS

2008-08-18 Thread Arnaud Le Blanc
be interesting to try the same idea on Windows with VC. I will try too. Thanks. Dmitry. Arnaud Le Blanc wrote: Hi, Currently the way globals work forces to pass a thread-local-storage pointer across function calls, which involves some overhead. Also, not all functions get

Re: [PHP-DEV] [PATCH] ZTS as fast as non-ZTS

2008-08-18 Thread Arnaud Le Blanc
Hi, On Monday 18 August 2008 22:26:20 Stanislav Malyshev wrote: Hi! The following patch caches each global address in a native TLS variable so that accessing a global is as simple as global_name-member. This removes the requirement of passing the tls pointer across function calls, so

Re: [PHP-DEV] [PATCH] ZTS as fast as non-ZTS

2008-08-18 Thread Arnaud Le Blanc
at thread local storage and there were some real issues with it. I can't remember what as it was about 7+ years ago. I will ask Zeev if he remembers and if not search my archives (don't have years prior to 2007 indexed :'( ). Andi -Original Message- From: Arnaud Le Blanc

[PHP-DEV] [PATCH] ZTS as fast as non-ZTS

2008-08-16 Thread Arnaud Le Blanc
Hi, Currently the way globals work forces to pass a thread-local-storage pointer across function calls, which involves some overhead. Also, not all functions get the pointer as argument and need to use TSRMLS_FETCH(), which is slow. For instance emalloc() involves a TSRMLS_FETCH(). An other

[PHP-DEV] [PATCH] Bug #45384, ini parse error with no trailing newline

2008-08-16 Thread Arnaud Le Blanc
Hi, Here is a patch for #45384 (the ini parser returns a parse error when it hits EOF while parsing a non enclosed string): http://arnaud.lb.s3.amazonaws.com/parse_ini_file_45384.patch Regards, Arnaud -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] [RFC] Zend Signal Handling

2008-08-14 Thread Arnaud Le Blanc
On Thursday 14 August 2008 02:59:48 Arnaud Le Blanc wrote: Hi, I made some changes to the patch: http://arnaud.lb.s3.amazonaws.com/php-5.3.0-alarms-0808141122.patch - Apache effectively seems to resets the signals after MINIT, so original handlers are now saved in RINIT in the first

Re: [PHP-DEV] [RFC] Zend Signal Handling

2008-08-13 Thread Arnaud Le Blanc
Hi, On Wednesday 13 August 2008 10:09:43 Dmitry Stogov wrote: Hi Lucas, I took a look into patch and I still don't like it. I may miss some things and make mistakes so correct me if I'm wrong. 1) It makes some slowdown for all SAPIs except Apache1, because it adds additional block/unblock

Re: [PHP-DEV] [RFC] Zend Signal Handling

2008-08-13 Thread Arnaud Le Blanc
Hi, I made some changes to the patch: http://arnaud.lb.s3.amazonaws.com/php-5.3.0-alarms-0808141122.patch - Apache effectively seems to resets the signals after MINIT, so original handlers are now saved in RINIT in the first request of the process. - Removed some unneeded blocks/unblocks. -

Re: [PHP-DEV] [RFC] Zend Signal Handling

2008-08-13 Thread Arnaud Le Blanc
Hi, On Thursday 14 August 2008 04:19:38 Rasmus Lerdorf wrote: Arnaud Le Blanc wrote: - Apache effectively seems to resets the signals after MINIT, so original handlers are now saved in RINIT in the first request of the process. Did you verify this behaviour with Apache2 as well? I've only

Re: [PHP-DEV] include bug in 5.3

2008-08-10 Thread Arnaud Le Blanc
On Saturday 09 August 2008 23:16:30 Antony Dovgal wrote: On 09.08.2008 19:28, Dmitry Stogov wrote: The improved patch fixes all the issues I found during testing. However I wasn't able to test it on NETWARE and on Solaris with relative paths. Please test it as much as possible. I'm

Re: [PHP-DEV] clearstatcache change

2008-08-10 Thread Arnaud Le Blanc
On Sunday 10 August 2008 17:14:52 Pierre Joye wrote: hi Arnaud! On Sat, Aug 9, 2008 at 4:20 PM, Arnaud Le Blanc [EMAIL PROTECTED] wrote: Commited :) Do you have a windows dev box? It seems that something is broken on Windows. One reproduce case is ext\standard\tests\file\copy_variation4

Re: [PHP-DEV] clearstatcache change

2008-08-10 Thread Arnaud Le Blanc
On Sunday 10 August 2008 17:46:20 Arnaud Le Blanc wrote: On Sunday 10 August 2008 17:14:52 Pierre Joye wrote: hi Arnaud! On Sat, Aug 9, 2008 at 4:20 PM, Arnaud Le Blanc [EMAIL PROTECTED] wrote: Commited :) Do you have a windows dev box? It seems that something is broken on Windows

Re: [PHP-DEV] clearstatcache change

2008-08-09 Thread Arnaud Le Blanc
On Thursday 07 August 2008 11:33:02 Arnaud Le Blanc wrote: On Thursday 07 August 2008 01:50:06 Johannes Schlüter wrote: On Wed, 2008-08-06 at 21:00 +0200, Arnaud Le Blanc wrote: btw. I just noticed chroot() calls this realpath_cache_clean()..intentional? I'd assume that, as /foo

Re: [PHP-DEV] [RFC] Zend Signal Handling

2008-08-09 Thread Arnaud Le Blanc
Hi, As Lucas said the patch seems ready now, could someone please review the patch for inclusion ? http://wiki.php.net/rfc/zendsignals Changes that have been made: - The patch has been ported to HEAD - The patch now supports multithreaded environments, and fixes many problems on non-windows

Re: [PHP-DEV] include bug in 5.3

2008-08-08 Thread Arnaud Le Blanc
7, 2008 at 22:37, Arnaud Le Blanc [EMAIL PROTECTED] wrote: virtual_file_ex() assumes that realpath() returns NULL when the file does not exists. But BSD's realpath() will not return NULL if all components *but the last* exist. So realpath(/foo/bar) will return /foo/bar even if bar does

Re: [PHP-DEV] clearstatcache change

2008-08-07 Thread Arnaud Le Blanc
On Thursday 07 August 2008 01:50:06 Johannes Schlüter wrote: On Wed, 2008-08-06 at 21:00 +0200, Arnaud Le Blanc wrote: btw. I just noticed chroot() calls this realpath_cache_clean()..intentional? I'd assume that, as /foo inside a chroot is different from /foo outside... Also some

[PHP-DEV] PCRE and recursion: NO_RECURSE flag

2008-08-07 Thread Arnaud Le Blanc
Hi, PCRE can be highly recursive [1] and this can cause segmentation faults [2]. This is a known problem and the pcre ini settings avoids the segfaults, but the execution of the expression will fail anyway. PCRE has a NO_RECURSE flag which makes the match() internal function no recursive and

Re: [PHP-DEV] PCRE and recursion: NO_RECURSE flag

2008-08-07 Thread Arnaud Le Blanc
to match large amounts of data, just increase the stack size. ulimit is your friend :) Nuno - Original Message - From: Arnaud Le Blanc [EMAIL PROTECTED] To: internals@lists.php.net Sent: Thursday, August 07, 2008 1:24 PM Subject: [PHP-DEV] PCRE and recursion: NO_RECURSE flag Hi

[PHP-DEV] Re: [PHP-CVS] Re: cvs: php-src /ext/pcntl EXPERIMENTAL

2008-08-07 Thread Arnaud Le Blanc
Hi, On Thursday 07 August 2008 16:48:30 Johannes Schlüter wrote: Hi, On Thu, 2008-08-07 at 13:07 +, Antony Dovgal wrote: tony2001Thu Aug 7 13:07:07 2008 UTC Removed files: /php-src/ext/pcntl EXPERIMENTAL Log: remove EXPERIMENTAL flag The EXTENSIONS

Re: [PHP-DEV] Re: [PHP-CVS] Re: cvs: php-src /ext/pcntl EXPERIMENTAL

2008-08-07 Thread Arnaud Le Blanc
On Thursday 07 August 2008 17:01:52 Lukas Kahwe Smith wrote: On 07.08.2008, at 16:59, Arnaud Le Blanc wrote: Hi, On Thursday 07 August 2008 16:48:30 Johannes Schlüter wrote: Hi, On Thu, 2008-08-07 at 13:07 +, Antony Dovgal wrote: tony2001 Thu Aug 7 13:07:07 2008 UTC

Re: [PHP-DEV] include bug in 5.3

2008-08-07 Thread Arnaud Le Blanc
On Thursday 07 August 2008 21:52:37 Rasmus Lerdorf wrote: Felipe Pena wrote: Em Qui, 2008-08-07 às 20:55 +0200, Hannes Magnusson escreveu: On Thu, Aug 7, 2008 at 20:20, Rasmus Lerdorf[EMAIL PROTECTED] wrote: Christian Stocker wrote: Hi Since quite some time (weeks), I have this very

Re: [PHP-DEV] clearstatcache change

2008-08-06 Thread Arnaud Le Blanc
Hi, On Wednesday 06 August 2008 18:18:49 Jani Taskinen wrote: Rasmus Lerdorf wrote: I think we either need to make clearstatcache() not affect the realpath cache, or we should add an optional argument to it to specify whether or not the realpath cache should be cleared as well. See this:

Re: [PHP-DEV] clearstatcache change

2008-08-06 Thread Arnaud Le Blanc
On Wednesday 06 August 2008 19:56:58 Arnaud Le Blanc wrote: Hi, On Wednesday 06 August 2008 18:18:49 Jani Taskinen wrote: Rasmus Lerdorf wrote: I think we either need to make clearstatcache() not affect the realpath cache, or we should add an optional argument to it to specify whether

Re: [PHP-DEV] [RFC] Zend Signal Handling

2008-08-05 Thread Arnaud Le Blanc
Votre message: Greetings! On 8/3/08 9:37 PM, Arnaud LB [EMAIL PROTECTED] wrote: If sigaction is not available Zend Signal Handling will not be enabled, so it will not be enabled on Windows (I assume sigaction is not available on Windows, it is ?). For pthreads and sigprocmask,

Re: [PHP-DEV] [RFC] Zend Signal Handling

2008-08-05 Thread Arnaud Le Blanc
On Tuesday 05 August 2008 12:28:19 Lucas Nealan wrote: On 8/4/08 11:51 PM, Arnaud Le Blanc [EMAIL PROTECTED] wrote: global_sigmask is initialized using sigfillset(), so it contains _all_ signals (except SIGSEGV, etc because non-blockable or not safe to block) and there is no need to add

  1   2   >