mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Remove container sanitizer unless using the LIBC allocator.
This commit is contained in:
committed by
Christoffer Lerno
parent
74a6e9f0c0
commit
2b90500c22
@@ -394,10 +394,13 @@ fn void List.reserve(&self, usz added)
|
||||
fn void List._update_size_change(&self,usz old_size, usz new_size)
|
||||
{
|
||||
if (old_size == new_size) return;
|
||||
$if env::ADDRESS_SANITIZER:
|
||||
if (self.allocator.ptr != &allocator::LIBC_ALLOCATOR) return;
|
||||
sanitizer::annotate_contiguous_container(self.entries,
|
||||
&self.entries[self.capacity],
|
||||
&self.entries[old_size],
|
||||
&self.entries[new_size]);
|
||||
$endif
|
||||
}
|
||||
<*
|
||||
@require new_size == 0 || self.capacity != 0
|
||||
|
||||
Reference in New Issue
Block a user