Edit report at https://bugs.php.net/bug.php?id=60725&edit=1

 ID:                 60725
 Comment by:         idlesign at yandex dot ru
 Reported by:        a dot dobkin at drweb dot com
 Summary:            zend_parse_parameters(): Incorrect parsing of the
                     first parameter
 Status:             Bogus
 Type:               Bug
 Package:            Unknown/Other Function
 Operating System:   fedora core 16 x64
 PHP Version:        5.3.9
 Block user comment: N
 Private report:     N

 New Comment:

@anon,

Patient answer that was, thank you :) Crivens! Completely missed that "OS: 
fedora core 16 x64" thing. Sorry to bother.


Previous Comments:
------------------------------------------------------------------------
[2012-01-13 04:43:02] a dot dobkin at drweb dot com

Oh.. just missed it. thanks!

------------------------------------------------------------------------
[2012-01-12 14:33:22] anon at anon dot anon

@a.dobkin, @idlesign

x64 int is 4 bytes, long is 8 bytes. In the example zend_parse_parameters is 
being told to write 8 bytes into a 4 byte variable, and the address where the 
high 4 bytes would be if they existed happens to be (although this is platform 
specific and undefined) the address of the int string length. It's completely 
to be expected.

If you're telling zend_parse_parameters you're giving it a long (as in "sls") 
then actually give it one. I.e., "long p_long;".

------------------------------------------------------------------------
[2012-01-12 13:04:28] idlesign at yandex dot ru

@cataphract, 

Sorry, don't get you: from what do you deduce that that is a "platform specific 
undefined behavior"? This behaviour you can easily stumble upon after 5.3.6 if 
develop module. 

>From what I've seen that is a regression as it is, and those guys having first 
>param string alongside with, let's say long, wanting to rely on string lenght 
>param are screwed up after 5.3.6 since they got bloody 0 instead of actual 
>length.

------------------------------------------------------------------------
[2012-01-12 12:45:54] cataphr...@php.net

As felipe as said "l" is for "long". This bug tracker is not the place to 
explain platform specific undefined behavior.

------------------------------------------------------------------------
[2012-01-12 11:11:55] a dot dobkin at drweb dot com

Incorrect parsing first parameter when type_spec = "sls" (e.g.) 
zend_parse_parameter() return string length as 0, always. See example #1 and #2:

PHP Warning:  First parameter: 'first' and it len: 0 in Command line code on 
line 1

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=60725


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60725&edit=1

Reply via email to