[EXT_EP-9623] Compiler loses conversion to size_t in length argument to memcpy Created: 03/Feb/20 Updated: 03/Aug/22 Resolved: 17/Mar/20 |
|
Status: | Fixed |
Project: | Embedded Software & Tools |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Medium |
Reporter: | TI User | Assignee: | TI User |
Resolution: | Fixed | Votes: | 0 |
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Product: | Code Generation Tools |
Internal ID: | CODEGEN-7146 |
Forum URL: | https://e2e.ti.com/support/tools/ccs/f/81/t/876848 |
Found In Release: | 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 |
Fix In Release: | 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 |
Affected Platform/Device: | default |
Workaround: | Use -Ooff to turn off the optimizer, or ensure that only size_t variables are used as the count argument to memcpy(). |
Release Notes: | 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. |