Bug #81472 [NEW]: Cannot support large linux major/minor device number when read /proc/self/maps
| From: | lin dot a dot yang at intel dot com | Date: | Fri, 24 Sep 2021 06:14:40 +0000 |
| Subject: | Bug #81472 [NEW]: Cannot support large linux major/minor device number when read /proc/self/maps | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-236792@lists.php.net to get a copy of this message | ||
From: lin dot a dot yang at intel dot com
Operating system: linux
PHP version: master-Git-2021-09-24 (Git)
Package: *General Issues
Bug Type: Bug
Bug description:Cannot support large linux major/minor device number when read /proc/self/maps
Description:
------------
Latest linux kernel already uses a large number (12 bits for major
device, 20 bits for minor device).
https://github.com/torvalds/linux/blob/master/include/linux/kdev_t.h#L10-L11
The current code only supports previous standard (5 chars) when read
/proc/self/maps file during enable opcache.huge_code_pages, which means
8 bits for major and 8 bits for minor device.
https://github.com/php/php-src/blob/3cd5f2685ba87c1a5804799ef97580a5b38983b5/ext/opcache/ZendAccelerator.c#L3013
It will fail to find the text segment if device number is out of that
range. It can be easily fixed by increasing the device string size to 9
chars when do fscanf.
--
Edit bug report at https://bugs.php.net/bug.php?id=81472&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81472&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81472&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81472&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81472&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81472&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81472&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81472&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81472&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81472&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81472&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81472&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81472&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81472&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81472&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81472&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81472&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81472&r=mysqlcfg