[Bug: 21.5-b28] #'make-vector does not fail gracefully when handled a huge LENGTH

Stephen J. Turnbull stephen at xemacs.org
Mon Feb 9 20:44:19 EST 2009


Aidan Kehoe writes:
 > ================================================================
 > Dear Bug Team!
 > 
 > In *scratch*, I evaluate: 
 > 
 >   (prog1
 >       nil
 >     (setq my-thing (make-vector most-positive-fixnum nil)))
 > 
 > My XEmacs crashes with the following backtrace: 

That looks like an OS bug to me.  The malloc should fail, shouldn't
it?

The only reliable way to handle this that I can see is to install a
signal handler for this case, which restores sanity and then uninstall
it and signal a Lisp error -- but that involves two system calls.  Do
you have a suggestion?




More information about the XEmacs-Beta mailing list