Le jeudi 17 novembre 2005 ? 17:34 +0800, sunmoon1997 a ?crit :> here is a impoved one.:)Nice fix, I can confirm it fixes the crash. Thanks a lot. Could Patrick or Keith commit both my warning output patch and sunmoon crash fixes, both are useful.. -- Frederic Crozat <fcrozat@mandriva.com> Mandriva
Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: =?UTF-8?Q?=E8=BF=99=E6=98=AF=E4=BF=A1=E4=BB=B6=E7=9A=84=E6=95=B0? =?UTF-8?Q?=E5=AD=97=E7=AD=BE=E5=90=8D=E9=83=A8=E5=88=86?Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20051117/9fd5c6df/attachment.pgp
Le jeudi 17 novembre 2005 ? 18:24 +0800, sunmoon1997 a ?crit :> this one shoule be better;)It work fine too :) -- Frederic Crozat <fcrozat@mandriva.com> Mandriva
sunmoon1997 wrote:> this one shoule be better;) > ? 2005-11-17?? 11:00 +0100?Frederic Crozat??? > >>Le jeudi 17 novembre 2005 ? 17:34 +0800, sunmoon1997 a ?crit : >> >>>here is a impoved one.:) >> >>Nice fix, I can confirm it fixes the crash. Thanks a lot. >> >>Could Patrick or Keith commit both my warning output patch and sunmoon >>crash fixes, both are useful..I''ll commit the warning output patch. I''m a bit confused by sunmoon''s crash fix, I don''t really understand why it works. I''m going to take a bit more of a look at it; sunmoon, can you comment on why it works? pat
sunmoon1997 wrote:> From my understanding, FcConfigValues recurrently calls itself and > constructs a value list and removes any void value in the list. > But it checks the list in reversed order, that is from tail to head. > The current implementation of FcConfigValues, it iterates from the > current node to list tail, you can see it checks the node already > checked.Right, I didn''t notice the recursion in FcConfigValues. I''ve committed your patch. Good catch, and thanks! pat
From my understanding, FcConfigValues recurrently calls itself and constructs a value list and removes any void value in the list. But it checks the list in reversed order, that is from tail to head. The current implementation of FcConfigValues, it iterates from the current node to list tail, you can see it checks the node already checked. 1 2 3 4 5 =-=-=-=- = 1 checking node(s) 5 =-= 2 4 - 5 =-=-= 3 3 - 5 =-=-=-= 4 2 - 5 =-=-=-=-= 5 1 - 5 After removing the iteration, the code will work like following. 1 2 3 4 5 =-=-=-=-= = 1 checking node 5(if it''s a void value, then drops this node) = 2 4 ... = 3 3 ... = 4 2 ... = 5 1 ... I think it''s simpler and is still correct. Am i correct? ? 2005-11-17?? 11:08 -0500?Patrick Lam???> sunmoon1997 wrote: > > this one shoule be better;) > > ? 2005-11-17?? 11:00 +0100?Frederic Crozat??? > > > >>Le jeudi 17 novembre 2005 ? 17:34 +0800, sunmoon1997 a ?crit : > >> > >>>here is a impoved one.:) > >> > >>Nice fix, I can confirm it fixes the crash. Thanks a lot. > >> > >>Could Patrick or Keith commit both my warning output patch and sunmoon > >>crash fixes, both are useful.. > > I''ll commit the warning output patch. I''m a bit confused by sunmoon''s > crash fix, I don''t really understand why it works. I''m going to take a > bit more of a look at it; sunmoon, can you comment on why it works? > > pat-- Jinghua Luo <sunmoon1997@gmail.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: =?UTF-8?Q?=E8=BF=99=E6=98=AF=E4=BF=A1=E4=BB=B6=E7=9A=84=E6=95=B0? =?UTF-8?Q?=E5=AD=97=E7=AD=BE=E5=90=8D=E9=83=A8=E5=88=86?Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20051118/5d8f4b61/attachment.pgp
Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: =?UTF-8?Q?=E8=BF=99=E6=98=AF=E4=BF=A1=E4=BB=B6=E7=9A=84=E6=95=B0? =?UTF-8?Q?=E5=AD=97=E7=AD=BE=E5=90=8D=E9=83=A8=E5=88=86?Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20051117/255fc6c4/attachment.pgp