mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
builtin,crypto: fix problems detected by -fsanitize=address,undefined and -fsanitize=memory
This commit is contained in:
parent
b4c52b72cf
commit
31fe02de8c
5 changed files with 28 additions and 19 deletions
|
@ -506,7 +506,8 @@ pub fn (a &array) free() {
|
|||
// if a.is_slice {
|
||||
// return
|
||||
// }
|
||||
unsafe { free(&byte(a.data) - a.offset) }
|
||||
mblock_ptr := &byte(u64(a.data) - u64(a.offset))
|
||||
unsafe { free(mblock_ptr) }
|
||||
}
|
||||
|
||||
// filter creates a new array with all elements that pass the test implemented by the provided function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue