[php-src] PR #12469: Fix bug #66150: SOAP WSDL cache race condition causes Segmentation Fault
| From: | nielsdos | Date: | Wed, 18 Oct 2023 20:36:22 +0000 |
| Subject: | [php-src] PR #12469: Fix bug #66150: SOAP WSDL cache race condition causes Segmentation Fault | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-23931@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/12469
Author: nielsdos
When we have two processes both trying to cache a WSDL, they might start writing the data to the
same temporary file, causing file corruption due to the race condition. Fix this by creating a
temporary file first, and then moving it to the final location. If moving fails then we know another
process finished caching first.
This also fixes #67617 as a consequence of its implementation.