#51076 [NEW]: race condition in shtool's mkdir -p implementation

2010-02-17 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: 
PHP version:  5.3SVN-2010-02-18 (SVN)
PHP Bug Type: Compile Failure
Bug description:  race condition in shtool's mkdir -p implementation

Description:

There's a race condition in shtool's mkdir -p (not yet fixed in the latest
version). At Debian we got hit by it when building with -jn.

I've just reported it to upstream, but since php uses its local (old) copy
I'm going to fix it here too.



-- 
Edit bug report at http://bugs.php.net/?id=51076edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51076r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51076r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51076r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51076r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51076r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51076r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51076r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51076r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51076r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51076r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51076r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51076r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51076r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51076r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51076r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51076r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51076r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51076r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51076r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51076r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51076r=mysqlcfg



#51022 [Com]: getservbyname_basic.phpt has incorrect description and misses a skip case

2010-02-12 Thread geissert at debian dot org
 ID:   51022
 Comment by:   geissert at debian dot org
 Reported By:  geissert at debian dot org
 Status:   Feedback
 Bug Type: Network related
 Operating System: debian sid
 PHP Version:  5.3.1
 New Comment:

Maybe because it says:
Test function getservby*port*() by *calling it more than or less than
its expected arguments*

The test does nothing of that :)

As to why /etc/services (and friends) wouldn't exist: because it is
only required for networking (not going to strongly push that change,
though.)


Previous Comments:


[2010-02-12 16:26:03] j...@php.net

Why would you not have /etc/services and how is the description wrong?
(patches are welcome..)



[2010-02-11 21:29:55] geissert at debian dot org

Description:

The description of
ext/standard/tests/general_functions/getservbyname_basic.phpt is
incorrect, as that's not really what the test is about.
Additionally, a SKIP section should be added to skip the test if
/etc/services does not exist.







-- 
Edit this bug report at http://bugs.php.net/?id=51022edit=1



#51008 [Com]: Zend/tests/bug45877.phpt fails

2010-02-12 Thread geissert at debian dot org
 ID:   51008
 Comment by:   geissert at debian dot org
 Reported By:  geissert at debian dot org
 Status:   Feedback
 Bug Type: *General Issues
 Operating System: debian sid
 PHP Version:  5.3.1
 New Comment:

It fails for me with 5.3.1 on i686, ia64, s390, alpha, powerpc, x86_64,
etc. Even on those running kfreebsd.
It also fails with the latest 5.3 svn on ia64 (haven't built it on any
other arch.)


Previous Comments:


[2010-02-12 17:02:47] j...@php.net

In what kind of environment does it fail? It works fine for me in both
32bit and 64bit systems. (using latest SVN checkout of course :)



[2010-02-11 01:54:21] geissert at debian dot org

Description:

The test fails 

Reproduce code:
---
?php
$keys = array(PHP_INT_MAX,
(string) PHP_INT_MAX,
(string) (-PHP_INT_MAX - 1),
-PHP_INT_MAX - 1,
(string) (PHP_INT_MAX + 1));

var_dump(array_fill_keys($keys, 1));
?


Expected result:

array(2) {
  [2147483647]=
  int(1)
  [-2147483648]=
  int(1)
  [2147483648]=
  int(1)
}


Actual result:
--
array(2) {
  [2147483647]=
  int(1)
  [-2147483648]=
  int(1)
}






-- 
Edit this bug report at http://bugs.php.net/?id=51008edit=1



#51023 [Com]: ext/filter/tests/046.phpt fails, does not detect int overflow

2010-02-12 Thread geissert at debian dot org
 ID:  51023
 Comment by:  geissert at debian dot org
 Reported By: geissert at debian dot org
 Status:  Feedback
 Bug Type:Filter related
 PHP Version: 5.3.1
 New Comment:

Still present.
What's the point of checking the code myself and describing the bug and
the fix if you are going to ask me to try the latest svn which contains
the same code on the file where the bug occurs?


Previous Comments:


[2010-02-12 16:13:42] j...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/





[2010-02-11 23:31:02] geissert at debian dot org

Description:

The filter fails to detect an integer overflow and passes the
FILTER_VALIDATE_INT test. The problem is caused because
php_filter_parse_int uses a long to detect the overflow, which of course
doesn't have the same size of an integer.

This can be fixed by making ctx_value an integer in both
php_filter_parse_int and php_filter_int (and for correctness, not
setting Z_TYPE_P(value) to IS_LONG).


Reproduce code:
---
// the current test:
$s = sprintf(%d, PHP_INT_MAX);
var_dump(is_long(filter_var($s, FILTER_VALIDATE_INT)));

$s = sprintf(%.0f, PHP_INT_MAX+1);
var_dump(filter_var($s, FILTER_VALIDATE_INT));

$s = sprintf(%d, -PHP_INT_MAX);
var_dump(is_long(filter_var($s, FILTER_VALIDATE_INT)));

Expected result:

bool(true)
bool(false)
bool(true)


Actual result:
--
bool(true)
int(-2147483648)
bool(true)





