www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7503] New: "File[string]" associative array cause "Internal error: ../ztc/cgcs.c 162"

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7503

           Summary: "File[string]" associative array cause "Internal
                    error: ../ztc/cgcs.c 162"
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: canidae exent.net



---
naushika:~/tmp> dmd | head -1
DMD64 D Compiler v2.057
naushika:~/tmp> cat foo.d
import std.stdio;
File[string] files;
void main() {
    files["test"] = File("test", "w");
    files["test"].writeln("bar");
}
naushika:~/tmp> dmd foo.d
Internal error: ../ztc/cgcs.c 162
naushika:~/tmp> dmd foo.d -O
naushika:~/tmp> ./foo
object.Exception std/stdio.d(1131): Enforcement failed
----------------
./foo(pure  safe bool std.exception.enforce!(bool, "std/stdio.d",
1131).enforce(bool, lazy const(char)[])+0x45) [0x44e619]
./foo(std.stdio.File.LockingTextWriter
std.stdio.File.LockingTextWriter.__ctor(ref std.stdio.File)+0x38) [0x44d9a8]
./foo( property std.stdio.File.LockingTextWriter
std.stdio.File.lockingTextWriter()+0x29) [0x44dad5]
./foo(void std.stdio.File.write!(immutable(char)[],
char).write(immutable(char)[], char)+0x4e) [0x44752e]
./foo(void
std.stdio.File.writeln!(immutable(char)[]).writeln(immutable(char)[])+0x47)
[0x447453]
./foo(_Dmain+0x103) [0x4473ff]
./foo(extern (C) int rt.dmain2.main(int, char**).void runMain()+0x17)
[0x44b4df]
./foo(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void
delegate())+0x2a) [0x44b086]
./foo(extern (C) int rt.dmain2.main(int, char**).void runAll()+0x42) [0x44b532]
./foo(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void
delegate())+0x2a) [0x44b086]
./foo(main+0xd3) [0x44b017]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f52232cbead]
----------------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 14 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7503


SomeDude <lovelydear mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear mailmetrash.com



PDT ---
This one compiles on 2.059 Win32, but crashes with "Access violation" at
runtime.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 20 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7503


hsteoh quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice                         |wrong-code



Checked on git HEAD: the ICE no longer happens, but now a runtime exception is
thrown:

object.Exception std/stdio.d(1442): Enforcement failed

Looks like some kind of bad interaction with AA's and struct dtors.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 15 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7503


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE




 Checked on git HEAD: the ICE no longer happens, but now a runtime exception is
 thrown:
 
 object.Exception std/stdio.d(1442): Enforcement failed
 
 Looks like some kind of bad interaction with AA's and struct dtors.
The runtime exception is the dup of bug 6178. *** This issue has been marked as a duplicate of issue 6178 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 07 2013