www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6634] New: std.path.globMatch throws wrong assertion

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6634

           Summary: std.path.globMatch throws wrong assertion
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: r.sagitario gmx.de



PDT ---
import std.path;

void main()
{
    globMatch("a.di", "*.d");
}

asserts with

core.exception.AssertError std.path(2239): Assertion failure

The same happens when using fnmatch instead of globMatch. The problem is a
wrong assert at the end of both functions:
    assert(ni >= path.length);

The wrong assert has been there before, but was actually never executed because
it was built into the runtime library in release mode only. Now that the
functions are templates, code generation moved to the user project, so the
asserts can actually trigger.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 09 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6634


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |braddr puremagic.com



---
Care to turn this into a pull request with a unittest?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 17 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6634




PDT ---
https://github.com/D-Programming-Language/phobos/pull/267

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 19 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6634


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



https://github.com/D-Programming-Language/phobos/commit/2399de49d8ffee3c8246b83561cbfc9c3ccd3c90

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 08 2011