-- 
Edit this bug report at http://bugs.php.net/?id=51023edit=1



#51003 [Com]: unaligned memory access in ext/hash/hash_tiger.c

2010-02-12 Thread geissert at debian dot org
 ID:   51003
 Comment by:   geissert at debian dot org
 Reported By:  geissert at debian dot org
 Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: linux ia64
 PHP Version:  5.3.1
 New Comment:

Still present


Previous Comments:


[2010-02-12 17:14:18] j...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/





[2010-02-10 21:03:57] geissert at debian dot org

Description:

There's an unaligned memory access on PHP_TIGERUpdate():

tiger_compress(context-passes, ((const php_hash_uint64 *)
context-buffer), context-state);

Failed test ext/hash/tests/hash_file_basic1.phpt

Actual result:
--
*** Testing hash_file() : basic functionality ***
adler32: ff87222e
crc32: 61664d33
gost: d9e65f0c0c2ef944e4f8a01f4a46365c4f33a2853756878182a7f03e1490a4cd
haval128,3: 8bb81269aca8b7f87829020d76a4e841
md2: 70f791c0d8fa9edd7d08e32fcba8c354
md4: a9d034b16bb290c57a645afd6f14cd3b
md5: 704bf818448f5bbb94061332d2c889aa
ripemd128: d02a5f320a11c54c7d51f933b0bd8471
ripemd160: 3ff296ca6314313af3ed0437c8fc0ebbd3242d3b
ripemd256:
0edd779587c11cf3278b264251eb37529832fb207121cd45dd95002e48a8
ripemd320:
bf162fa2ff20491b3016c5d8190f8ee47d7dcda8c38eaf6779349a243a029d275eec9adf16ec1b35
sha1: 8529b266611e3bd0d208fd9614653c2a8f23d0fe
sha256:
a0f5702fa5d3670b80033d668e8732b70550392abb53841355447f8bb0f72245
sha384:
a35d875ed96d94b6452acad910f97978200faa2398d8a0e6b9cffa33704c3809e3d2e5b0d63700d8f32a0716e7d2d528
sha512:
1f42adaf938fbf136e381b164bae5f984c7f9fe60c82728bd889c14f187c7d63e81a0305a1731c7e0a8f3ed9fd2ec92a3833a93502bdf269532601f0b8e2bab0
snefru:
d414b2345d3e7fa1a31c044cf334bfc1fec24d89e464411998d579d24663895f
Bus error (core dumped)





-- 
Edit this bug report at http://bugs.php.net/?id=51003edit=1



#50999 [Com]: unaligned memory access in Zend/zend_API.c

2010-02-12 Thread geissert at debian dot org
 ID:   50999
 Comment by:   geissert at debian dot org
 Reported By:  geissert at debian dot org
 Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: linux ia64
 PHP Version:  5.3.1
 New Comment:

Still present


Previous Comments:


[2010-02-12 17:16:18] j...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/





[2010-02-10 20:59:26] geissert at debian dot org

Failed test: ext/dba/tests/dba_cdb_read.phpt log:
 EXPECTED OUTPUT
database handler: cdb
7NNN
=1234
#1122
?1212314
#1212314
=1231324
 ACTUAL OUTPUT
database handler: cdb
7NNN
=1234
#1122
?1212314
#1212314
=Bus error (core dumped)
 FAILED



[2010-02-10 19:12:28] geissert at debian dot org

Description:

There's an unaligned memory access on zend_parse_arg_impl():

*p = Z_LVAL_PP(arg);







-- 
Edit this bug report at http://bugs.php.net/?id=50999edit=1



#50998 [Com]: unaligned memory access in hash_tiger.c

2010-02-12 Thread geissert at debian dot org
 ID:   50998
 Comment by:   geissert at debian dot org
 Reported By:  geissert at debian dot org
 Status:   Feedback
 Bug Type: hash related
 Operating System: linux ia64
 PHP Version:  5.3.1
 New Comment:

Still present...


Previous Comments:


[2010-02-12 17:16:46] j...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/





[2010-02-10 21:06:30] geissert at debian dot org

Failed test: ext/hash/tests/mhash_001.phpt

Output:
MHASH_MD5
ok

MHASH_SHA1
ok

MHASH_HAVAL256
ok

MHASH_HAVAL192
ok

MHASH_HAVAL224
ok

MHASH_HAVAL160
ok

MHASH_RIPEMD160
ok

MHASH_GOST
ok

Bus error (core dumped)



[2010-02-10 19:06:50] geissert at debian dot org

Description:

ext/hash/hash_tiger.c's TigerFinalize makes an unaligned memory access
at:

tiger_compress(context-passes, ((php_hash_uint64 *)
context-buffer), context-state);







-- 
Edit this bug report at http://bugs.php.net/?id=50998edit=1



#51000 [Com]: unaligned memory access in ext/hash/hash_tiger.c

2010-02-12 Thread geissert at debian dot org
 ID:   51000
 Comment by:   geissert at debian dot org
 Reported By:  geissert at debian dot org
 Status:   Feedback
 Bug Type: hash related
 Operating System: linux ia64
 PHP Version:  5.3.1
 New Comment:

