don't copy zero-sized types to the stack

This commit is contained in:
Folkert 2023-05-02 22:18:41 +02:00
parent 35c507a33f
commit 0fa85fe91d
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 6 additions and 0 deletions

View file

@ -3175,6 +3175,11 @@ impl<
let mut copied = 0;
let size = stack_size as i32;
if size == 0 {
storage_manager.no_data(&dst);
return;
}
let base_offset = storage_manager.claim_stack_area(&dst, stack_size);
if size - copied >= 8 {