[php-src] PR #17286: Fix GH-17208: bug64539-status-json-encoding.phpt fail on 32-bits

From: Date: Fri, 27 Dec 2024 15:47:58 +0000
Subject: [php-src] PR #17286: Fix GH-17208: bug64539-status-json-encoding.phpt fail on 32-bits
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-30136@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/17286 Author: nielsdos The reason this breaks is because of a type mismatch. The following line uses fields of the timeval struct which are both 8 bytes on Alpine 32-bit, which results in a computed value of also 8 bytes: https://github.com/php/php-src/blob/b09ed9a0f25cda8c9eea9d140c01587cd50b4aa8/sapi/fpm/fpm/fpm_status.c#L611 However, it is passed to a format string which expects 4 bytes (unsigned long and thus the %lu format specifier is 4 bytes on Alpine 32-bit), resulting in argument corruption. Since the value is generally small, truncating to 4 bytes is sufficient to fix this.

« previous php.git-pulls (#30136) next »