[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Segmentation fault on example thread2.cpp
From: |
Federico Montesino Pouzols |
Subject: |
Re: Segmentation fault on example thread2.cpp |
Date: |
Mon, 13 Oct 2003 16:02:37 +0200 |
User-agent: |
Mutt/1.5.4i |
'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