1857 – Runtime segfault while profileing - jump to invalid code address

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1857 - Runtime segfault while profileing - jump to invalid code address
Summary: Runtime segfault while profileing - jump to invalid code address
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Linux
: P2 normal
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2008年02月20日 16:18 UTC by Russ Lewis
Modified: 2015年06月09日 01:14 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Russ Lewis 2008年02月20日 16:18:26 UTC
DMD 2.011
Fedora Core 6 x86_64
The following code runs fine when you compile it normally, but segfaults when you compile it with "-profile". It appears, from looking at gdb and "objdump -d", that the root problem is that the code jumps to an invalid instruction. Note, when you test this code, to use the exact code I show here. The error vanishes if you change very much, even things like type or module names:
BEGIN MODULE: "main.d"
module main;
import rule_pattern;
import std.stdio;
template my_chain(RET_TYPES...)
{
 void delegate(RET_TYPES)
 of(ARG_TYPES...)(ARG_TYPES args)
 {
return null;
 }
}
typedef char[] IDENT;
int main()
{
writefln("f");
 auto myChain = my_chain!(IDENT, void delegate(rule_pattern*))
 .of(delegate void(void delegate(IDENT)) {},
 delegate void(void delegate(void delegate(rule_pattern*))) {});
writefln("a2");
 return 0;
}
BEGIN MODULE "rule_pattern.d"
module rule_pattern;
struct rule_pattern {}
END CODE
Comment 1 Walter Bright 2008年03月07日 00:33:31 UTC
Fixed dmd 1.028 and 2.012


AltStyle によって変換されたページ (->オリジナル) /