Re: [PR] Fix Infinite Loop in arm_dcache.c [nuttx]

2024-11-07 Thread via GitHub
xiaoxiang781216 commented on PR #14490: URL: https://github.com/apache/nuttx/pull/14490#issuecomment-2462923143 @PwnVerse please fix the build error, but reconsider your assumption: ``` Infinite Loop can happen since ways is assigned to an int32_t tmpways. This can cause infinite loop

Re: [PR] Fix Infinite Loop in arm_dcache.c [nuttx]

2024-10-24 Thread via GitHub
xiaoxiang781216 commented on code in PR #14490: URL: https://github.com/apache/nuttx/pull/14490#discussion_r1815499899 ## arch/arm/src/armv7-m/arm_cache.c: ## @@ -529,7 +529,7 @@ void up_enable_dcache(void) ARM_DSB(); do { - int32_t tmpways = ways; + uint32_

Re: [PR] Fix Infinite Loop in arm_dcache.c [nuttx]

2024-10-24 Thread via GitHub
PwnVerse commented on code in PR #14490: URL: https://github.com/apache/nuttx/pull/14490#discussion_r1815210262 ## arch/arm/src/armv7-m/arm_cache.c: ## @@ -529,7 +529,7 @@ void up_enable_dcache(void) ARM_DSB(); do { - int32_t tmpways = ways; + uint32_t tmpwa

[PR] Fix Infinite Loop in arm_dcache.c [nuttx]

2024-10-24 Thread via GitHub
PwnVerse opened a new pull request, #14490: URL: https://github.com/apache/nuttx/pull/14490 Infinite Loop can happen since `ways` is assigned to an `int32_t tmpways`. This can cause infinite loop if `ways` gets a sufficiently large integer. ```c void up_enable_dcache(void) {

Re: [PR] Fix Infinite Loop in arm_dcache.c [nuttx]

2024-10-23 Thread via GitHub
xiaoxiang781216 commented on code in PR #14490: URL: https://github.com/apache/nuttx/pull/14490#discussion_r1814332144 ## arch/arm/src/armv7-m/arm_cache.c: ## @@ -529,7 +529,7 @@ void up_enable_dcache(void) ARM_DSB(); do { - int32_t tmpways = ways; + uint32_