Re-checking this one, I don't see how that line would lead to an
unaligned memory access, so I probably just copied the wrong line. If
that's so, this is a duplicate of 51003.
Sorry for the noise.


Previous Comments:


[2010-02-12 17:15:46] j...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Sorry, wrong branch in previous post. :)



[2010-02-10 19:24:03] geissert at debian dot org

Description:

There's an unaligned memory access on PHP_TIGERUpdate():

context-passed += 512;







-- 
Edit this bug report at http://bugs.php.net/?id=51000edit=1



#51031 [NEW]: strtolower.phpt fails

2010-02-12 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: Debian GNU/Linux ia64
PHP version:  5.3SVN-2010-02-12 (snap)
PHP Bug Type: Strings related
Bug description:  strtolower.phpt fails

Description:

The test fails with the latest snapshot, 5.3.1 worked fine

Reproduce code:
---
echo *** Testing strtolower() with all 256 chars ***\n;
for ($i=0; $i=255; $i++){
  $char = chr($i);
  print(bin2hex($char)). = .(bin2hex(strtolower($char))).\n;
}

Expected result:

*** Testing strtolower() with all 256 chars ***
00 = 00
01 = 01
02 = 02
03 = 03
04 = 04
05 = 05
06 = 06
07 = 07
08 = 08
09 = 09
0a = 0a
0b = 0b
0c = 0c
0d = 0d
0e = 0e
0f = 0f
...
bf = bf
c0 = c0
c1 = c1
c2 = c2
c3 = c3
c4 = c4
c5 = c5
c6 = c6
c7 = c7
c8 = c8
c9 = c9
ca = ca
cb = cb
cc = cc
cd = cd
ce = ce
cf = cf
d0 = d0
d1 = d1
...


Actual result:
--
*** Testing strtolower() with all 256 chars ***
00 = 00
01 = 01
02 = 02
03 = 03
04 = 04
05 = 05
06 = 06
07 = 07
08 = 08
09 = 09
0a = 0a
0b = 0b
0c = 0c
0d = 0d
0e = 0e
0f = 0f
...
bf = bf  // error:
c0 = e0
c1 = e1
c2 = e2
c3 = e3
c4 = e4
c5 = e5
c6 = e6
c7 = e7
c8 = e8
c9 = e9
ca = ea
cb = eb
cc = ec
cd = ed
ce = ee
cf = ef
d0 = f0
d1 = f1
d2 = f2
d3 = f3
d4 = f4
d5 = f5
d6 = f6
d7 = d7
d8 = f8
d9 = f9
da = fa
db = fb
dc = fc
dd = fd
de = fe
df = df
e0 = e0 //the rest is fine
...

-- 
Edit bug report at http://bugs.php.net/?id=51031edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51031r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51031r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51031r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51031r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51031r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51031r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51031r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51031r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51031r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51031r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51031r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51031r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51031r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51031r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51031r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51031r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51031r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51031r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51031r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51031r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51031r=mysqlcfg



#51031 [Com]: strtolower.phpt fails

2010-02-12 Thread geissert at debian dot org
 ID:   51031
 Comment by:   geissert at debian dot org
 Reported By:  geissert at debian dot org
 Status:   Open
 Bug Type: Strings related
 Operating System: Debian GNU/Linux ia64
 PHP Version:  5.3SVN-2010-02-12 (snap)
 New Comment:

the test sets LC_ALL to en-US.UTF-8, but playing a bit more with it if
I set LANG=C (or to en_US.UTF-8) before calling php it works. If, on the
other hand, I set LANG to en_US it fails (this is the case under which I
found the bug).

Somehow LANG is being prioritised over LC_ALL.


Previous Comments:


[2010-02-12 20:31:03] ras...@php.net

LOCALE?

Ok for me on 64-bit Debian with latest 5.3.3-svn



[2010-02-12 20:28:33] geissert at debian dot org

Description:

The test fails with the latest snapshot, 5.3.1 worked fine

Reproduce code:
---
echo *** Testing strtolower() with all 256 chars ***\n;
for ($i=0; $i=255; $i++){
  $char = chr($i);
  print(bin2hex($char)). = .(bin2hex(strtolower($char))).\n;
}

Expected result:

*** Testing strtolower() with all 256 chars ***
00 = 00
01 = 01
02 = 02
03 = 03
04 = 04
05 = 05
06 = 06
07 = 07
08 = 08
09 = 09
0a = 0a
0b = 0b
0c = 0c
0d = 0d
0e = 0e
0f = 0f
...
bf = bf
c0 = c0
c1 = c1
c2 = c2
c3 = c3
c4 = c4
c5 = c5
c6 = c6
c7 = c7
c8 = c8
c9 = c9
ca = ca
cb = cb
cc = cc
cd = cd
ce = ce
cf = cf
d0 = d0
d1 = d1
...


