This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: STATUS+AF8-ACCESS+AF8-VIOLATION Exception
Thanks Egor.
Amos
----- Original Message -----
From: "egor duda" <deo@logos-m.ru>
To: "Amos" <tirtsab@zahav.net.il>
Cc: <cygwin@cygwin.com>
Sent: Thursday, January 24, 2002 3:17 PM
Subject: Re: STATUS+AF8-ACCESS+AF8-VIOLATION Exception
> Hi!
>
> Thursday, 24 January, 2002 Amos tirtsab@inter.net.il wrote:
>
> A> Any simple c program that uses a string function crashes with the
> A> STATUS_ACCESS_VIOLATION exception.
>
> A> #include <string.h>
> A> main()
> A> { char *abc = "a b c";
> A> strcpy(abc, "hello");
> A> printf("%s\n", abc);
> A> }
>
> your program is incorrect. "a b c" string is a constant and can't be
> overwritten. complier places it in read-only segment, hence the
> exception in strcpy. Please refer to any C language manual for rules
> of proper string manipulation.
>
> Egor. mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/