digitalmars.D.bugs - [Issue 10380] New: Wrong code using associative array as key type in associative array
- d-bugmail puremagic.com (22/22) Jun 16 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10380
- d-bugmail puremagic.com (8/8) Jun 16 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10380
- d-bugmail puremagic.com (10/10) Jun 22 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10380
- d-bugmail puremagic.com (7/7) Jul 08 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10380
- d-bugmail puremagic.com (8/10) Jul 08 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10380
- d-bugmail puremagic.com (8/8) Jul 09 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10380
- d-bugmail puremagic.com (6/6) Jul 09 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10380
- d-bugmail puremagic.com (8/8) Jul 09 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10380
- d-bugmail puremagic.com (8/8) Jul 27 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10380
- d-bugmail puremagic.com (10/14) Jul 27 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10380
http://d.puremagic.com/issues/show_bug.cgi?id=10380 Summary: Wrong code using associative array as key type in associative array Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: critical Priority: P2 Component: druntime AssignedTo: nobody puremagic.com ReportedBy: verylonglogin.reg gmail.com 18:10:44 MSD --- `TypeInfo_AssociativeArray` don't override `equals` and `compare` so one get mess if an associative array is used as a key type in an associative array. E.g. `keyti.compare` in `_aaEqual` calls `TypeInfo`'s `compare` which always return `0`. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 16 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10380 18:57:46 MSD --- Override `equals` in `TypeInfo_AssociativeArray`: https://github.com/D-Programming-Language/druntime/pull/523 Currently there is no comparison functions for AA-s, see Issue 10381. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 16 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10380 Commit pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/1c6603e9c0f6081d12fa1cd898bc77db7769914a Override `equals` in `TypeInfo_AssociativeArray`. Fixes part of Issue 10380. Issue URL: http://d.puremagic.com/issues/show_bug.cgi?id=10380 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 22 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10380 Do you have any failing unittest for this bug? I can't seem to reproduce the problem in git HEAD. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 08 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10380 10:49:34 MSD ---Do you have any failing unittest for this bug? I can't seem to reproduce the problem in git HEAD.It's hard to create unittests as the problem will appear iff we will have to unequal AA-s with equal hashes. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 08 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10380 I have a fix for this, but I need to somehow make a unittest to verify that it actually fixes the problem. Maybe we can somehow craft a unittest using typeid(aa).compare? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 09 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10380 https://github.com/D-Programming-Language/druntime/pull/544 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 09 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10380 I figured out a way to test for broken .compare: make an AA key type that overrides both opEquals and opCmp, and deliberately have wrong implementation for opCmp. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 09 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10380 Hi Denis, Can you check this bug again? Recently Kenji & I made some fixes in this area, and this may be fixed now. Could you verify? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 27 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10380 18:24:07 MSD ---Hi Denis, Can you check this bug again? Recently Kenji & I made some fixes in this area, and this may be fixed now. Could you verify?Currently `equals` is overriden in `TypeInfo_AssociativeArray` as druntime pull 523 is merged. But it doesn't changes this issue situation as `equals` isn't used. The issue will be fixed if e.g. this pull will be merged: https://github.com/D-Programming-Language/druntime/pull/522 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 27 2013