[Issue 1766] segfault writing to a string variable...
Derek Parnell
derek at nomail.afraid.org
Thu Jan 3 19:26:51 PST 2008
On Fri, 04 Jan 2008 00:03:13 +0100, Kenny B wrote:
> d-bugmail at puremagic.com wrote:
>> http://d.puremagic.com/issues/show_bug.cgi?id=1766
>>
>> bugzilla at digitalmars.com changed:
>>
>> What |Removed |Added
>> ----------------------------------------------------------------------------
>> Status|NEW |RESOLVED
>> Resolution| |INVALID
>>
>> ------- Comment #2 from bugzilla at digitalmars.com 2008-01-02 20:57 -------
>> This is not a bug, string literals are read-only.
>>
>
> Ok, I understand it's not a bug and it makes perfect sense, but why did
> the same exact code work as I originally expected with dmd-2.003?
> shouldn't that also be read-only?
>
> Is it a bug that dmd works?
Yes. The Linux compiler places literals in read-only memory but the Windows
one doesn't. This is sort of fixed in D v2.
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
4/01/2008 2:25:46 PM
More information about the D.gnu
mailing list