An empty drvector fails to extend its array when a value is set at index is zero
A bug arises when an empty vector is initialised and a value is then set at index 0. The following is a simple test case:
drvector_init(vector, 0, false, NULL);
drvector_set_entry(vector, 0, (void *) 777);
drvector attempts to increase the size of the array, but passes a size of 0 to dr_global_alloc, hence causing a failure.
<Application /home/john/main_dr/dynamorio/build/suite/tests/bin/simple_app (5479). Internal Error: DynamoRIO debug check failure: /home/john/main_dr/dynamorio/core/heap.c:4104 size > 0