Actual result:
--
*** Testing strtolower() with all 256 chars ***
00 = 00
01 = 01
02 = 02
03 = 03
04 = 04
05 = 05
06 = 06
07 = 07
08 = 08
09 = 09
0a = 0a
0b = 0b
0c = 0c
0d = 0d
0e = 0e
0f = 0f
...
bf = bf  // error:
c0 = e0
c1 = e1
c2 = e2
c3 = e3
c4 = e4
c5 = e5
c6 = e6
c7 = e7
c8 = e8
c9 = e9
ca = ea
cb = eb
cc = ec
cd = ed
ce = ee
cf = ef
d0 = f0
d1 = f1
d2 = f2
d3 = f3
d4 = f4
d5 = f5
d6 = f6
d7 = d7
d8 = f8
d9 = f9
da = fa
db = fb
dc = fc
dd = fd
de = fe
df = df
e0 = e0 //the rest is fine
...





-- 
Edit this bug report at http://bugs.php.net/?id=51031edit=1



#51031 [Com]: strtolower.phpt fails

2010-02-12 Thread geissert at debian dot org
 ID:   51031
 Comment by:   geissert at debian dot org
 Reported By:  geissert at debian dot org
 Status:   Open
 Bug Type: Strings related
 Operating System: Debian GNU/Linux ia64
 PHP Version:  5.3SVN-2010-02-12 (snap)
 New Comment:

Right, got it:

