bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Segmentation fault on example thread2.cpp


From: David Sugar
Subject: Re: Segmentation fault on example thread2.cpp
Date: Mon, 13 Oct 2003 10:18:25 -0400
User-agent: KMail/1.5

"thread2" was not an "example", but a "test" program, and as Federico points 
out, it was intended to test the fact that a segfault does occur!

On Monday 13 October 2003 10:02 am, Federico Montesino Pouzols wrote:
> 'Segmentation fault' is actually the good behaviour for this
> test, as it tries to access a memory block which has been
> freed. Remove the following line:
>
>                 // reset memory to test access violation
>                 memset(this,0,sizeof(*this));
>
>       and check that the test does not lead to a segmentation fault
> any more.
>
> On Mon, Oct 13, 2003 at 11:14:45AM +0400, "Andrew Batyuck"  wrote:
> > Greetings,
> > I've started learning CommonC++, but after the first example i compiled i
> > encountered problem. Compile and run thread2.cpp - program gives out
> > intended output, but after the last line comes 'Segmenation fault'
> > message. I have SuSE 8.2 Professional installed with last kernel update
> > from SuSE.
> >
> > Sorry for my poor english and lack of information, writing from work,
> > while problem was encountered at home =(
> >
> > Regards, Andrew
> >
> >
> > _______________________________________________
> > Bug-commoncpp mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/bug-commoncpp
>
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp





reply via email to

[Prev in Thread] Current Thread [Next in Thread]