[Issue 3024] New: array slicing bypass the stack var escape check
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 25 06:32:36 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3024
Summary: array slicing bypass the stack var escape check
Product: D
Version: 2.028
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: davidl at 126.com
import std.stdio;
string func()
{
string s="abc";
return s;
}
void func1()
{
writefln("func1");
string v = func();
writefln("call func");
writefln(func2());
}
byte[] func2()
{
writefln("hello!");
byte[16] v= [65,65,65,65,
65,65,65,65,
65,65,65,65,
65,65,65,65];
writefln(v[0..16]);
return v[0..16];
}
void main(string[] args)
{
func1();
}
--
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