stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-783) [HP aCC 6.16] warning #20206-D: Out of bound access in 25.random.shuffle.cpp
Date Wed, 09 Apr 2008 22:02:05 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587397#action_12587397
] 

Travis Vitek commented on STDCXX-783:
-------------------------------------

I find it interesting that the warning doesn't show up in an 11S build, but it does show up
for a 12d build.

{noformat}
$ gmake 25.random.shuffle.o
aCC -c  -D_RWSTDDEBUG -I/amd/devco/vitek/stdcxx/trunk/include -I/build/vitek/11S/include -I/amd/devco/vitek/stdcxx/trunk/tests/include
\
    -AA -g +d +DD64 +w \
    +W392,655,684,818,819,849 \
    +W2193,2236,2261,2340,2401,2487 \
    +W4227,4229,4231,4235,4237,4249 \
    +W4255,4272,4284,4285,4286,4296,4297 \
    +W3348 \
    /amd/devco/vitek/stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp
"/amd/devco/vitek/stdcxx/trunk/include/algorithm.cc", line 612: remark #4271-D: 
          type conversion may lose sign
              const _DiffT __rndoff (__rand (__limit));
                                             ^
          detected during instantiation of "void
                    std::random_shuffle(_RandomAccessIter, _RandomAccessIter,
                    _RandomNumberGenerator &) [with
                    _RandomAccessIter=RandomAccessIter<assign<base<2>>>,
                    _RandomNumberGenerator=func<const size_t>]" at line 49 of
                    "/amd/devco/vitek/stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp"
{noformat}

{noformat}
gmake 25.random.shuffle.o
aCC -c -mt -I/amd/devco/vitek/stdcxx/trunk/include -I/build/vitek/12d/include -I/amd/devco/vitek/stdcxx/trunk/tests/include
\
    -AA +O2 +w \
    +W392,655,684,818,819,849 \
    +W2193,2236,2261,2340,2401,2487 \
    +W4227,4229,4231,4235,4237,4249 \
    +W4255,4272,4284,4285,4286,4296,4297 \
    +W3348 \
    /amd/devco/vitek/stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp
"/amd/devco/vitek/stdcxx/trunk/include/algorithm.cc", line 612: remark #4271-D: 
          type conversion may lose sign
              const _DiffT __rndoff (__rand (__limit));
                                             ^
          detected during instantiation of "void
                    std::random_shuffle(_RandomAccessIter, _RandomAccessIter,
                    _RandomNumberGenerator &) [with
                    _RandomAccessIter=RandomAccessIter<assign<base<2>>>,
                    _RandomNumberGenerator=func<const size_t>]" at line 49 of
                    "/amd/devco/vitek/stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp"

"/amd/devco/vitek/stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp", line 317, procedure
test_random_shuffle: warning #20206-D: 
          Out of bound access (In expression "&array[(int)i]", array "array"
          [/amd/devco/vitek/stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp
          :237] (type: int [256]) has element range [0 .. 255], reading
          element range [0 .. 256].)
{noformat}

> [HP aCC 6.16] warning #20206-D: Out of bound access in 25.random.shuffle.cpp
> ----------------------------------------------------------------------------
>
>                 Key: STDCXX-783
>                 URL: https://issues.apache.org/jira/browse/STDCXX-783
>             Project: C++ Standard Library
>          Issue Type: Sub-task
>          Components: Tests
>    Affects Versions: 4.2.0
>         Environment: $ uname -sr && aCC -V
> HP-UX B.11.31
> aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]
>            Reporter: Scott (Yu) Zhong
>            Assignee: Travis Vitek
>             Fix For: 4.2.1
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> aCC -c    -mt -I/amd/devco/scottz/stdcxx/4.2.x/include -I/build/scottz/12d/include -I/amd/devco/scottz/stdcxx/4.2.x/tests/include
 -AA  +O2  +DD64
>  +w +W392 +W655 +W684 +W818 +W819 +W849 +W2193 +W2236 +W2261 +W2340 +W2401 +W2487 +W4227
+W4229 +W4231 +W4235 +W4237 +W4249 +W4255 +W4272 +W4284 +W4285 +W4286   /amd/devco/scottz/stdcxx/4.2.x/tests/algorithms/25.random.shuffle.cpp
> "/amd/devco/scottz/stdcxx/4.2.x/tests/algorithms/25.random.shuffle.cpp", line 317, procedure
test_random_shuffle: warning #20206-D: Out of bound access (In expression "&array[(long
long)i]", array "array" [/amd/devco/scottz/stdcxx/4.2.x/tests/algorithms/25.random.shuffle.cpp:237]
(type: int [256]) has element range [0 .. 255], reading element range [0 .. 256].)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message