On Thu, 7 Sep 2006, Tim van der Molen wrote:

> Hello,
> 
> Thunar (a file manager for Xfce; not in ports) segfaults on i386
> -current. The author of Thunar thinks the crash is due to a call to
> getdirentries() and has asked me to ask about it here.
> 
> Does anyone know what could have caused this crash?
> 
> The bug report:
> <http://bugzilla.xfce.org/show_bug.cgi?id=2269>
> 
> The relevant source file:
> <http://svn.xfce.org/svn/xfce/thunar/tags/thunar-0.4.0rc1/thunar-vfs/thunar-vfs-os-bsd.c>
> Look for the second occurrence of `getdirentries' in that file; that's
> were the crash happens.
> 
> Thanks in advance.
> 
> Regards,
> Tim

Something to try: avoid alloca(). Threaded programs by default have
very limited stack space per thread, 32k or 64k iirc. So it could be
that the alloca() call trips over the stack. Check the man page of
alloca() for details. 

A workaround would be to use malloc(), and check its return value;
that should be done with alloca() as well, btw.

        -Otto

Reply via email to