On 06/08/2019 15:14, Ravindra Kumar Meena wrote:
    There is another bug here:

    size_t api_id = ( ( cctx->thread_id_name[ item->cpu ].thread_id >> 24 )
    & 0x7 );

    Please make sure that you don't have an out of bounds access. Check the
    dimensions of your array against the values you get from the line above.

I think this can be the right way to check bound access.
https://github.com/rmeena840/rtems-tools/commit/81bf2a9b9e57e7911d519c4719c5126e29a7adbe

No, the API classes are 1, 2, and 3. The indices into the table must be 0, 1, and 2. Don't add asserts in this path. Ignore items which have unexpected values.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to