[xmlroff] ref_count as sanity check [Was: Simple docbook]

Tony Graham Tony.Graham at MenteithConsulting.com
Tue Mar 18 14:03:53 UTC 2008


On Tue, Mar 18 2008 13:08:18 +0000, asmodai at in-nomine.org wrote:
...
> This is more telling I think:
>
> #6  0x0819e7fc in fo_property_writing_mode_to_bpd (writing_mode=0x82330a0, 
>     error=0x0) at fo-property-writing-mode.c:393
> 393           g_assert_not_reached ();
>
> in libfo/property/fo-property-writing-mode.c we have:
>
>   writing_mode_value =
>     fo_enum_get_value (writing_mode->value);
>
> (gdb) print *writing_mode
> $2 = {parent_instance = {parent_instance = {g_type_instance = {
>         g_class = 0x705f6f66}, ref_count = 1701867378, qdata = 0x5f797472}}, 
>   value = 0x74697277}

This ref_count is seriously wrong.  It shouldn't be higher than the
number of FOs with 'writing-mode' properties in the document.

It's a good indication that this is a random piece of memory.

Ref counts of common datatype values, e.g. for the 'auto' enumeration
token, can be much higher because multiple properties may have the same
value, but 1,701,867,378 references to any value is exceedingly
unlikely.

Regards,


Tony.


More information about the xmlroff-list mailing list