[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Stack blow out



No good ideas just yet. I note that in the present code, AND filters don't
actually need any additional stack space, it's only the OR filters that need an
extra holding space. I started looking into restructuring the OR filters but I
gave up after a while. (I had been staring at it all for so long I was no
longer sure what I was doing....) It may still be possible to trim the IDL
usage back a little and remove the problem.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: owner-openldap-devel@OpenLDAP.org
> [mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of Kurt D. Zeilenga
> Sent: Wednesday, January 30, 2002 11:11 AM
> To: openldap-devel@OpenLDAP.org
> Subject: BDB: Stack blow out
>
>
> I'd really like for BDB to support every large IDLs,
> but stack blow out is a problem even with relatively
> small IDLs (depending on thread stack size).
>
> One thought I have is actually using alloca(), where
> reliable(*), to avoid stack crashes.  alloca() actually
> returns an error which the caller can handle.  There
> are a couple of ways the error could be handled,
> namely return an ALLIDS IDL or switch to malloc().
>
> Also, if a reliable alloca() wasn't available, the
> code would just use malloc().
>
> I've also been thinking of putting in some depth
> limits and early escape code (e.g. stop trying to
> make very small IDLs smaller).
>
> Thoughts?  Comments?  Code?
>
> 	Kurt
>
>
> * GCC builtin + a few select implementations
>