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