Fix realloc() size limitation
This commit is contained in:
parent
b539456a5d
commit
8f5a3c9bcb
@ -59,7 +59,7 @@ pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) {
|
||||
/// Unsafe.
|
||||
pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
|
||||
// debug_trace!("realloc({:p}, {:?}, {}) -> {:p}", ptr, layout, new_size, ptr);
|
||||
if layout.align() > 0x1000 || new_size > 0x1000 || layout.size() > 0x1000 {
|
||||
if layout.align() > 0x1000 {
|
||||
sys::debug_trace("rt::realloc() invalid align/size/new_size");
|
||||
loop {}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user