[Issue 3822] New: alloca() can return the same address inside a function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 18 11:17:12 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3822
Summary: alloca() can return the same address inside a function
Product: D
Version: 2.040
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: druntime
AssignedTo: sean at invisibleduck.org
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-02-18 11:17:11 PST ---
import std.stdio: printf;
import std.c.stdlib: alloca;
void main() {
const int n = 8;
for (int i; i < 2; i++)
printf("%p\n", alloca(n));
}
It prints two times the same address, I don't know why, I think this can be
wrong.
--
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