[libcroco-list] bugfix; memory corruption question
- From: saul pwanson <saul saulpwanson com>
- To: libcroco-list gnome org
- Subject: [libcroco-list] bugfix; memory corruption question
- Date: Thu, 17 Aug 2006 14:20:02 -0700 (PDT)
Greetings,
Thanks very much for creating the only open source C++ CSS
parsing/selection library. It seems to work quite well for my purposes.
I've found a bug in the class selector code, where it would not require
whitespace before the class in a class attribute with multiple classes.
For example:
<li class="xy" />
would be incorrectly selected by:
li.y { ... }
(bugfix attached in patchfile)
I'm also running into a weird issue whereby dmalloc complains (err 60:
chunk_free: pointer is not on block boundary) when I use
cr_cascade_destroy to destroy a cascade. At first I thought this was a
ghost; I turned off dmalloc's reporting on i386 and no issues resulted.
But on our production hardware (ARM), using cr_cascade_destroy reliably
causes a SIGSEGV, ultimately in cr_statement_destroy. Has anyone else
seen this behavior, either by using dmalloc or by using libcroco on ARM?
It seems like it might be a misaligned pointer; could this be coming
directly from glib?
Thanks in advance for any suggestions,
saul
*** cr-sel-eng.c 2006-03-05 13:57:02.000000000 -0800
--- cr-sel-eng.c.patched 2006-06-15 18:34:10.000000000 -0700
***************
*** 233,242 ****
--- 233,246 ----
a_add_sel->content.class_name->stryng->len)) {
cur += a_add_sel->content.class_name->stryng->len;
if ((cur && !*cur)
|| cr_utils_is_white_space (*cur) == TRUE)
result = TRUE;
+ } else { /* if it doesn't match, */
+ /* then skip to next whitespace character to try again */
+ while (cur && *cur && !(cr_utils_is_white_space(*cur) == TRUE))
+ cur++;
}
if (cur && !*cur)
break ;
}
}
[Date Prev][Date Next] [Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]