You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "fxysunshine (via GitHub)" <gi...@apache.org> on 2023/05/04 13:48:04 UTC

[GitHub] [nuttx] fxysunshine opened a new pull request, #9190: arch/sim: do not free memory of zero-length reallocation

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

   
   ## Summary
   Follow the change: https://github.com/apache/nuttx/pull/9151, if MM_CUSTOMIZE_MANAGER is enabled, heap manager allocator in host is used, for example in sim:asan build.
   
   malloc and related allocation APIs will fall back to host_realloc. Do not free memory of zero-length reallocation, so memory allocations return valid pointer when request zero size in all sim build.
   
   call stack:
       malloc()              (mm/umm_heap/umm_malloc.c)
       mm_malloc()      (arch/sim/src/sim/sim_heap.c)
       mm_realloc()      (arch/sim/src/sim/sim_heap.c)
       host_realloc()     (arch/sim/src/sim/posix/sim_hostmemory.c)
       host_memalign()  (arch/sim/src/sim/posix/sim_hostmemory.c)
   
   ## Impact
   Improve POSIX compliance of malloc in sim:asan related build.
   
   ## Testing
   passing CI. 
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #9190: arch/sim: do not free memory of zero-length reallocation

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #9190:
URL: https://github.com/apache/nuttx/pull/9190


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org