Svante Signell, le Tue 08 Nov 2011 17:05:18 +0100, a écrit :
> On Sun, 2011-11-06 at 01:52 +0100, Samuel Thibault wrote:
> > Svante Signell, le Fri 14 Oct 2011 17:48:31 +0200, a écrit :
> > > /* Avoid consuming stack as this module may be used from signal handler 
> > > */ 
> > > static char *binary_filename = NULL;
> > > 
> > > It wouldn't work with alloca, maybe with malloc!
> 
> > malloc has to be checked with
> > upstream. If rb_dump_backtrace_with_lines is to be called from a *Unix*
> > signal handler, then it is not safe to call malloc. The only solution
> > is then to use a fixed-length array, i.e. the ifndef PATH_MAX define
> > PATH_MAX lazy solution.
> 
> I contacted upstream and they added the conditional definition of
> PATH_MAX to 4096 in commit: r33675. A fixed-length buffer was the only
> solution as you pointed out since the code at hand is run when the
> program has crashed.

Could you forward the fix to Debian?

Samuel


-- 
To UNSUBSCRIBE, email to debian-hurd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111108160843.gf4...@type.bordeaux.inria.fr

Reply via email to