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

Compiler loses conversion to size_t in length argument to memcpy

    XMLWordPrintable

Details

    • Bug
    • Status: Fixed
    • Medium
    • Resolution: Fixed
    • Code Generation Tools
    • CODEGEN-7146
    • Hide
      C6000_8.2.0
      C2000_18.1.0.LTS
      C6000_8.3.0
      MSP430_20.2.0.LTS
      ARM_18.12.0.LTS
      PRU_2.3.0
      ARP32_1.1.0*
      ARM_20.2.0.LTS
      C2000_20.2.0.LTS
      ARM_18.1.0.LTS
      MSP430_18.1.0.LTS
      PRU_2.4.0*
      C7000_2.0.0.STS
      MSP430_18.12.0.LTS
      C2000_18.12.0.LTS
      Show
      C6000_8.2.0 C2000_18.1.0.LTS C6000_8.3.0 MSP430_20.2.0.LTS ARM_18.12.0.LTS PRU_2.3.0 ARP32_1.1.0* ARM_20.2.0.LTS C2000_20.2.0.LTS ARM_18.1.0.LTS MSP430_18.1.0.LTS PRU_2.4.0* C7000_2.0.0.STS MSP430_18.12.0.LTS C2000_18.12.0.LTS
    • Hide
      C2000_18.12.6.LTS
      MSP430_20.2.0.LTS
      MSP430_18.1.8.LTS
      ARP32_1.1.0*
      ARM_20.2.0.LTS
      C2000_20.2.0.LTS
      PRU_2.4.0*
      ARM_18.1.8.LTS
      C7000_2.0.0.STS
      C2000_18.1.8.LTS
      PRU_2.3.4*
      MSP430_18.12.6.LTS
      C6000_8.3.7
      C6000_8.2.9
      ARM_18.12.6.LTS
      Show
      C2000_18.12.6.LTS MSP430_20.2.0.LTS MSP430_18.1.8.LTS ARP32_1.1.0* ARM_20.2.0.LTS C2000_20.2.0.LTS PRU_2.4.0* ARM_18.1.8.LTS C7000_2.0.0.STS C2000_18.1.8.LTS PRU_2.3.4* MSP430_18.12.6.LTS C6000_8.3.7 C6000_8.2.9 ARM_18.12.6.LTS
    • default
    • Use -Ooff to turn off the optimizer, or ensure that only size_t variables are used as the count argument to memcpy().
    • Calls to memcpy which use an expression of an integer type smaller than size_t for the length argument may fail to zero-extend the value to size_t, which may result in the length value seen by the memcpy function to be garbage.

    Description

      Calls to memcpy which use an expression of an integer type smaller than size_t for the length argument may fail to sign- or zero-extend the value to size_t, which may result in the length value seen by the memcpy function to be garbage.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: