|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-02-07 09:44 UTC] gmblar+php at gmail dot com
[2021-07-07 08:48 UTC] cmb@php.net
[2021-07-07 08:48 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2021-07-07 09:20 UTC] gmblar+php at gmail dot com
[2021-07-07 09:23 UTC] cmb@php.net
-Status: Feedback
+Status: Closed
[2021-07-07 09:23 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 18 17:00:02 2025 UTC |
Description: ------------ openssl_pkcs12_export_to_file crash with "Segmentation fault: 11" Code works without segfault if: * remove the line "$privateKey = new PrivateKey($privateKey);" * var_dump something after openssl_pkcs12_export_to_file Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x000000012b86af59 0x00000001001f0c25 in gc_zval_possible_root () (gdb) bt #0 0x00000001001f0c25 in gc_zval_possible_root () #1 0x00000001001e2046 in zend_hash_bucket_delete () #2 0x00000001001e20ac in zend_hash_graceful_reverse_destroy () #3 0x00000001001c8027 in shutdown_executor () #4 0x00000001001d6227 in zend_deactivate () #5 0x000000010017d045 in php_request_shutdown () #6 0x000000010025f7d7 in do_cli () #7 0x000000010025e354 in main () Test script: --------------- <?php class PrivateKey { public $data; public function __construct($data) { $this->data = $data; } public function __toString() { openssl_pkey_export($this->data, $output); return $output; } } $csr = openssl_csr_new([], $privateKey); $certificate = openssl_csr_sign($csr, NULL, $privateKey, 1); $privateKey = new PrivateKey($privateKey); openssl_pkcs12_export_to_file($certificate, '/tmp/test.p12', $privateKey, ''); # var_dump('bar'); Expected result: ---------------- Nothing Actual result: -------------- Segmentation fault: 11