BIND 10 #865: Accessing first element of empty vector

BIND 10 Development do-not-reply at isc.org
Tue Apr 26 11:27:53 UTC 2011


#865: Accessing first element of empty vector
-------------------------------------+-------------------------------------
            Reporter:  vorner        |                        Owner:
                Type:  defect        |                       Status:  new
            Priority:  major         |                    Milestone:  New
           Component:  Unclassified  |  Tasks
           Sensitive:  0             |                     Keywords:
         Sub-Project:  DNS           |              Defect Severity:  N/A
Estimated Difficulty:  0             |  Feature Depending on Ticket:
         Total Hours:  0             |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
 If built with `_GLIBCXX_DEBUG`, tests fail with:

 {{{
 [ RUN      ] Base64Test.decode
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/include/g++-v4/debug/vector:272:
     error: attempt to subscript container with out-of-bounds index 0, but
     container only holds 0 elements.

 [ RUN      ] Rdata_Unknown_Test.createFromText
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/include/g++-v4/debug/vector:272:
     error: attempt to subscript container with out-of-bounds index 0, but
     container only holds 0 elements.
 }}}

 I suspect this might be some kind of this code:

 {{{#!cpp
 vector<uint8_t> v;
 void *ptr = &v[0];
 }}}

 Maybe these two errors are because of the same piece of code, so they are
 in single ticket.

-- 
Ticket URL: <http://bind10.isc.org/ticket/865>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list