rust/tests/coverage-map/status-quo/closure.cov-map
Zalathar 4690f97099 coverage: Fix an unstable-sort inconsistency in coverage spans
This code was calling `sort_unstable_by`, but failed to impose a total order on
the initial spans. That resulted in unpredictable handling of closure spans,
producing inconsistencies in the coverage maps and in user-visible coverage
reports.

This patch fixes the problem by always sorting closure spans before
otherwise-identical non-closure spans, and also switches to a stable sort in
case the ordering is still not total.
2023-09-18 21:28:56 +10:00

325 lines
14 KiB
Plaintext

Function name: closure::main
Raw bytes (170): 0x[01, 01, 17, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 05, 05, 5a, 01, 05, 18, 01, 08, 01, 0f, 0d, 03, 16, 0e, 06, 0a, 07, 10, 05, 13, 0d, 0b, 1a, 0e, 06, 0a, 0f, 10, 05, 0c, 16, 13, 16, 05, 0d, 18, 17, 19, 09, 01, 1e, 1b, 04, 09, 00, 29, 1f, 01, 09, 00, 2d, 23, 01, 09, 00, 24, 27, 05, 09, 00, 24, 2b, 02, 09, 00, 21, 2f, 04, 09, 00, 21, 33, 04, 09, 00, 28, 37, 09, 09, 00, 32, 3b, 04, 09, 00, 33, 3f, 07, 09, 00, 4b, 43, 08, 09, 00, 48, 47, 0a, 09, 00, 47, 4b, 08, 09, 00, 44, 4f, 0a, 08, 00, 10, 05, 00, 11, 04, 06, 5a, 04, 06, 00, 07, 57, 01, 05, 03, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 23
- expression 0 operands: lhs = Counter(0), rhs = Zero
- expression 1 operands: lhs = Counter(0), rhs = Zero
- expression 2 operands: lhs = Counter(0), rhs = Zero
- expression 3 operands: lhs = Counter(0), rhs = Zero
- expression 4 operands: lhs = Counter(0), rhs = Zero
- expression 5 operands: lhs = Counter(0), rhs = Zero
- expression 6 operands: lhs = Counter(0), rhs = Zero
- expression 7 operands: lhs = Counter(0), rhs = Zero
- expression 8 operands: lhs = Counter(0), rhs = Zero
- expression 9 operands: lhs = Counter(0), rhs = Zero
- expression 10 operands: lhs = Counter(0), rhs = Zero
- expression 11 operands: lhs = Counter(0), rhs = Zero
- expression 12 operands: lhs = Counter(0), rhs = Zero
- expression 13 operands: lhs = Counter(0), rhs = Zero
- expression 14 operands: lhs = Counter(0), rhs = Zero
- expression 15 operands: lhs = Counter(0), rhs = Zero
- expression 16 operands: lhs = Counter(0), rhs = Zero
- expression 17 operands: lhs = Counter(0), rhs = Zero
- expression 18 operands: lhs = Counter(0), rhs = Zero
- expression 19 operands: lhs = Counter(0), rhs = Zero
- expression 20 operands: lhs = Counter(0), rhs = Counter(1)
- expression 21 operands: lhs = Counter(1), rhs = Expression(22, Sub)
- expression 22 operands: lhs = Counter(0), rhs = Counter(1)
Number of file 0 mappings: 24
- Code(Counter(0)) at (prev + 8, 1) to (start + 15, 13)
- Code(Expression(0, Add)) at (prev + 22, 14) to (start + 6, 10)
= (c0 + Zero)
- Code(Expression(1, Add)) at (prev + 16, 5) to (start + 19, 13)
= (c0 + Zero)
- Code(Expression(2, Add)) at (prev + 26, 14) to (start + 6, 10)
= (c0 + Zero)
- Code(Expression(3, Add)) at (prev + 16, 5) to (start + 12, 22)
= (c0 + Zero)
- Code(Expression(4, Add)) at (prev + 22, 5) to (start + 13, 24)
= (c0 + Zero)
- Code(Expression(5, Add)) at (prev + 25, 9) to (start + 1, 30)
= (c0 + Zero)
- Code(Expression(6, Add)) at (prev + 4, 9) to (start + 0, 41)
= (c0 + Zero)
- Code(Expression(7, Add)) at (prev + 1, 9) to (start + 0, 45)
= (c0 + Zero)
- Code(Expression(8, Add)) at (prev + 1, 9) to (start + 0, 36)
= (c0 + Zero)
- Code(Expression(9, Add)) at (prev + 5, 9) to (start + 0, 36)
= (c0 + Zero)
- Code(Expression(10, Add)) at (prev + 2, 9) to (start + 0, 33)
= (c0 + Zero)
- Code(Expression(11, Add)) at (prev + 4, 9) to (start + 0, 33)
= (c0 + Zero)
- Code(Expression(12, Add)) at (prev + 4, 9) to (start + 0, 40)
= (c0 + Zero)
- Code(Expression(13, Add)) at (prev + 9, 9) to (start + 0, 50)
= (c0 + Zero)
- Code(Expression(14, Add)) at (prev + 4, 9) to (start + 0, 51)
= (c0 + Zero)
- Code(Expression(15, Add)) at (prev + 7, 9) to (start + 0, 75)
= (c0 + Zero)
- Code(Expression(16, Add)) at (prev + 8, 9) to (start + 0, 72)
= (c0 + Zero)
- Code(Expression(17, Add)) at (prev + 10, 9) to (start + 0, 71)
= (c0 + Zero)
- Code(Expression(18, Add)) at (prev + 8, 9) to (start + 0, 68)
= (c0 + Zero)
- Code(Expression(19, Add)) at (prev + 10, 8) to (start + 0, 16)
= (c0 + Zero)
- Code(Counter(1)) at (prev + 0, 17) to (start + 4, 6)
- Code(Expression(22, Sub)) at (prev + 4, 6) to (start + 0, 7)
= (c0 - c1)
- Code(Expression(21, Add)) at (prev + 1, 5) to (start + 3, 2)
= (c1 + (c0 - c1))
Function name: closure::main::{closure#0}
Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 27, 05, 02, 14, 05, 02, 15, 02, 0a, 02, 02, 0a, 00, 0b, 07, 01, 09, 01, 06]
Number of files: 1
- file 0 => global file 1
Number of expressions: 2
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 39, 5) to (start + 2, 20)
- Code(Counter(1)) at (prev + 2, 21) to (start + 2, 10)
- Code(Expression(0, Sub)) at (prev + 2, 10) to (start + 0, 11)
= (c0 - c1)
- Code(Expression(1, Add)) at (prev + 1, 9) to (start + 1, 6)
= (c1 + (c0 - c1))
Function name: closure::main::{closure#10} (unused)
Raw bytes (10): 0x[01, 01, 00, 01, 01, 9a, 01, 07, 00, 21]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 154, 7) to (start + 0, 33)
Function name: closure::main::{closure#11} (unused)
Raw bytes (10): 0x[01, 01, 00, 01, 01, 9e, 01, 07, 00, 21]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 158, 7) to (start + 0, 33)
Function name: closure::main::{closure#12} (unused)
Raw bytes (10): 0x[01, 01, 00, 01, 01, a6, 01, 01, 00, 17]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 166, 1) to (start + 0, 23)
Function name: closure::main::{closure#13} (unused)
Raw bytes (10): 0x[01, 01, 00, 01, 01, ab, 01, 0d, 02, 0e]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 171, 13) to (start + 2, 14)
Function name: closure::main::{closure#14}
Raw bytes (38): 0x[01, 01, 04, 05, 0a, 01, 05, 01, 05, 03, 00, 05, 03, b2, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0a, 00, 2f, 00, 33, 0f, 01, 0d, 00, 0e]
Number of files: 1
- file 0 => global file 1
Number of expressions: 4
- expression 0 operands: lhs = Counter(1), rhs = Expression(2, Sub)
- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
- expression 3 operands: lhs = Expression(0, Add), rhs = Zero
Number of file 0 mappings: 5
- Code(Expression(0, Add)) at (prev + 178, 13) to (start + 0, 21)
= (c1 + (c0 - c1))
- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 27)
- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37)
- Code(Expression(2, Sub)) at (prev + 0, 47) to (start + 0, 51)
= (c0 - c1)
- Code(Expression(3, Add)) at (prev + 1, 13) to (start + 0, 14)
= ((c1 + (c0 - c1)) + Zero)
Function name: closure::main::{closure#15}
Raw bytes (45): 0x[01, 01, 05, 05, 0e, 01, 05, 01, 00, 01, 05, 03, 00, 06, 01, ba, 01, 09, 00, 0a, 03, 01, 0d, 00, 15, 0b, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0e, 00, 2f, 00, 33, 13, 02, 09, 00, 0a]
Number of files: 1
- file 0 => global file 1
Number of expressions: 5
- expression 0 operands: lhs = Counter(1), rhs = Expression(3, Sub)
- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
- expression 2 operands: lhs = Counter(0), rhs = Zero
- expression 3 operands: lhs = Counter(0), rhs = Counter(1)
- expression 4 operands: lhs = Expression(0, Add), rhs = Zero
Number of file 0 mappings: 6
- Code(Counter(0)) at (prev + 186, 9) to (start + 0, 10)
- Code(Expression(0, Add)) at (prev + 1, 13) to (start + 0, 21)
= (c1 + (c0 - c1))
- Code(Expression(2, Add)) at (prev + 1, 17) to (start + 1, 27)
= (c0 + Zero)
- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37)
- Code(Expression(3, Sub)) at (prev + 0, 47) to (start + 0, 51)
= (c0 - c1)
- Code(Expression(4, Add)) at (prev + 2, 9) to (start + 0, 10)
= ((c1 + (c0 - c1)) + Zero)
Function name: closure::main::{closure#16}
Raw bytes (38): 0x[01, 01, 04, 05, 0a, 01, 05, 01, 05, 03, 00, 05, 03, c4, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0a, 00, 2f, 00, 33, 0f, 01, 0d, 00, 0e]
Number of files: 1
- file 0 => global file 1
Number of expressions: 4
- expression 0 operands: lhs = Counter(1), rhs = Expression(2, Sub)
- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
- expression 3 operands: lhs = Expression(0, Add), rhs = Zero
Number of file 0 mappings: 5
- Code(Expression(0, Add)) at (prev + 196, 13) to (start + 0, 21)
= (c1 + (c0 - c1))
- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 27)
- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37)
- Code(Expression(2, Sub)) at (prev + 0, 47) to (start + 0, 51)
= (c0 - c1)
- Code(Expression(3, Add)) at (prev + 1, 13) to (start + 0, 14)
= ((c1 + (c0 - c1)) + Zero)
Function name: closure::main::{closure#17}
Raw bytes (45): 0x[01, 01, 05, 05, 0e, 01, 05, 01, 00, 01, 05, 03, 00, 06, 01, cc, 01, 09, 00, 0a, 03, 01, 0d, 00, 15, 0b, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0e, 00, 2f, 00, 33, 13, 02, 09, 00, 0a]
Number of files: 1
- file 0 => global file 1
Number of expressions: 5
- expression 0 operands: lhs = Counter(1), rhs = Expression(3, Sub)
- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
- expression 2 operands: lhs = Counter(0), rhs = Zero
- expression 3 operands: lhs = Counter(0), rhs = Counter(1)
- expression 4 operands: lhs = Expression(0, Add), rhs = Zero
Number of file 0 mappings: 6
- Code(Counter(0)) at (prev + 204, 9) to (start + 0, 10)
- Code(Expression(0, Add)) at (prev + 1, 13) to (start + 0, 21)
= (c1 + (c0 - c1))
- Code(Expression(2, Add)) at (prev + 1, 17) to (start + 1, 27)
= (c0 + Zero)
- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37)
- Code(Expression(3, Sub)) at (prev + 0, 47) to (start + 0, 51)
= (c0 - c1)
- Code(Expression(4, Add)) at (prev + 2, 9) to (start + 0, 10)
= ((c1 + (c0 - c1)) + Zero)
Function name: closure::main::{closure#18}
Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 18, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 12, 00, 13, 07, 01, 11, 01, 0e]
Number of files: 1
- file 0 => global file 1
Number of expressions: 2
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 24, 13) to (start + 2, 28)
- Code(Counter(1)) at (prev + 2, 29) to (start + 2, 18)
- Code(Expression(0, Sub)) at (prev + 2, 18) to (start + 0, 19)
= (c0 - c1)
- Code(Expression(1, Add)) at (prev + 1, 17) to (start + 1, 14)
= (c1 + (c0 - c1))
Function name: closure::main::{closure#19}
Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 42, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 12, 00, 13, 07, 01, 11, 01, 0e]
Number of files: 1
- file 0 => global file 1
Number of expressions: 2
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 66, 13) to (start + 2, 28)
- Code(Counter(1)) at (prev + 2, 29) to (start + 2, 18)
- Code(Expression(0, Sub)) at (prev + 2, 18) to (start + 0, 19)
= (c0 - c1)
- Code(Expression(1, Add)) at (prev + 1, 17) to (start + 1, 14)
= (c1 + (c0 - c1))
Function name: closure::main::{closure#1}
Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 51, 05, 02, 14, 05, 02, 15, 02, 0a, 02, 02, 0a, 00, 0b, 07, 01, 09, 01, 06]
Number of files: 1
- file 0 => global file 1
Number of expressions: 2
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 81, 5) to (start + 2, 20)
- Code(Counter(1)) at (prev + 2, 21) to (start + 2, 10)
- Code(Expression(0, Sub)) at (prev + 2, 10) to (start + 0, 11)
= (c0 - c1)
- Code(Expression(1, Add)) at (prev + 1, 9) to (start + 1, 6)
= (c1 + (c0 - c1))
Function name: closure::main::{closure#2}
Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 67, 05, 02, 14, 05, 02, 15, 02, 0a, 02, 02, 0a, 00, 0b, 07, 01, 09, 01, 06]
Number of files: 1
- file 0 => global file 1
Number of expressions: 2
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 103, 5) to (start + 2, 20)
- Code(Counter(1)) at (prev + 2, 21) to (start + 2, 10)
- Code(Expression(0, Sub)) at (prev + 2, 10) to (start + 0, 11)
= (c0 - c1)
- Code(Expression(1, Add)) at (prev + 1, 9) to (start + 1, 6)
= (c1 + (c0 - c1))
Function name: closure::main::{closure#3} (unused)
Raw bytes (25): 0x[01, 01, 00, 04, 01, 80, 01, 05, 01, 14, 00, 01, 15, 02, 0a, 00, 02, 0a, 00, 0b, 00, 01, 09, 01, 06]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 128, 5) to (start + 1, 20)
- Code(Zero) at (prev + 1, 21) to (start + 2, 10)
- Code(Zero) at (prev + 2, 10) to (start + 0, 11)
- Code(Zero) at (prev + 1, 9) to (start + 1, 6)
Function name: closure::main::{closure#4} (unused)
Raw bytes (10): 0x[01, 01, 00, 01, 01, 88, 01, 35, 00, 43]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 136, 53) to (start + 0, 67)
Function name: closure::main::{closure#5}
Raw bytes (10): 0x[01, 01, 00, 01, 01, 8b, 01, 3d, 00, 4f]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 139, 61) to (start + 0, 79)
Function name: closure::main::{closure#6}
Raw bytes (10): 0x[01, 01, 00, 01, 01, 8c, 01, 41, 00, 57]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 140, 65) to (start + 0, 87)
Function name: closure::main::{closure#7} (unused)
Raw bytes (10): 0x[01, 01, 00, 01, 01, 8d, 01, 3b, 00, 51]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 141, 59) to (start + 0, 81)
Function name: closure::main::{closure#8} (unused)
Raw bytes (10): 0x[01, 01, 00, 01, 01, 92, 01, 3b, 00, 55]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 146, 59) to (start + 0, 85)
Function name: closure::main::{closure#9} (unused)
Raw bytes (10): 0x[01, 01, 00, 01, 01, 94, 01, 38, 02, 06]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 148, 56) to (start + 2, 6)