delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/24/08:26:44

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <00cc01c1a4da$b0c375b0$16c008d5@amosjx3m6o4w1v>
From: "Amos" <tirtsab AT inter DOT net DOT il>
To: "egor duda" <cygwin AT cygwin DOT com>
References: <009a01c1a4d7$217b30d0$16c008d5 AT amosjx3m6o4w1v> <149181594168 DOT 20020124161716 AT logos-m DOT ru>
Subject: Re: STATUS+AF8-ACCESS+AF8-VIOLATION Exception
Date: Thu, 24 Jan 2002 15:26:10 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

Thanks Egor.

Amos
----- Original Message ----- 
From: "egor duda" <deo AT logos-m DOT ru>
To: "Amos" <tirtsab AT zahav DOT net DOT il>
Cc: <cygwin AT cygwin DOT com>
Sent: Thursday, January 24, 2002 3:17 PM
Subject: Re: STATUS+AF8-ACCESS+AF8-VIOLATION Exception


> Hi!
> 
> Thursday, 24 January, 2002 Amos tirtsab AT inter DOT net DOT 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 AT logos-m DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019