Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
June 04, 2012 [Issue 8195] New: Segfault when comparing a VariantN to a non-variant type which it holds | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=8195 Summary: Segfault when comparing a VariantN to a non-variant type which it holds Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: jmdavisProg@gmx.com --- Comment #0 from Jonathan M Davis <jmdavisProg@gmx.com> 2012-06-03 21:54:52 PDT --- This code: import std.typetuple; import std.variant; struct S { int a; long b; string c; real d; bool e; } private alias TypeTuple!(string, int, S) Types; alias VariantN!(maxSize!Types, Types) MyVariant; void main() { auto v = MyVariant(S.init); assert(v == S.init); } segfaults when it's run. If you change the assertion to assert(v == MyVariant(S.init)); then it runs just fine. This appears to only happen when a struct whose size is >= Variant.sizeof is in the list of accepted types. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 04, 2012 [Issue 8195] Segfault when comparing a VariantN to a non-variant type which it holds | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | http://d.puremagic.com/issues/show_bug.cgi?id=8195 --- Comment #1 from Jonathan M Davis <jmdavisProg@gmx.com> 2012-06-03 22:11:29 PDT --- https://github.com/D-Programming-Language/phobos/pull/618 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 09, 2012 [Issue 8195] Segfault when comparing a VariantN to a non-variant type which it holds | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | http://d.puremagic.com/issues/show_bug.cgi?id=8195 --- Comment #2 from github-bugzilla@puremagic.com 2012-06-09 02:32:41 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/52b51cf2dd211e2a2ac8315a2f69f90023d8e595 Fix for issue# 8195. https://github.com/D-Programming-Language/phobos/commit/7ad1e29d2f601588972a96d7b580511d6597dd6d Merge pull request #618 from jmdavis/8195 Fix for issue# 8195. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 09, 2012 [Issue 8195] Segfault when comparing a VariantN to a non-variant type which it holds | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | http://d.puremagic.com/issues/show_bug.cgi?id=8195 --- Comment #3 from github-bugzilla@puremagic.com 2012-06-09 02:35:10 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/331c6a24c3f7287ceb7dfd38d2d888eae94ad020 Updated changelog for issue# 8195. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 09, 2012 [Issue 8195] Segfault when comparing a VariantN to a non-variant type which it holds | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | http://d.puremagic.com/issues/show_bug.cgi?id=8195 Jonathan M Davis <jmdavisProg@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- 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