diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-06-17 16:49:04 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-06-17 17:31:24 -0700 |
| commit | 5fb93258488c1b2083ea1042ee9674b842c29548 (patch) | |
| tree | 033a2ff0aca9d0d42ea8beb2b3c242893e742683 /src/rt/rust_builtin.cpp | |
| parent | 68122edac38c20ee4b643e4e1cb3a943cb8208da (diff) | |
| download | rust-5fb93258488c1b2083ea1042ee9674b842c29548.tar.gz rust-5fb93258488c1b2083ea1042ee9674b842c29548.zip | |
rustc: Fix a bunch of memory management bugs relating to generic interior vectors. Uncomment all tests in lib-ivec.
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index afa022fe533..ca8f24a4227 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -682,7 +682,7 @@ ivec_copy_from_buf(rust_task *task, type_desc *ty, rust_ivec *v, void *ptr, ivec_reserve(task, ty, v, count); size_t new_size = count * ty->size; - if (v->fill) { + if (v->fill || !v->payload.ptr) { // On stack. memmove(v->payload.data, ptr, new_size); v->fill = new_size; |
