Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Mar 1995 13:53:38 MST
From:      Warner Losh <imp@boulder.openware.com>
To:        sxupjb@fnma.COM (Phillip Beiler)
Cc:        oi-users@freefall.cdrom.com
Subject:   Re: Exception Error??? 
Message-ID:  <199503062053.NAA09489@marvin.boulder.openware.com>
In-Reply-To: Your message of Sun, 05 Mar 1995 18:45:47 EST

next in thread | raw e-mail | index | archive | help
: Run-time exception error; current exception: xalloc
:         No handler for exception.
: Abort (core dumped)
: Has anyone encountered this problem or know how to fix it?

Well, I know a thing or two about it, so I'll try.

The xalloc exception is thrown when new fails to allocate memory for
some reason.  At least in the Jan 24, 1994 C++ working group interum
working paper that I have a copy of.  Things like have changed in the
standard since then, but 

I don't know how to handle it for sure, but you may be able to
establish a default handler so that it doesn't abort.  Since I've not
worked extensively with exceptions, I'm unable to even give you the
syntax on how to do this.  From the working paper, I immagine the
following might work:
	try {
		// ... Put OI stuff here
	}
	catch (...) {
		// This will get called when any exception happens
	}

It looks like there is a class xmsg that is used for all the standard
exceptions that are thrown, but I don't know where it is defined in
Sun's compiler, nor how to effectively use it, as I don't have a copy
of the compiler manual handy.

We're planning on compiling OI -noex for the 4.6 release, and that
might solve this problem.  Or it might make things worse.  We're doing
this because it improves performace of those parts of the application
that don't use exceptions at all.

Finally, where does the core trace show that this allocation is
failing at?

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503062053.NAA09489>