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

Volatile packed bit-field should be read as packed type, not declared type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-7796
    • Hide
      C7000_1.4.0.LTS
      C6000_8.2.0
      C6000_8.3.0
      MSP430_20.2.0.LTS
      ARP32_1.0.0
      MSP430_20.8.0.STS
      C2000_20.8.0.STS
      PRU_2.3.0
      ARM_20.2.0.LTS
      C2000_20.2.0.LTS
      Show
      C7000_1.4.0.LTS C6000_8.2.0 C6000_8.3.0 MSP430_20.2.0.LTS ARP32_1.0.0 MSP430_20.8.0.STS C2000_20.8.0.STS PRU_2.3.0 ARM_20.2.0.LTS C2000_20.2.0.LTS
    • Hide
      MSP430_18.12.7.LTS
      C7000_1.4.1.LTS*
      C6000_8.2.10*
      C2000_18.12.7.LTS
      C6000_8.3.9*
      C2000_20.2.3.LTS*
      PRU_2.3.4*
      ARM_20.2.3.LTS*
      ARM_18.12.7.LTS
      MSP430_20.2.3.LTS*
      Show
      MSP430_18.12.7.LTS C7000_1.4.1.LTS* C6000_8.2.10* C2000_18.12.7.LTS C6000_8.3.9* C2000_20.2.3.LTS* PRU_2.3.4* ARM_20.2.3.LTS* ARM_18.12.7.LTS MSP430_20.2.3.LTS*
    • default

      When using the attribute "packed" on a bit-field, or on a struct containing a bit-field, the compiler will pick the smallest container size possible to store the bit-field, overriding the EABI requirement that the container type will be the same as the declared type. This bug causes the compiler to try to use the declared type anyway when the packed bit-field is also volatile, or if the containing struct is volatile. This would cause a memory access beyond the size of the actual container, and could result in a memory access beyond the bounds of defined memory.

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

              Created:
              Updated:
              Resolved: