Summary: AA ushort[dchar] byValue range is corrupted on x86_64
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD

--- Comment #0 from Dmitry Olshansky <> 2012-08-24 
14:00:21 PDT ---
The following sample outlines the problem:

void main(){
    ushort[dchar] simpleIndices = ['A':437];
    assert(simpleIndices['A'] == 437);
    assert(simpleIndices.byKey.front == 'A');
    assert(simpleIndices.byValue.front == 437); // this fails on x64
    //assert(simpleIndices.byValue.front == 0); //and this passes on x64 WTF??!

compiled with -m32 it passes
with -m64 it fails and instead the value is 0. 
Looking through my corrupted data in the wild I assume it may as well be
something else then 0 too. 

Tested both with latest git and vanila 2.060 on OS Linux x64 & Win32.

There is a workaround of using .values which does allocate an array of values.
Still I consider it critical as corrupted value bug is usually hard to spot and
narrow down.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to