about summary refs log tree commit diff
path: root/library/std/src/sys/unix/kernel_copy.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-06-15 09:50:48 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-06-15 10:39:04 +1000
commit57a7c8f577abd12ef4bb404448c42d794a76c690 (patch)
treefdc6420e8ef844954cc082356aa0a4da7b4cab09 /library/std/src/sys/unix/kernel_copy.rs
parent9d7295f0be2c90a98b6a7ce5f24ddef96dea10b7 (diff)
downloadrust-57a7c8f577abd12ef4bb404448c42d794a76c690.tar.gz
rust-57a7c8f577abd12ef4bb404448c42d794a76c690.zip
Fix bug in `mark_code_coverage_dead_code_cgus`.
The comment says "Find the smallest CGU that has exported symbols and
put the dead function stubs in that CGU". But the code sorts the CGUs by
size (smallest first) and then searches them in reverse order, which
means it will find the *largest* CGU that has exported symbols.

The erroneous code was introduced in #92142.

This commit changes it to use a simpler search, avoiding the sort, and
fixes the bug in the process.
Diffstat (limited to 'library/std/src/sys/unix/kernel_copy.rs')
0 files changed, 0 insertions, 0 deletions