Thread overview | |||||
---|---|---|---|---|---|
|
June 24, 2012 [Issue 8292] New: segfaults on out contract | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=8292 Summary: segfaults on out contract Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: tobias@pankrath.net --- Comment #0 from Tobias Pankrath <tobias@pankrath.net> 2012-06-24 12:24:26 PDT --- dmd segfault.d segfaults, if segfault.d contains -- module sat; import std.container; struct Literal { Var var; bool sign; } struct Var { size_t idx; alias idx this; } struct Clause { Literal[] literals; alias literals this; } struct Watchers { Array!(Array!(Clause*)*) watchlist; alias watchlist this; Array!(Clause*)* opIndex(Literal lit) { return watchlist[index(lit)]; } size_t index(Literal lit) { return lit.var + lit.sign; } void watch(Literal lit, Clause* cls) out { assert((*this[lit]).length > 0); } body { } } void main() {} -- It does not segfault if the out-contract is not included. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 25, 2012 [Issue 8292] segfaults on out contract | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tobias Pankrath | http://d.puremagic.com/issues/show_bug.cgi?id=8292 --- Comment #1 from Tobias Pankrath <tobias@pankrath.net> 2012-06-25 13:45:06 PDT --- Using arrays instead of Array!T it segfaults if this[lit] is used in watch. If I write _watchlist[lit] instead it works -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 07, 2013 [Issue 8292] segfaults on out contract | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tobias Pankrath | http://d.puremagic.com/issues/show_bug.cgi?id=8292 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |WORKSFORME --- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2013-10-06 23:23:41 PDT --- This does not segfault, and runs successfully, on dmd 2.064 head. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation