xref: /PHP-7.4/ext/sysvshm/tests/bug72858.phpt (revision 782352c5)
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==DONE==
18--EXPECTF--
19Warning: shm_attach(): failed for key 0x64: Not enough space in %s on line %d
20==DONE==
21