[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Behaviour change for double-free'ing a pointer
- Date: Thu, 20 Dec 2007 16:13:11 -0800
- From: aaron at frye.com (Aaron J. Grier)
- Subject: Behaviour change for double-free'ing a pointer
On Thu, Dec 20, 2007 at 01:05:03PM -0600, Joel Sherrill wrote:
> Aaron J. Grier wrote:
> FWIW [double-free] isn't an RTEMS internal error. It is a case where
> the user called free with a bad pointer.
> + Not in the heap
> + already freed
> + not the starting address of a block
> In all cases, RTEMS does not cause a fatal error when the user makes
> an API call with bad arguments. If we think "free of bad pointer" is
> a common enough case that it should be a place where a user can plug
> in a handler, then that's OK.
> >I believe it should be possible and optional for RTEMS to halt at
> In this case only or do you have a set of these in mind?
I think the existing RTEMS_DEBUG and consistency checks covers the other
since I am RAM constrained, having hooks to catch bad malloc/free usage,
heap corruption, and stack overflows have been helpful to me in the
past. I'd hate to see them be removed because "failed API calls should
not halt the machine." there are cases where both behaviors are
Aaron J. Grier | Frye Electronics, Tigard, OR | aaron at frye.com