> Subject: Re: [Xpert]crash in xf86fbman.c : patch proposition
> Date: Tue, 4 Dec 2001 12:46:52 -0800 (PST)
> From: Mark Vojkovich <[EMAIL PROTECTED]>
> To: Jacques GANGLOFF <[EMAIL PROTECTED]>
> CC: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>
> On Tue, 4 Dec 2001, Jacques GANGLOFF wrote:
>
> > Hi  Mark,
> >
> > Sorry for my rather rough way of programming, butr I am
> > newbie in xfree programming.
> >
> > I send below my modified version of AllocateArea with lots
> > of output messages and then the corresponding log file.
> > (note that this is the corrected version of the function).
> >
> > You can note that you can go into the test if(area) ....
> > even if a new item in the list has not been allocated
> > (search for the string "PROBLEM IS HERE" to find
> > the relevant line in the log file")
>
>    OK, I see what you're getting at.  Yes, the link gets enlisted
> twice in that case.  I would prefer the following fix,  I assume
> this fixes the problem you are seeing?
>
>
> *** xf86fbman.c.old     Tue Dec  4 12:40:36 2001
> --- xf86fbman.c Tue Dec  4 12:43:49 2001
> ***************
> *** 345,350 ****
> --- 345,353 ----
>         if(!link) return NULL;
>
>           area = &(link->area);
> +         link->next = offman->UsedAreas;
> +         offman->UsedAreas = link;
> +         offman->NumUsedAreas++;
>         break;
>      }
>
> ***************
> *** 376,383 ****
>            REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &NewReg);
>            REGION_UNINIT(pScreen, &NewReg);
>
> -          offman->NumUsedAreas--;
> -
>              area = &(link->area);
>            break;
>         }
> --- 379,384 ----
> ***************
> *** 397,406 ****
>           REGION_INIT(pScreen, &NewReg, &(area->box), 1);
>         REGION_SUBTRACT(pScreen, offman->FreeBoxes, offman->FreeBoxes, &NewReg);
>         REGION_UNINIT(pScreen, &NewReg);
> -
> -       link->next = offman->UsedAreas;
> -       offman->UsedAreas = link;
> -       offman->NumUsedAreas++;
>      }
>
>      return area;
> --- 398,403 ----
>
>
>

Hi Mark,

I tested your patch : It's ok, it works.

Thank you,
Jacques

--
 _________________________________
(
)   Jacques GANGLOFF
(   Associate Professor
)   LSIIT / GRAViR
(   Bd Sébastien Brant
)   67400 Illkirch
(   Tel : +33 (0)3 90 24 44 68
)   Fax : +33 (0)3 90 24 44 80
(   http://gravir.u-strasbg.fr
)_________________________________



_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to