delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/19/06:19:11

Message-ID: <3ADEBB93.A09C6B62@ma.tum.de>
Date: Thu, 19 Apr 2001 12:18:59 +0200
From: Waldemar Schultz <schultzma AT mathematik DOT tu-muenchen DOT de>
X-Mailer: Mozilla 4.75 [de] (Win98; U)
X-Accept-Language: de,en-US
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com
Subject: Re: MINGW vs DJGPP
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1010418185938 DOT 180B-100000 AT is>
X-MIME-Autoconverted: from 8bit to quoted-printable by sunrbg2.mathematik.tu-muenchen.de id MAA16140
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id GAA32707
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii schrieb:
> This is a classic gotcha with GCC.  The bug is in your program: you are
> trying to change a read-only string.
> 
> GCC by default puts constant strings into read-only storage, so trying to
> modify it triggers a protection violation.  This will happen on any
> platform; DJGPP avoids this problem because our .data and .text segments
> overlap (due to subtleties of exception handling in DPMI environment),
> and that prevents us from making the code segment write-protected.  MinGW
> doesn't have this problem, so your bug is exposed.

Thanks a lot for explaining this. (though, should not have happend to
me(blush) :-)

-- 
 Gruss Waldemar Schultz.
 Technische Universität München, Zentrum Mathematik M1, D 80290 München
 Tel: +49 (0)89 2892 8226        FAX: +49 (0)89 2892 8228

- Raw text -


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