mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 23:28:29 +08:00
coredump: fix bug that memsegs got invalid value
for (; cinfo.regions[memsegs].start <
cinfo.regions[memsegs].end; memsegs++);
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
This commit is contained in:
@@ -836,6 +836,8 @@ int coredump_add_memory_region(FAR const void *ptr, size_t size)
|
||||
region[count - 1].end = (uintptr_t)ptr + size;
|
||||
region[count - 1].flags = 0;
|
||||
region[count].start = 0;
|
||||
region[count].end = 0;
|
||||
region[count].flags = 0;
|
||||
|
||||
g_regions = region;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user