--SKIPIF--
...
  if (!setlocale(LC_ALL, 'en_US.UTF-8', 'en')) {
...

while the test itself does:

  setlocale(LC_ALL, 'en-US.UTF-8');

it should use an underscore instead.


Previous Comments:


[2010-02-12 21:01:58] ras...@php.net

There is no magic here.  All we are doing is calling the low-level 
tolower() function.  I bet you can recreate the same thing with this:

#include stdio.h
#include ctype.h

void main(void) {
  int ch;
 
  for(ch=0; ch256; ch++) {
printf(%x: %x\n,ch,tolower(ch));
  } 
}




[2010-02-12 20:48:30] geissert at debian dot org

the test sets LC_ALL to en-US.UTF-8, but playing a bit more with it if
I set LANG=C (or to en_US.UTF-8) before calling php it works. If, on the
other hand, I set LANG to en_US it fails (this is the case under which I
found the bug).

Somehow LANG is being prioritised over LC_ALL.



[2010-02-12 20:31:03] ras...@php.net

LOCALE?

Ok for me on 64-bit Debian with latest 5.3.3-svn



[2010-02-12 20:28:33] geissert at debian dot org

Description:

The test fails with the latest snapshot, 5.3.1 worked fine

Reproduce code:
---
echo *** Testing strtolower() with all 256 chars ***\n;
for ($i=0; $i=255; $i++){
  $char = chr($i);
  print(bin2hex($char)). = .(bin2hex(strtolower($char))).\n;
}

Expected result:

*** Testing strtolower() with all 256 chars ***
00 = 00
01 = 01
02 = 02
03 = 03
04 = 04
05 = 05
06 = 06
07 = 07
08 = 08
09 = 09
0a = 0a
0b = 0b
0c = 0c
0d = 0d
0e = 0e
0f = 0f
...
bf = bf
c0 = c0
c1 = c1
c2 = c2
c3 = c3
c4 = c4
c5 = c5
c6 = c6
c7 = c7
c8 = c8
c9 = c9
ca = ca
cb = cb
cc = cc
cd = cd
ce = ce
cf = cf
d0 = d0
d1 = d1
...


Actual result:
--
*** Testing strtolower() with all 256 chars ***
00 = 00
01 = 01
02 = 02
03 = 03
04 = 04
05 = 05
06 = 06
07 = 07
08 = 08
09 = 09
0a = 0a
0b = 0b
0c = 0c
0d = 0d
0e = 0e
0f = 0f
...
bf = bf  // error:
c0 = e0
c1 = e1
c2 = e2
c3 = e3
c4 = e4
c5 = e5
c6 = e6
c7 = e7
c8 = e8
c9 = e9
ca = ea
cb = eb
cc = ec
cd = ed
ce = ee
cf = ef
d0 = f0
d1 = f1
d2 = f2
d3 = f3
d4 = f4
d5 = f5
d6 = f6
d7 = d7
d8 = f8
d9 = f9
da = fa
db = fb
dc = fc
dd = fd
de = fe
df = df
e0 = e0 //the rest is fine
...





-- 
Edit this bug report at http://bugs.php.net/?id=51031edit=1



#51032 [NEW]: bug42718.phpt fails

2010-02-12 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: Debian GNU/Linux ia64
PHP version:  5.3SVN-2010-02-12 (snap)
PHP Bug Type: Filter related
Bug description:  bug42718.phpt fails

Description:

The test fails now, while it does pass with 5.3.1

Expected result:

unsafe_raw
4
bool(true)
1


Actual result:
--
unsafe_raw
4
bool(true)
1\000


-- 
Edit bug report at http://bugs.php.net/?id=51032edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51032r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51032r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51032r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51032r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51032r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51032r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51032r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51032r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51032r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51032r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51032r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51032r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51032r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51032r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51032r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51032r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51032r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51032r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51032r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51032r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51032r=mysqlcfg



#51031 [Com]: strtolower.phpt fails

2010-02-12 Thread geissert at debian dot org
 ID:   51031
 Comment by:   geissert at debian dot org
 Reported By:  geissert at debian dot org
 Status:   Open
 Bug Type: Strings related
 Operating System: Debian GNU/Linux ia64
 PHP Version:  5.3SVN-2010-02-12 (snap)
 New Comment:

Ok, I just created it. One question: what exactly is the magic to close
the bugs from the commit messages? just \(bug #\d+\)?


Previous Comments:


[2010-02-12 21:17:34] ras...@php.net

Could I encourage you to get an svn account and commit some of these 
trivial fixes yourself?  See http://www.php.net/svn.php and click on 
the get your own account link on the left there.



[2010-02-12 21:08:34] geissert at debian dot org

Right, got it:

--SKIPIF--
...
  if (!setlocale(LC_ALL, 'en_US.UTF-8', 'en')) {
...

while the test itself does:

  setlocale(LC_ALL, 'en-US.UTF-8');

it should use an underscore instead.



[2010-02-12 21:01:58] ras...@php.net

There is no magic here.  All we are doing is calling the low-level 
tolower() function.  I bet you can recreate the same thing with this:

#include stdio.h
#include ctype.h

void main(void) {
  int ch;
 
  for(ch=0; ch256; ch++) {
printf(%x: %x\n,ch,tolower(ch));
  } 
}




[2010-02-12 20:48:30] geissert at debian dot org

the test sets LC_ALL to en-US.UTF-8, but playing a bit more with it if
I set LANG=C (or to en_US.UTF-8) before calling php it works. If, on the
other hand, I set LANG to en_US it fails (this is the case under which I
found the bug).

Somehow LANG is being prioritised over LC_ALL.



[2010-02-12 20:31:03] ras...@php.net

LOCALE?

Ok for me on 64-bit Debian with latest 5.3.3-svn



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
http://bugs.php.net/51031

-- 
Edit this bug report at http://bugs.php.net/?id=51031edit=1



#51022 [NEW]: getservbyname_basic.phpt has incorrect description and misses a skip case

2010-02-11 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: debian sid
PHP version:  5.3.1
PHP Bug Type: Network related
Bug description:  getservbyname_basic.phpt has incorrect description and misses 
a skip case

Description:

The description of
ext/standard/tests/general_functions/getservbyname_basic.phpt is incorrect,
as that's not really what the test is about.
Additionally, a SKIP section should be added to skip the test if
/etc/services does not exist.



-- 
Edit bug report at http://bugs.php.net/?id=51022edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51022r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51022r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51022r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51022r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51022r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51022r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51022r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51022r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51022r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51022r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51022r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51022r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51022r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51022r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51022r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51022r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51022r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51022r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51022r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51022r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51022r=mysqlcfg



#51023 [NEW]: ext/filter/tests/046.phpt fails, does not detect int overflow

2010-02-11 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: 
PHP version:  5.3.1
PHP Bug Type: Filter related
Bug description:  ext/filter/tests/046.phpt fails, does not detect int overflow

Description:

The filter fails to detect an integer overflow and passes the
FILTER_VALIDATE_INT test. The problem is caused because
php_filter_parse_int uses a long to detect the overflow, which of course
doesn't have the same size of an integer.

This can be fixed by making ctx_value an integer in both
php_filter_parse_int and php_filter_int (and for correctness, not setting
Z_TYPE_P(value) to IS_LONG).


Reproduce code:
---
// the current test:
$s = sprintf(%d, PHP_INT_MAX);
var_dump(is_long(filter_var($s, FILTER_VALIDATE_INT)));

$s = sprintf(%.0f, PHP_INT_MAX+1);
var_dump(filter_var($s, FILTER_VALIDATE_INT));

$s = sprintf(%d, -PHP_INT_MAX);
var_dump(is_long(filter_var($s, FILTER_VALIDATE_INT)));

Expected result:

bool(true)
bool(false)
bool(true)


Actual result:
--
bool(true)
int(-2147483648)
bool(true)

-- 
Edit bug report at http://bugs.php.net/?id=51023edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51023r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51023r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51023r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51023r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51023r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51023r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51023r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51023r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51023r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51023r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51023r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51023r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51023r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51023r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51023r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51023r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51023r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51023r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51023r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51023r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51023r=mysqlcfg



#50998 [NEW]: unaligned memory access in hash_tiger.c

2010-02-10 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: linux ia64
PHP version:  5.3.1
PHP Bug Type: hash related
Bug description:  unaligned memory access in hash_tiger.c

Description:

ext/hash/hash_tiger.c's TigerFinalize makes an unaligned memory access
at:

tiger_compress(context-passes, ((php_hash_uint64 *)
context-buffer), context-state);



-- 
Edit bug report at http://bugs.php.net/?id=50998edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50998r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50998r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50998r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50998r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50998r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50998r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=50998r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=50998r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=50998r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=50998r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=50998r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=50998r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=50998r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50998r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=50998r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=50998r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=50998r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=50998r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=50998r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=50998r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=50998r=mysqlcfg



#50999 [NEW]: unaligned memory access in Zend/zend_API.c

2010-02-10 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: linux ia64
PHP version:  5.3.1
PHP Bug Type: Reproducible crash
Bug description:  unaligned memory access in Zend/zend_API.c

Description:

There's an unaligned memory access on zend_parse_arg_impl():

*p = Z_LVAL_PP(arg);



-- 
Edit bug report at http://bugs.php.net/?id=50999edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50999r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50999r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50999r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50999r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50999r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50999r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=50999r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=50999r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=50999r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=50999r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=50999r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=50999r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=50999r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50999r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=50999r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=50999r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=50999r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=50999r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=50999r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=50999r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=50999r=mysqlcfg



#51000 [NEW]: unaligned memory access in ext/hash/hash_tiger.c

2010-02-10 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: linux ia64
PHP version:  5.3.1
PHP Bug Type: Reproducible crash
Bug description:  unaligned memory access in ext/hash/hash_tiger.c

Description:

There's an unaligned memory access on PHP_TIGERUpdate():

context-passed += 512;



-- 
Edit bug report at http://bugs.php.net/?id=51000edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51000r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51000r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51000r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51000r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51000r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51000r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51000r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51000r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51000r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51000r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51000r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51000r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51000r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51000r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51000r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51000r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51000r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51000r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51000r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51000r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51000r=mysqlcfg



#50987 [Com]: unaligned memory access in phar.c

2010-02-10 Thread geissert at debian dot org
 ID:   50987
 Comment by:   geissert at debian dot org
 Reported By:  geissert at debian dot org
 Status:   Feedback
 Bug Type: PHAR related
 Operating System: linux ia64
 PHP Version:  5.3.1
 New Comment:

The phar one was found while building the extension itself (the call to
php in ext/phar/Makefile.frag to generate phar.php.)

There are probably more, but still have to process them. In the
meanwhile, here's another (found while unpacking pear):

@@ -512,7 +512,7 @@ void phar_entry_remove(phar_entry_data *
(buffer) += 2
 #else
 # define PHAR_GET_32(buffer, var) \
-   var = *(php_uint32*)(buffer); \
+   memcpy(var, buffer, sizeof(var)); \
buffer += 4
 # define PHAR_GET_16(buffer, var) \
var = *(php_uint16*)(buffer); \

As for CFLAGS: -O2 -Wall -fsigned-char -fno-strict-aliasing -g
-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security

Should be easy for you to find them by running the test suite under
prctl --unaligned=signal (all the phar tests will fail.) That's how I
found them all (I can provide the name of the tests that failed in a
moment, I'm rebuilding with the patches I already provided.)


Previous Comments:


[2010-02-10 20:05:21] paj...@php.net

hi,

Can you provide test cases for these crashes please? As well as your
settings (CFLAGSco) as I can't see crashes on IA64 here (or other 64bit
platforms). Same applies for your other reports :)

Thanks for your feedback!



[2010-02-10 07:27:23] geissert at debian dot org

Description:

There's an unaligned memory access in ext/phar/phar.c's phar_set_32
function.

The following patch fixes it:

--- php.orig/ext/phar/phar.c
+++ php/ext/phar/phar.c
@@ -2491,7 +2491,7 @@ static inline void phar_set_32(char *buf
*((buffer) + 1) = (unsigned char) (((var)  8)  0xFF);
*((buffer) + 0) = (unsigned char) ((var)  0xFF);
 #else
-   *(php_uint32 *)(buffer) = (php_uint32)(var);
+   memcpy(buffer, var, sizeof(var));
 #endif
 } /* }}} */







-- 
Edit this bug report at http://bugs.php.net/?id=50987edit=1



#50999 [Com]: unaligned memory access in Zend/zend_API.c

2010-02-10 Thread geissert at debian dot org
 ID:   50999
 Comment by:   geissert at debian dot org
 Reported By:  geissert at debian dot org
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: linux ia64
 PHP Version:  5.3.1
 New Comment:

Failed test: ext/dba/tests/dba_cdb_read.phpt log:
 EXPECTED OUTPUT
database handler: cdb
7NNN
=1234
#1122
?1212314
#1212314
=1231324
 ACTUAL OUTPUT
database handler: cdb
7NNN
=1234
#1122
?1212314
#1212314
=Bus error (core dumped)
 FAILED


Previous Comments:


[2010-02-10 19:12:28] geissert at debian dot org

Description:

There's an unaligned memory access on zend_parse_arg_impl():

*p = Z_LVAL_PP(arg);







-- 
Edit this bug report at http://bugs.php.net/?id=50999edit=1



#51003 [NEW]: unaligned memory access in ext/hash/hash_tiger.c

2010-02-10 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: linux ia64
PHP version:  5.3.1
PHP Bug Type: Reproducible crash
Bug description:  unaligned memory access in ext/hash/hash_tiger.c

Description:

There's an unaligned memory access on PHP_TIGERUpdate():

tiger_compress(context-passes, ((const php_hash_uint64 *)
context-buffer), context-state);

Failed test ext/hash/tests/hash_file_basic1.phpt

Actual result:
--
*** Testing hash_file() : basic functionality ***
adler32: ff87222e
crc32: 61664d33
gost: d9e65f0c0c2ef944e4f8a01f4a46365c4f33a2853756878182a7f03e1490a4cd
haval128,3: 8bb81269aca8b7f87829020d76a4e841
md2: 70f791c0d8fa9edd7d08e32fcba8c354
md4: a9d034b16bb290c57a645afd6f14cd3b
md5: 704bf818448f5bbb94061332d2c889aa
ripemd128: d02a5f320a11c54c7d51f933b0bd8471
ripemd160: 3ff296ca6314313af3ed0437c8fc0ebbd3242d3b
ripemd256:
0edd779587c11cf3278b264251eb37529832fb207121cd45dd95002e48a8
ripemd320:
bf162fa2ff20491b3016c5d8190f8ee47d7dcda8c38eaf6779349a243a029d275eec9adf16ec1b35
sha1: 8529b266611e3bd0d208fd9614653c2a8f23d0fe
sha256: a0f5702fa5d3670b80033d668e8732b70550392abb53841355447f8bb0f72245
sha384:
a35d875ed96d94b6452acad910f97978200faa2398d8a0e6b9cffa33704c3809e3d2e5b0d63700d8f32a0716e7d2d528
sha512:
1f42adaf938fbf136e381b164bae5f984c7f9fe60c82728bd889c14f187c7d63e81a0305a1731c7e0a8f3ed9fd2ec92a3833a93502bdf269532601f0b8e2bab0
snefru: d414b2345d3e7fa1a31c044cf334bfc1fec24d89e464411998d579d24663895f
Bus error (core dumped)

-- 
Edit bug report at http://bugs.php.net/?id=51003edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51003r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51003r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51003r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51003r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51003r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51003r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51003r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51003r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51003r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51003r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51003r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51003r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51003r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51003r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51003r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51003r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51003r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51003r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51003r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51003r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51003r=mysqlcfg



#50998 [Com]: unaligned memory access in hash_tiger.c

2010-02-10 Thread geissert at debian dot org
 ID:   50998
 Comment by:   geissert at debian dot org
 Reported By:  geissert at debian dot org
 Status:   Open
 Bug Type: hash related
 Operating System: linux ia64
 PHP Version:  5.3.1
 New Comment:

Failed test: ext/hash/tests/mhash_001.phpt

Output:
MHASH_MD5
ok

MHASH_SHA1
ok

MHASH_HAVAL256
ok

MHASH_HAVAL192
ok

MHASH_HAVAL224
ok

MHASH_HAVAL160
ok

MHASH_RIPEMD160
ok

MHASH_GOST
ok

Bus error (core dumped)


Previous Comments:


[2010-02-10 19:06:50] geissert at debian dot org

Description:

ext/hash/hash_tiger.c's TigerFinalize makes an unaligned memory access
at:

tiger_compress(context-passes, ((php_hash_uint64 *)
context-buffer), context-state);







-- 
Edit this bug report at http://bugs.php.net/?id=50998edit=1



#51005 [NEW]: --without-sqlite3 should be --with-sqlite3

2010-02-10 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: 
PHP version:  5.3.1
PHP Bug Type: *Compile Issues
Bug description:  --without-sqlite3 should be --with-sqlite3

Description:

I just noticed sqlite3's config0.m4 has an inverted logic:

--without-sqlite3 defaults to yes, which instead of NOT including sqlite3
it _does_ include it (using the bundled copy).

--without-sqlite3=/foo also makes it include the extension, looking for
the headers under /foo

--without-sqlite3=no does not include it.

IOW: the option should be called --with-sqlite3, not --without-sqlite3



-- 
Edit bug report at http://bugs.php.net/?id=51005edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51005r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51005r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51005r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51005r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51005r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51005r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51005r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51005r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51005r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51005r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51005r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51005r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51005r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51005r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51005r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51005r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51005r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51005r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51005r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51005r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51005r=mysqlcfg



#51005 [Com]: --without-sqlite3 should be --with-sqlite3

2010-02-10 Thread geissert at debian dot org
 ID:  51005
 Comment by:  geissert at debian dot org
 Reported By: geissert at debian dot org
 Status:  Analyzed
 Bug Type:*Compile Issues
 PHP Version: 5.3.1
 New Comment:

Sorry for not being specific, I was talking about the description on
the m4 file:

PHP_ARG_WITH(sqlite3, whether to enable the SQLite3 extension,
[  --without-sqlite3[=DIR] Do not include SQLite3 support. DIR is the
prefix to
  SQLite3 installation directory.], yes)


Previous Comments:


[2010-02-10 22:32:35] ras...@php.net

The option is called --with-sqlite3.  That's how autoconf works.  You 
have --enable/--disable and --with/--without switches.  If the feature

is on by default then you use --disable/--without to turn it off.  If 
the feature is off by default, then it is the opposite.  Try it by 
using --with-sqlite3=/some/path

But yes, the yes/no responses are messed up when using these.  



[2010-02-10 22:09:56] geissert at debian dot org

Description:

I just noticed sqlite3's config0.m4 has an inverted logic:

--without-sqlite3 defaults to yes, which instead of NOT including
sqlite3 it _does_ include it (using the bundled copy).

--without-sqlite3=/foo also makes it include the extension, looking for
the headers under /foo

--without-sqlite3=no does not include it.

IOW: the option should be called --with-sqlite3, not --without-sqlite3







-- 
Edit this bug report at http://bugs.php.net/?id=51005edit=1



#51007 [NEW]: posix_uname{,_basic}.phpt are duplicates and lack handling of domainname

2010-02-10 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: debian
PHP version:  5.3.1
PHP Bug Type: POSIX related
Bug description:  posix_uname{,_basic}.phpt are duplicates and lack handling of 
domainname

Description:

Both tests test the same functionality and they both miss the case where
the domainname key may exist.

A simple workaround would be to unset($uname['domainname']) on _basic.phpt
and drop the other one.



-- 
Edit bug report at http://bugs.php.net/?id=51007edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51007r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51007r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51007r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51007r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51007r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51007r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51007r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51007r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51007r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51007r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51007r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51007r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51007r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51007r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51007r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51007r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51007r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51007r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51007r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51007r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51007r=mysqlcfg



#51008 [NEW]: Zend/tests/bug45877.phpt fails

2010-02-10 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: debian sid
PHP version:  5.3.1
PHP Bug Type: Unknown/Other Function
Bug description:  Zend/tests/bug45877.phpt fails

Description:

The test fails 

Reproduce code:
---
?php
$keys = array(PHP_INT_MAX,
(string) PHP_INT_MAX,
(string) (-PHP_INT_MAX - 1),
-PHP_INT_MAX - 1,
(string) (PHP_INT_MAX + 1));

var_dump(array_fill_keys($keys, 1));
?


Expected result:

array(2) {
  [2147483647]=
  int(1)
  [-2147483648]=
  int(1)
  [2147483648]=
  int(1)
}


Actual result:
--
array(2) {
  [2147483647]=
  int(1)
  [-2147483648]=
  int(1)
}


-- 
Edit bug report at http://bugs.php.net/?id=51008edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51008r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51008r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51008r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51008r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51008r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51008r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51008r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51008r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51008r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51008r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51008r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51008r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51008r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51008r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51008r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51008r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51008r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51008r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51008r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51008r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51008r=mysqlcfg



#50982 [NEW]: incorrect assumption of PAGE_SIZE size

2010-02-09 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: 
PHP version:  5.3.1
PHP Bug Type: *Compile Issues
Bug description:  incorrect assumption of PAGE_SIZE size

Description:

If sys/mman.h does not define PAGE_SIZE there's an incorrect assumption
that it is 4096. This can have multiple side effects.

At Debian we are going to use the following patch:
http://git.debian.org/?p=pkg-php/php.git;a=blob;f=debian/patches/page_size_fixes.patch;h=f24b732ff6349101e1cee560b581081ca74d717f;hb=HEAD

There's also a logical bug where PAGE_SIZE could not be defined at all but
still used, but I'm not addressing that one.



-- 
Edit bug report at http://bugs.php.net/?id=50982edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50982r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50982r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50982r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50982r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50982r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50982r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=50982r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=50982r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=50982r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=50982r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=50982r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=50982r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=50982r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50982r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=50982r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=50982r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=50982r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=50982r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=50982r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=50982r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=50982r=mysqlcfg



#50987 [NEW]: unaligned memory access in phar.c

2010-02-09 Thread geissert at debian dot org
From: geissert at debian dot org
Operating system: linux ia64
PHP version:  5.3.1
PHP Bug Type: PHAR related
Bug description:  unaligned memory access in phar.c

Description:

There's an unaligned memory access in ext/phar/phar.c's phar_set_32
function.

The following patch fixes it:

--- php.orig/ext/phar/phar.c
+++ php/ext/phar/phar.c
@@ -2491,7 +2491,7 @@ static inline void phar_set_32(char *buf
*((buffer) + 1) = (unsigned char) (((var)  8)  0xFF);
*((buffer) + 0) = (unsigned char) ((var)  0xFF);
 #else
-   *(php_uint32 *)(buffer) = (php_uint32)(var);
+   memcpy(buffer, var, sizeof(var));
 #endif
 } /* }}} */



-- 
Edit bug report at http://bugs.php.net/?id=50987edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50987r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50987r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50987r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50987r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50987r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50987r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=50987r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=50987r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=50987r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=50987r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=50987r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=50987r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=50987r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50987r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=50987r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=50987r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=50987r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=50987r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=50987r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=50987r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=50987r=mysqlcfg