aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorThomas Neumann <tneumann@users.sourceforge.net>2023-05-10 12:33:49 +0200
committerThomas Neumann <tneumann@users.sourceforge.net>2023-06-03 09:45:48 +0200
commit38e88d41f50d844f1404172657ef7e8372014ef6 (patch)
tree0342e12ad5285545b895465d0cc927b5bfc97189 /gcc/cp
parent5cf60b6ba111f4169305c7832b063b000e9ec36a (diff)
downloadgcc-38e88d41f50d844f1404172657ef7e8372014ef6.zip
gcc-38e88d41f50d844f1404172657ef7e8372014ef6.tar.gz
gcc-38e88d41f50d844f1404172657ef7e8372014ef6.tar.bz2
fix radix sort on 32bit platforms [PR109670]
The radix sort uses two buffers, a1 for input and a2 for output. After every digit the role of the two buffers is swapped. When terminating the sort early the code made sure the output was in a2. However, when we run out of bits, as can happen on 32bit platforms, the sorted result was in a1, as we had just swapped a1 and a2. This patch fixes the problem by unconditionally having a1 as output after every loop iteration. This bug manifested itself only on 32bit platforms and even then only in some circumstances, as it needs frames where a swap is required due to differences in the top-most byte, which is affected by ASLR. The new logic was validated by exhaustive search over 32bit input values. libgcc/ChangeLog: PR libgcc/109670 * unwind-dw2-fde.c: Fix radix sort buffer management.
Diffstat (limited to 'gcc/cp')
0 files changed, 0 insertions, 0 deletions