mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 20:33:10 +00:00
Kernel: Handle string format errors in KCOVInstance :^)
This commit is contained in:
parent
a5cec06135
commit
a0e59099fc
|
@ -29,8 +29,9 @@ ErrorOr<void> KCOVInstance::buffer_allocate(size_t buffer_size_in_entries)
|
|||
// backed by the same vmobject
|
||||
m_vmobject = TRY(Memory::AnonymousVMObject::try_create_with_size(m_buffer_size_in_bytes, AllocationStrategy::AllocateNow));
|
||||
|
||||
auto region_name = TRY(KString::formatted("kcov_{}", m_pid));
|
||||
m_kernel_region = TRY(MM.allocate_kernel_region_with_vmobject(
|
||||
*m_vmobject, m_buffer_size_in_bytes, String::formatted("kcov_{}", m_pid),
|
||||
*m_vmobject, m_buffer_size_in_bytes, region_name->view(),
|
||||
Memory::Region::Access::ReadWrite));
|
||||
|
||||
m_buffer = (u64*)m_kernel_region->vaddr().as_ptr();
|
||||
|
|
Loading…
Reference in a new issue