xref: /PHP-8.0/ext/sysvshm/tests/bug72858.phpt (revision d1764ca3)
1--TEST--
2Bug #72858 shm_attach null dereference
3--SKIPIF--
4<?php
5if (!extension_loaded("sysvshm")){ print 'skip'; }
6if (4 < PHP_INT_SIZE) { print "skip 32-bit only"; }
7if (substr(PHP_OS, 0, 3) != "WIN") { print "skip windows only"; }
8?>
9--FILE--
10<?php
11
12$v1=100;
13$v2=0xffffffff / 4 + 0x1337;
14shm_attach($v1,$v2);
15
16?>
17--EXPECTF--
18Warning: shm_attach(): Failed for key 0x64: Not enough space in %s on line %d
19