Path: utzoo!attcan!uunet!ingr!doyle From: doyle@ingr.com (Doyle Davidson) Newsgroups: comp.windows.x Subject: Memory Leak in Bitblt code in R4 Message-ID: <9071@ingr.com> Date: 2 Mar 90 15:35:58 GMT Organization: Intergraph Corp. Huntsville, Al Lines: 49 We have found a bug in R4 'cfbbitblt.c' involving the use of ALLOCATE_LOCAL. The DEALLOCATE_LOCAL is not there! In cfbDoBitblt() there are four vars that are ALLOCATE_LOCAL'ed pptNew1 pboxNew1 pptNew2 pboxNew2 These do not get freed upon leaving the routine. They are ok in mfbbitblt.c (see that for a fix). You will see this effect when scrolling complex regions (> 1 rect) down and/or to the right. (like a partially covered xterm!) If your system uses malloc() for allocate local, you will have a memory leak. If your system has an implicit DEALLOCATE_LOCAL, the you will have no problem. If your system plays with the stack pointer (as ours does) and requires a DEALLOCATE_LOCAL, then you will probably core dump. I've noticed some people complain about memory leaks on the net and thought that this might explain why some people see this and others don't. I will post this to xbugs. If this was in Patch-2 to R4, then I apologize for bringing this up. Speaking of patch 2, I have requested it well over a week ago and received the acknowlegment the next day but the patch has still not arrived via email. Is 'xstuff' just that busy? Oh, and I had no problem receiving patch-1! If anyone out there has seen my patch 2 bouncing around on their system, could you please send it to: doyle@ingr.com Lassie come home! Doyle ------------------------------------------------------------------ Doyle C. Davidson | Intergraph Corp. | These comments are... Workstation Graphics Standards | 1 Madison Industrial Park | Huntsville, AL 35806 | (205) 730-2000 | X-clusively my own. | ..!uunet!ingr!b11!doyled!doyle | ------------------------------------------------------------------