Skip to content

CodeQL warnings and shared library debug

Compare
Choose a tag to compare
@WrathfulSpatula WrathfulSpatula released this 21 Nov 19:59
· 44 commits to main since this release

This patch fixes every previous CodeQL warning and an edge case in release()/Decompose()/Dispose() in the shared library.

The CodeQL warnings were purely "false positives." CodeQL wasn't wrong in principle, but it's not capable of detecting that manual bounds checking prevents bitLenInt (which is often an alias for an 8-bit integer) from getting stuck in infinite loops when iterating over vectors of qubit IDs, which could contain 64-bits worth of size_t capacity, but which can't possibly pass manual bounds checking with more entries than the capacity of bitLenInt. a3d9854 roundly prevents these warnings from ever becoming relevant at all, but it's in this release.

The edge case in the shared library likely couldn't be encountered in PyQrack at all, since it does not allow the assignment of arbitrary integer labels for qubit IDs. (They must be sequential.) However, the fix is still important to other potential uses of the Qrack shared library interface, downstream.

Full Changelog: vm6502q.v9.12.38...vm6502q.v9.12.39

sha1sum results:
4167f0cf8aa5bbbd13530036ed665dbd65bbfb56 libqrack-macosx_14_0_arm64.zip
31fc9e95ae085199014c124f3dbb14de299684c3 libqrack-macosx_15_0_arm64.zip
a77f78275add153f8be98d0d4277783e6d3948d5 libqrack-manylinux2014_x86_64.zip
c92166baf482af0f1a9a1a5f10d19986a87a8018 libqrack-manylinux_2_35_x86_64.zip
642dd6f3a6ba775b4c5515279fc46f0efb0f3141 libqrack-manylinux_2_39_x86_64.zip
4a63f841a154d56ac8d8e0439f20bbd07bf2ad11 libqrack-win-amd64.zip