Fix segfault for 1-qubit QUnit GetProbs()
5fa8e96 introduced a segmentation fault in QUnit::GetProbs()
(QrackSimulator.out_probs()
) in the specific case that the QUnit
instance has exactly 1 qubit. I estimate the severity of the vulnerability to be low: all tests so far have resulted in a "caught" segmentation fault rather than a silent one, likely because the first unsafe access to memory is always an attempt to write to memory address 0/NULL. The specific case of calling QUnit::GetProbs()
for an instance with just one qubit is likely also uncommon in user code. With that said, please update immediately!
(Thanks to @cosenal for catching this!)
Full Changelog:
unitaryfund/qrack@vm6502q.v9.12.34...vm6502q.v9.12.38
unitaryfund/pyqrack@v1.32.28...v1.32.29
v0.10.18...v0.10.19
sha1sum results:
fa3b19e8e0666a4409986a382eb55ff4f9ac6d39 pennylane_qrack-0.10.19-py3-none-macosx_13_0_x86_64.whl
0e848c7ff92ff4bf902aac4a6525733dcef9e026 pennylane_qrack-0.10.19-py3-none-macosx_14_0_arm64.whl
bb4038b78bdbd99c11d81bcf63490426afecc332 pennylane_qrack-0.10.19-py3-none-macosx_15_0_arm64.whl
661ef9feb5e3ee704edc1fb709752e6945a37e68 pennylane_qrack-0.10.19-py3-none-manylinux_2_31_x86_64.whl
e9ff4a0f3480df3778ccb63959b80e5a92e0fba0 pennylane_qrack-0.10.19-py3-none-manylinux_2_35_x86_64.whl
d4223c8e65ff9cf5699037596b718f52c66a5dae pennylane_qrack-0.10.19-py3-none-manylinux_2_39_x86_64.whl
283d7b7ca7ea7d070bf84f9611eee275ba671687 pennylane_qrack-0.10.19-py3-none-win_amd64.whl
ff014ee16eb69a1492a557be2204eb5e8eabf598 pennylane_qrack-0.10.19.tar.gz