This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [v3] pure.cc standardization.


On 26-Jan-2001, Benjamin Kosnik <bkoz@redhat.com> wrote:
> 
> Is there any reason to use something besides fputs here? I can't think
> of one. If not, can this get checked in?

I think this may cause problems.

Consider the following scenario:

	user's code calls malloc()
	malloc() puts heap temporarily in an inconsistent state
	signal arrives
	signal handler invoked
	signal handler calls pure virtual function
	PURE_VIRTUAL_NAME called
	PURE_VIRTUAL_NAME calls fputs()
	fputs() calls malloc() to allocate stream buffer
	malloc() dies, because heap is in an inconsistent state.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]