[Issue 7106] New: DMD Segmentation faults!
http://d.puremagic.com/issues/show_bug.cgi?id=7106 Summary: DMD Segmentation faults! Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: iteronve...@gmail.com --- Comment #0 from iteronve...@gmail.com 2011-12-14 01:25:54 PST --- struct Ma(T){ pure T alpha() const{ return 1.1; } Ma opBinary(string op)(in Ma m) const if(op == -){ return Ma(m); } } struct Pa(T){ Ma!T _m; alias _m this; } pure T foo(alias P, T)(in P!T p){ return (p - p).alpha(); } void main(){ Pa!double p1; foo(p1); } This is as far as I could narrow it down. Something starts to go wrong when 'opBinary' is called. Also, removing pure from 'foo' doesn't cause the seg fault. DMD 2.56, Linux-64bit -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7107] New: Compiled program aborts when using foreach and std.regex.splitter
http://d.puremagic.com/issues/show_bug.cgi?id=7107 Summary: Compiled program aborts when using foreach and std.regex.splitter Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: tta...@gmail.com --- Comment #0 from Tomoya Tanjo tta...@gmail.com 2011-12-14 04:07:20 PST --- Created an attachment (id=1052) The output of the compiled program When I compiled the following code with DMD v2.057 with -inline option, the compiled program aborts in runtime (on Linux 64bit). When I use regex(h) or regex( ) instead of regex( ), this code works correctly. issue.d: import std.regex; import std.stdio; void main() { foreach(w; splitter(hoge fuga, regex( ))) { writeln(w); writeln(w.length); } } I attached the output of the compiled program. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7107] Compiled program aborts when using foreach and std.regex.splitter
http://d.puremagic.com/issues/show_bug.cgi?id=7107 --- Comment #1 from Kenji Hara k.hara...@gmail.com 2011-12-14 04:26:02 PST --- This problem does not occurs in Windows 7 64bit. Output is: hoge fuga 9 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7108] New: ICE: TraitsExp::semantic(Scope*) 2.056 - 2.057 regression - segfault
http://d.puremagic.com/issues/show_bug.cgi?id=7108 Summary: ICE: TraitsExp::semantic(Scope*) 2.056 - 2.057 regression - segfault Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: dl...@chilon.net --- Comment #0 from pelo dl...@chilon.net 2011-12-14 04:47:32 PST --- Most of my d code now causes the compiler to core dump. All 3 of 3 projects no longer work and only two of them share code. Here's the backtrace I got: Program terminated with signal 11, Segmentation fault. #0 0x00520227 in TraitsExp::semantic(Scope*) () #1 0x00479f95 in OrOrExp::semantic(Scope*) () #2 0x00452729 in StaticIfCondition::include(Scope*, ScopeDsymbol*) () #3 0x00407173 in ConditionalDeclaration::include(Scope*, ScopeDsymbol*) () #4 0x004065e7 in StaticIfDeclaration::semantic(Scope*) () #5 0x00406623 in StaticIfDeclaration::semantic(Scope*) () #6 0x00406623 in StaticIfDeclaration::semantic(Scope*) () #7 0x004fcd28 in TemplateInstance::semantic(Scope*, ArrayBaseExpression*) () #8 0x004c3bba in TypeInstance::resolve(Loc, Scope*, Expression**, Type**, Dsymbol**) () #9 0x004b7936 in TypeInstance::toDsymbol(Scope*) () #10 0x00453db2 in AliasDeclaration::semantic(Scope*) () #11 0x00406623 in StaticIfDeclaration::semantic(Scope*) () #12 0x004fcd28 in TemplateInstance::semantic(Scope*, ArrayBaseExpression*) () #13 0x00458890 in Dsymbol::searchX(Loc, Scope*, Identifier*) () #14 0x004b7a54 in TypeIdentifier::toDsymbol(Scope*) () #15 0x00453db2 in AliasDeclaration::semantic(Scope*) () #16 0x004fcd28 in TemplateInstance::semantic(Scope*, ArrayBaseExpression*) () #17 0x004c3bba in TypeInstance::resolve(Loc, Scope*, Expression**, Type**, Ds ymbol**) () I'll try to narrow down the (multiple) constructs that cause this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7109] New: [CTFE] Error with slicing ref string
http://d.puremagic.com/issues/show_bug.cgi?id=7109 Summary: [CTFE] Error with slicing ref string Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: youx...@gmail.com --- Comment #0 from Hisayuki Mima youx...@gmail.com 2011-12-14 22:15:34 JST --- struct Struct{ string str; } void bar(ref string str){ str = str[0..0]; } static assert({ auto s = Struct(foo); bar(s.str); return true; }()); This code does't work. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7110] New: static opSlice opIndex functions don't work as template arguments
http://d.puremagic.com/issues/show_bug.cgi?id=7110 Summary: static opSlice opIndex functions don't work as template arguments Product: D Version: D1 D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin@gmail.com --- Comment #0 from Denis verylonglogin@gmail.com 2011-12-14 16:29:58 MSK --- --- struct S { } struct Call { static S opSlice() { return S(); } static S opIndex(size_t) { return S(); } } template Template(Args...) { static assert(is(typeof(Args[0]) == S)); } alias Template!(S()) A0; // passes alias Template!(Call.opSlice()) A1; // passes alias Template!(Call.opIndex(0)) A2; // passes alias Template!(Call[]) A3; // failes alias Template!(Call[0]) A4; // failes --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7110] static opSlice opIndex functions don't work as template arguments
http://d.puremagic.com/issues/show_bug.cgi?id=7110 Robert Clipsham rob...@octarineparrot.com changed: What|Removed |Added CC||rob...@octarineparrot.com --- Comment #1 from Robert Clipsham rob...@octarineparrot.com 2011-12-14 13:54:49 GMT --- I believe this is invalid - here Call[] is a dynamic array of Call, and Call[0] is a static array of Call, length zero. You can work around this using: alias Template!({ return Call[]; }()) A3; alias Template!({ return Call[0]; }()) A4; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7110] static opSlice opIndex functions don't work as template arguments
http://d.puremagic.com/issues/show_bug.cgi?id=7110 Denis verylonglogin@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #2 from Denis verylonglogin@gmail.com 2011-12-14 17:05:10 MSK --- Thanks! I'm completely wrong here. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7110] opSlice() opIndex functions works unstable as template arguments
http://d.puremagic.com/issues/show_bug.cgi?id=7110 Denis verylonglogin@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID | Summary|static opSlice opIndex|opSlice() opIndex |functions don't work as |functions works unstable as |template arguments |template arguments --- Comment #3 from Denis verylonglogin@gmail.com 2011-12-14 18:06:17 MSK --- And an easier workaround: --- alias Template!((Call[])) A3; // passes alias Template!((Call[0])) A4; // passes --- But isn't it strange? Looks like this workaround is a bug. It leads to things like this: --- struct S { int opSlice(int, int) const { return 0; } int opSlice() const { return 0; } int opIndex(int, int) const { return 0; } int opIndex(int) const { return 0; } } enum e = S(); template T(alias a) { } // or T(a...) alias T!( S ) T0; // passes alias T!((S)) T1; // passes alias T!( S()[0..0] ) A0; // passes alias T!( (e[0..0]) ) A1; // passes alias T!( e[0..0] ) A2; // passes alias T!( S()[0, 0] ) B0; // passes alias T!( (e[0, 0]) ) B1; // passes alias T!( e[0, 0] ) B2; // passes alias T!( S()[] ) C0; // passes alias T!( (e[]) ) C1; // passes alias T!( e[] ) C2; // fails: e is used as a type alias T!( S()[0] ) D0; // passes alias T!( (e[0]) ) D1; // passes alias T!( e[0] ) D2; // fails: e must be an array or pointer type, not S --- And the last error message looks wrong. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7108] ICE: TraitsExp::semantic(Scope*) 2.056 - 2.057 regression - segfault
http://d.puremagic.com/issues/show_bug.cgi?id=7108 --- Comment #1 from Kenji Hara k.hara...@gmail.com 2011-12-14 07:14:50 PST --- I found a null dereference bug in TraitsExp::semantic(). Following code kills dmd. static assert(!__traits(hasMember, int, x)); In your environment, can you get similar backtrace? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7108] ICE: TraitsExp::semantic(Scope*) 2.056 - 2.057 regression - segfault
http://d.puremagic.com/issues/show_bug.cgi?id=7108 --- Comment #3 from pelo dl...@chilon.net 2011-12-14 07:24:29 PST --- Back trace to your simplified case above: #0 0x00520227 in TraitsExp::semantic(Scope*) () (gdb) bt #0 0x00520227 in TraitsExp::semantic(Scope*) () #1 0x0047a1aa in NotExp::semantic(Scope*) () #2 0x00507115 in StaticAssert::semantic2(Scope*) () #3 0x004e4191 in StaticAssertStatement::semantic(Scope*) () #4 0x004ef9e4 in CompoundStatement::semantic(Scope*) () #5 0x0048f7e2 in FuncDeclaration::semantic3(Scope*) () #6 0x004b4290 in Module::semantic3() () #7 0x0040392c in main () Could be the same issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7108] ICE: TraitsExp::semantic(Scope*) 2.056 - 2.057 regression - segfault
http://d.puremagic.com/issues/show_bug.cgi?id=7108 --- Comment #2 from pelo dl...@chilon.net 2011-12-14 07:23:09 PST --- (In reply to comment #1) I found a null dereference bug in TraitsExp::semantic(). Following code kills dmd. static assert(!__traits(hasMember, int, x)); In your environment, can you get similar backtrace? Yes! Here is my code: int main(string argv[]) { static assert(! __traits(hasMember, int, x)); return 0; } I try to compile: % dmd yo.d zsh: segmentation fault (core dumped) dmd yo.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7108] ICE: TraitsExp::semantic(Scope*) 2.056 - 2.057 regression - segfault
http://d.puremagic.com/issues/show_bug.cgi?id=7108 --- Comment #4 from Kenji Hara k.hara...@gmail.com 2011-12-14 07:26:35 PST --- Thanks. I'll post a patch to fix it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7108] ICE: TraitsExp::semantic(Scope*) 2.056 - 2.057 regression - segfault
http://d.puremagic.com/issues/show_bug.cgi?id=7108 --- Comment #5 from pelo dl...@chilon.net 2011-12-14 07:30:41 PST --- (In reply to comment #4) Thanks. I'll post a patch to fix it. Thanks. I'll test your patch against my code when it's available. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7109] [CTFE] Error with slicing ref string
http://d.puremagic.com/issues/show_bug.cgi?id=7109 Don clugd...@yahoo.com.au changed: What|Removed |Added Keywords||wrong-code CC||clugd...@yahoo.com.au --- Comment #1 from Don clugd...@yahoo.com.au 2011-12-14 07:38:42 PST --- Related to bug 6934. It's fixed in this two-week old pull request: https://github.com/D-Programming-Language/dmd/pull/522 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6077] CTFE: Cannot append null array to null array.
http://d.puremagic.com/issues/show_bug.cgi?id=6077 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||destructiona...@gmail.com --- Comment #3 from Don clugd...@yahoo.com.au 2011-12-14 08:35:17 PST --- *** Issue 7046 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7046] CTFE: append null does nothing
http://d.puremagic.com/issues/show_bug.cgi?id=7046 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #8 from Don clugd...@yahoo.com.au 2011-12-14 08:35:17 PST --- This compiled on DMD2.053, but generated wrong code. It failed to compile on 2.054 to 2.056. Fixed 2.057 -- dup of bug 6077 *** This issue has been marked as a duplicate of issue 6077 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3541] Add -oq to dmd (use fully qualified module name as object filename)
http://d.puremagic.com/issues/show_bug.cgi?id=3541 --- Comment #11 from Walter Bright bugzi...@digitalmars.com 2011-12-14 11:13:12 PST --- See also https://github.com/D-Programming-Language/dmd/pull/169 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7111] New: New regex engine cannot match beginning of empty string
http://d.puremagic.com/issues/show_bug.cgi?id=7111 Summary: New regex engine cannot match beginning of empty string Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: revcompg...@gmail.com --- Comment #0 from Matt Peterson revcompg...@gmail.com 2011-12-14 12:36:15 PST --- import std.regex; void main(){ assert(!match(, regex(^)).empty); } --- Using regex(^, m) instead works correctly. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6934] [CTFE] can't use $ in a slice of an array passed by ref
http://d.puremagic.com/issues/show_bug.cgi?id=6934 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #3 from Walter Bright bugzi...@digitalmars.com 2011-12-14 16:56:46 PST --- https://github.com/D-Programming-Language/dmd/commit/746d98fb0daacbd6a9efab1da6aacd2d7b55b39f https://github.com/D-Programming-Language/dmd/commit/0051ed8ea86472083ed205a4857399d1f8defd71 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6964] Error message with __error: static assert(undefined+1)
http://d.puremagic.com/issues/show_bug.cgi?id=6964 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #1 from Walter Bright bugzi...@digitalmars.com 2011-12-14 16:57:11 PST --- https://github.com/D-Programming-Language/dmd/commit/746d98fb0daacbd6a9efab1da6aacd2d7b55b39f https://github.com/D-Programming-Language/dmd/commit/0051ed8ea86472083ed205a4857399d1f8defd71 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6985] [CTFE] Non-constant case expressions can't be interpreted
http://d.puremagic.com/issues/show_bug.cgi?id=6985 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #1 from Walter Bright bugzi...@digitalmars.com 2011-12-14 16:57:29 PST --- https://github.com/D-Programming-Language/dmd/commit/746d98fb0daacbd6a9efab1da6aacd2d7b55b39f https://github.com/D-Programming-Language/dmd/commit/0051ed8ea86472083ed205a4857399d1f8defd71 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3187] Nested foreach over opApply doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=3187 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #4 from Walter Bright bugzi...@digitalmars.com 2011-12-14 18:42:37 PST --- https://github.com/D-Programming-Language/dmd/commit/514e1fa711a5774bf7c393772cd8489b2af2534e https://github.com/D-Programming-Language/dmd/commit/d124949381400582b5d6a6c5015bf42483afa54d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7108] ICE: TraitsExp::semantic(Scope*) 2.056 - 2.057 regression - segfault
http://d.puremagic.com/issues/show_bug.cgi?id=7108 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||ice-on-valid-code, patch Platform|x86_64 |All OS/Version|Linux |All --- Comment #6 from Kenji Hara k.hara...@gmail.com 2011-12-14 21:17:07 PST --- https://github.com/D-Programming-Language/dmd/pull/560 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6255] Add support for different base conversions in std.conv
http://d.puremagic.com/issues/show_bug.cgi?id=6255 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch Platform|Other |All OS/Version|Windows |All --- Comment #4 from Kenji Hara k.hara...@gmail.com 2011-12-14 22:44:52 PST --- https://github.com/D-Programming-Language/phobos/pull/372 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7109] [CTFE] Error with slicing ref string
http://d.puremagic.com/issues/show_bug.cgi?id=7109 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #2 from Don clugd...@yahoo.com.au 2011-12-14 23:04:33 PST --- *** This issue has been marked as a duplicate of issue 6934 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6933] Segfault(declaration.c) using struct with destructor in CTFE
http://d.puremagic.com/issues/show_bug.cgi?id=6933 Don clugd...@yahoo.com.au changed: What|Removed |Added Keywords||rejects-valid --- Comment #1 from Don clugd...@yahoo.com.au 2011-12-14 23:07:24 PST --- In these commits: https://github.com/D-Programming-Language/dmd/commit/746d98fb0daacbd6a9efab1da6aacd2d7b55b39f https://github.com/D-Programming-Language/dmd/commit/0051ed8ea86472083ed205a4857399d1f8defd71 it's mitigated from a segfault to an rejects-valid with line number. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---