[Issue 2080] Segfault(D1 only, mangle.c) alias corrupts type inference of static variables

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 26 11:35:07 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2080


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au
            Summary|Static variable without     |Segfault(D1 only, mangle.c)
                   |explicit type causes        |alias corrupts type
                   |compiler to crash           |inference of static
                   |                            |variables
           Severity|normal                      |critical




--- Comment #4 from Don <clugdbug at yahoo.com.au>  2009-05-26 11:35:06 PDT ---
The test case is a bit misleading. It requires an alias to the type which is
being inferred. With the original test case, it was provided by alias char[]
string; in std.object.

Here's a complete test case. Remove the alias, and it will be fine.
---
alias int * any_old_alias;
const bar = foo;
int * foo = null;
---

The alias creates a corrupt type (it doesn't have the 'deco' member set), and
this gets picked by 'bar' instead of the type of foo.

The behaviour is quite similar to 2672. Marking as critical, because subtle
changes in ordering in different modules can control whether the segfault
occurs.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list