Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-9977

Vector pointer array access operator in host emulation causes memory use after free

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • Code Generation Tools
    • CODEGEN-8075
    • Hide
      C7000_1.4.0.LTS
      C7000_2.1.2.LTS
      C7000_2.0.1.STS
      C7000_2.1.0.LTS
      C7000_2.0.0.STS
      Show
      C7000_1.4.0.LTS C7000_2.1.2.LTS C7000_2.0.1.STS C7000_2.1.0.LTS C7000_2.0.0.STS
    • C7000_3.0.0.STS
    • default
    • Do not use the array access operator with vector pointer types. Instead of "int16 x = vec_ptr[i];", use "int16 x = *(vec_ptr + i)".

      This issue has been resolved on the C7000 3.0.x releases and higher. It has not been resolved on the C7000 2.1.x releases and lower.

      Code that uses the array access operator on vector pointers will cause a use after free error in host emulation, potentially leading to a segmentation fault. If vec_ptr is an int16_ptr or similar, then "int16 x = vec_ptr[i];" will result in reading memory that has been freed.

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: