Hi!
Looks like geom_label is leaking some memory to the last sector used to
store metadata.
Lots of rubbish after the label:
> 000ffe00h: 47 45 4F 4D 3A 3A 4C 41 42 45 4C 00 00 00 00 00 ;
GEOM::LABEL.....
> 000ffe10h: 02 00 00 00 74 65 73 74 00 00 00 00 F0 B4 BF BF ;
....test....????
> 000ffe20h: 02 00 00 00 00 00 10 00 00 00 00 00 00 93 07 28 ;
.............?.(
> 000ffe30h: 00 94 07 28 00 95 07 28 18 28 07 28 D4 F8 0B 28 ;
.?.(.?.(.(.(??.(
> 000ffe40h: 01 00 00 00 F4 B1 BF BF 67 2C 05 28 39 4D 05 28 ;
....????g,.(9M.(
> 000ffe50h: 18 28 07 28 F4 B1 BF BF 00 95 07 28 94 27 05 28 ;
.(.(????.?.(?'.(
> 000ffe60h: 37 67 1A 28 37 67 1A 28 00 95 07 28 A0 B1 BF BF ; 7g.(7g.(.?.(
???
> 000ffe70h: 06 00 00 00 43 00 00 00 0B 27 05 00 18 28 07 28 ;
....C....'...(.(
> 000ffe80h: 50 A1 07 28 00 00 00 00 94 27 05 28 60 F9 07 28 ;
P?.(....?'.(`?.(
> 000ffe90h: 8C 71 0C 31 3B 1C 0C 28 94 27 05 28 4C 12 0C 28 ;
?q.1;..(?'.(L..(
> 000ffea0h: 7B B9 04 08 03 00 00 00 13 B2 BF BF 01 00 00 00 ;
{?.......???....
> 000ffeb0h: 00 30 05 08 0B 27 05 01 18 28 07 28 04 00 00 00 ;
.0...'...(.(....
> 000ffec0h: 00 00 00 00 84 B2 BF BF 94 27 05 28 93 88 04 08 ;
....?????'.(??..
> 000ffed0h: BC 0F 0C 28 00 95 07 28 9D D9 10 28 60 D1 18 28 ;
?..(.?.(??.(`?.(
> 000ffee0h: 21 0B 00 00 0B 27 05 01 18 28 07 28 D0 A0 07 28 ;
!....'...(.(? .(
> 000ffef0h: 00 00 00 00 B4 B2 BF BF CB 28 05 28 93 88 04 08 ;
....?????(.(??..
> 000fff00h: C4 49 3C 07 00 95 07 28 01 00 00 00 60 D1 18 28 ;
?I<..?.(....`?.(
> 000fff10h: 00 F0 04 08 10 00 00 00 00 95 07 28 2F D3 16 01 ;
.?.......?.(/?..
> 000fff20h: C4 49 3C 07 93 88 04 08 18 28 07 28 F0 85 04 08 ;
?I<.??...(.(??..
> 000fff30h: 00 00 00 00 44 B3 BF BF A2 29 05 28 08 08 07 28 ;
....D????).(...(
> 000fff40h: 18 B3 BF BF 01 00 00 00 1C B3 BF BF 00 00 00 00 ;
.???.....???....
> 000fff50h: 00 90 07 28 00 91 07 28 00 92 07 28 00 93 07 28 ;
.?.(.?.(.?.(.?.(
> 000fff60h: 00 94 07 28 00 95 07 28 00 00 00 00 00 00 00 00 ;
.?.(.?.(........
> 000fff70h: 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 ;
................
> 000fff80h: 00 00 00 00 00 00 00 00 00 95 07 28 05 00 00 01 ;
.........?.(....
> 000fff90h: C4 49 3C 07 93 88 04 08 00 95 07 28 D0 B2 BF BF ;
?I<.??...?.(????
> 000fffa0h: 07 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 ;
................
> 000fffb0h: 00 00 00 00 1D 29 05 28 18 28 07 28 F0 85 04 08 ;
.....).(.(.(??..
> 000fffc0h: 01 00 00 00 74 B3 BF BF 67 2C 05 28 39 4D 05 28 ;
....t???g,.(9M.(
> 000fffd0h: 18 28 07 28 74 B3 BF BF C7 4E 05 28 00 D0 07 28 ;
.(.(t????N.(.?.(
> 000fffe0h: 93 88 04 08 00 95 07 28 18 28 07 28 18 28 07 28 ;
??...?.(.(.(.(.(
> 000ffff0h: 84 D0 17 28 A4 B3 BF BF C8 2D 05 28 C4 6D 07 28 ;
??.(?????-.(?m.(
The buffer in sbin/geom/class/label/geom_label.c:label_label(...) is
allocated from the stack but never initialized with zeros.
Does anybody consider this a bug? Didn't find any PR for it.
A simple memset() should fix it...
BTW: code documentation is pretty bad...
Cheers,
Johannes