[Gc] GoAhead WEBs server and GC

Boehm, Hans hans.boehm at hp.com
Wed Jul 7 14:27:11 PDT 2004


I think Alec Orr posted the same question earlier today.  I posted a partial reply.
You need to check whether your GC configuration is correct.  If so, a small
self-contained test case that fails would make this much easier to track down.
The standard test program tests this to some extent, so I would be surprised if
the interior pointer support were completely broken.

It's also worth checking that the pointer manipulation code which adds the
offset is doing something plausible.  The code that Alec posted is
suspicious because allocMem does not add OFFSET to the size of the object
it requests from GC_MALLOC, but that may have been the way the code was
abbreviated.

(If you plan to use GC_DEBUG, you should really use the all-caps
GC_REGISTER_DISPLACEMENT, not GC_register_displacement as I suggested below.)

My earlier reply:

This depends on the GC configuration.  The code below should be OK
if GC_all_interior_pointers is set, or if GC_register_displacement(OFFSET)
has been called.

If not, stack and register interior pointers should still be recognized
(to deal with frequent compiler optimizations), but interior pointers
from the heap and static data will not be.

If you have a small example for which the GC doesn't behave that way, I'd love
to see it.

Hans

> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com]On Behalf Of Jim Marshall
> Sent: Wednesday, July 07, 2004 1:53 PM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] GoAhead WEBs server and GC 
> 
> 
> Hi,
>  We've been trying to track down some issues with a third 
> party program 
> for about a month now, and have come up empty. I am hoping 
> that someone 
> on the alias may have some experience with this.
> 
> Our program is incorporating the GoAhead WEBs server 
> (http://webserver.goahead.com/webserver/webserver.htm). If you would 
> like to look at the WEBs code you can get it here 
> http://www.iconnextion.com/~jm109344/webs218.tar.gz
> 
> Basically, if we enable the http keep alive (uncomment line 28 in 
> wsIntrn.h), and we make multiple requests with the same 
> client we start 
> getting smashed objects. This seems to occur in code which allocates 
> memory but doesn't return the base of the allocation, but instead 
> returns an offset into that allocated buffer.
> 
> This works (or appears to) with regular malloc and dmalloc reports no 
> errors.
> 
> Has anyone had any experience with WEBs and using the GC with it?
> 
> desperately
> -Jim
> 
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> 


More information about the Gc mailing list