1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

LibCoredump: Copy out the FooInfo structs to an aligned address

We were handing out unaligned pointers to these, which made UBSAN super
mad, copy them out to avoid that.
This commit is contained in:
Ali Mohammad Pur 2022-01-27 14:20:10 +03:30 committed by Linus Groh
parent e0db9cb876
commit e72521f286
5 changed files with 56 additions and 22 deletions

View file

@ -153,7 +153,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
Vector<String> memory_regions;
coredump->for_each_memory_region_info([&](auto& memory_region_info) {
memory_regions.append(String::formatted("{:p} - {:p}: {}", memory_region_info.region_start, memory_region_info.region_end, (const char*)memory_region_info.region_name));
memory_regions.append(String::formatted("{:p} - {:p}: {}", memory_region_info.region_start, memory_region_info.region_end, memory_region_info.region_name));
return IterationDecision::Continue;
});