www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10897] New: btc, btr and bts shouldn't be safe

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

           Summary: btc, btr and bts shouldn't be safe
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody puremagic.com
        ReportedBy: monarchdodra gmail.com


--- Comment #0 from monarchdodra gmail.com 2013-08-25 23:55:39 PDT ---
As the title implies, their sig is:
"pure nothrow  safe int btc(size_t* p, size_t bitnum);"

The argument "bitnum" clearly implies array indexing. In this case, there is no
bounds checking, which means the function can't be safe.

Furthermore, they access data in an underhand fashion, potentially corrupting
anything that is passed to them.

Strangely enough, the functions "bt", *is*  system.

In any case, they cannot be made  safe in any way shape or form.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 25 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10897



--- Comment #1 from monarchdodra gmail.com 2013-08-25 23:58:41 PDT ---
Link to the original post:
http://forum.dlang.org/thread/51BC494E.5060408 kyllingen.net

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 25 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10897



--- Comment #2 from monarchdodra gmail.com 2013-08-28 13:52:53 PDT ---
https://github.com/D-Programming-Language/druntime/pull/596

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 28 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10897



--- Comment #3 from github-bugzilla puremagic.com 2013-09-07 13:17:39 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/849629c8d251a9806394ed1e1ee525c05cd867cb
Fix Issue 10897 - btc, btr and bts shouldn't be safe

https://github.com/D-Programming-Language/dmd/commit/c7d4c376be3fc041f2f6bb29f37889ae05b7a3ea
Merge pull request #2503 from monarchdodra/bt

Fix Issue 10897 - btc, btr and bts shouldn't be safe

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



--- Comment #4 from github-bugzilla puremagic.com 2013-09-07 13:17:43 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/2931e8cb9aac2b433a617bbcdc10bcb6da51a70a
Fix Issue 10897 - btc, btr and bts shouldn't be safe

https://github.com/D-Programming-Language/druntime/commit/557b946f1256e725c20e72c96ea5dbbb62ff095f
Merge pull request #596 from monarchdodra/bt

Fix Issue 10897 - btc, btr and bts shouldn't be safe

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 07 2013