qemu/disas/libvixl/vixl/invalset.h: 2 * sanity check after use ?

Bug #1533141 reported by dcb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Unassigned

Bug Description

1.

[qemu/disas/libvixl/vixl/invalset.h:442]: (style) Array index 'low' is used before limits check.

 while (!IsValid(elements[low]) && (low < high)) ++low;

2.

[qemu/disas/libvixl/vixl/invalset.h:450]: (style) Array index 'middle' is used before limits check.

  while (!IsValid(elements[middle]) && (middle < high - 1)) ++middle;

Also, binary search is a standard C library routine. Suggest use.

Revision history for this message
Peter Maydell (pmaydell) wrote :

libvixl is not part of QEMU proper, but is an upstream library which we use (as documented in disas/libvixl/README). If you want to suggest coding style changes to it I would recommend reporting them to the upstream project: https://github.com/armvixl/vixl .

QEMU just takes the most recent release of the library and includes it in our repo without making any changes to the code if we can avoid it.

Changed in qemu:
status: New → Invalid
Revision history for this message
dcb (dcb314) wrote :

>If you want to suggest coding style changes to it I would recommend reporting them to the upstream project:

Thanks. Done here:

https://github.com/armvixl/vixl/issues

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.