anchao opened a new pull request, #21063:
URL: https://github.com/apache/nuttx/pull/21063

   ## Summary                                                                   
   
                                                                                
   
   Fix the backtrace metadata iterator for mempool interrupt pools.             
   
                                                                                
   
   When walking the interrupt pool, the previous code cast `pool->ibase` to     
   
   `struct mempool_backtrace_s *` before adding byte offsets. That made the     
   
   pointer arithmetic scale by `sizeof(struct mempool_backtrace_s)` instead of  
   
   bytes, so the iterator could visit the wrong metadata address for each 
block.   
                                                                                
   
   This change keeps the offset calculation byte-based and only casts the final 
   
   computed address to `struct mempool_backtrace_s *`.                          
   
                                                                                
   
   ## Impact                                                                    
   
                                                                                
   
   This fixes mempool backtrace walking for interrupt pools when                
   
   `CONFIG_MM_BACKTRACE >= 0`.                                                  
   
                                                                                
   
   Expected impact:                                                             
   
                                                                                
   
   - corrects interrupt-pool backtrace metadata lookup                          
   
   - improves accuracy of mempool task accounting and memory dump paths that 
walk  
     mempool backtrace metadata                                                 
   
   - does not change normal allocation/free behavior                            
   
   - no API, ABI, build-system, documentation, or security impact is expected   
   
   
   ## Testing
   
   sim/nsh


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to