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

Incrementing a volatile bit-field leads to corrupted code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • Code Generation Tools
    • CODEGEN-8640
    • Hide
      C7000_1.4.0.LTS
      C6000_8.2.0
      C6000_8.3.0
      MSP430_20.2.0.LTS
      ARM_18.12.0.LTS
      MSP430_18.12.0.LTS
      PRU_2.3.0
      ARM_20.2.0.LTS
      C2000_18.12.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 ARM_18.12.0.LTS MSP430_18.12.0.LTS PRU_2.3.0 ARM_20.2.0.LTS C2000_18.12.0.LTS C2000_20.2.0.LTS
    • Hide
      ARM_18.12.8.LTS*
      MSP430_18.12.8.LTS*
      MSP430_20.2.5.LTS*
      C6000_8.3.9*
      ARM_20.2.5.LTS*
      C2000_20.2.5.LTS*
      PRU_2.3.4*
      C7000_1.4.2.LTS*
      C2000_18.12.8.LTS*
      Show
      ARM_18.12.8.LTS* MSP430_18.12.8.LTS* MSP430_20.2.5.LTS* C6000_8.3.9* ARM_20.2.5.LTS* C2000_20.2.5.LTS* PRU_2.3.4* C7000_1.4.2.LTS* C2000_18.12.8.LTS*
    • default

      Code with a volatile bit-field that gets auto-incremented triggered a bug which corrupted the expression, leading to an incorrect result. For MSP430, for the MSPX architecture, this led to an unusual symptom. The compiler was confused by the corrupted tree, leading to a call to an MSP helper function which is not available in the MSPX RTS library. It is suspected that this bug can occur for the other TI compiler targets, but so far the problem seems benign on the other targets. This bug seems to only happen when the bit-field is volatile. A bit-field is volatile if it is explicitly volatile, or its containing struct is volatile, recursively.

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

              Created:
              Updated:
              Resolved: