Re: MonetDB: Jan2014 - make sure we don't call BATappend(a,b) where ...
What happens to i after this? It still has a heap base pointer that is pointing into freed memory. On 2014-02-05 20:51, Niels Nes wrote:
Changeset: 262ad3ce2b2e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=262ad3ce2b2e Modified Files: sql/storage/bat/bat_storage.c sql/test/BugTracker-2014/Tests/sample-crash.Bug-3429.stable.err Branch: Jan2014 Log Message:
make sure we don't call BATappend(a,b) where b is a VIEW on a.
diffs (29 lines):
diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c --- a/sql/storage/bat/bat_storage.c +++ b/sql/storage/bat/bat_storage.c @@ -448,7 +448,12 @@ delta_append_bat( sql_delta *bat, BAT *i bat_destroy(b); b = temp_descriptor(bat->ibid); } - BATappend(b, i, TRUE); + if (isVIEW(i) && b->batCacheid == ABS(VIEWtparent(i))) { + BAT *ic = BATcopy(i, TYPE_void, i->ttype, TRUE); + BATappend(b, ic, TRUE); + bat_destroy(ic); + } else + BATappend(b, i, TRUE); assert(BUNlast(b) > b->batInserted); bat_destroy(b); } diff --git a/sql/test/BugTracker-2014/Tests/sample-crash.Bug-3429.stable.err b/sql/test/BugTracker-2014/Tests/sample-crash.Bug-3429.stable.err --- a/sql/test/BugTracker-2014/Tests/sample-crash.Bug-3429.stable.err +++ b/sql/test/BugTracker-2014/Tests/sample-crash.Bug-3429.stable.err @@ -28,8 +28,6 @@ stderr of test 'sample-crash.Bug-3429` i # 20:54:49 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-31548" "--port=33290" # 20:54:49 >
-MAPI = (monetdb) /var/tmp/mtest-31984/.s.monetdb.34383 -QUERY = rollback;
_______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
-- Sjoerd Mullender
participants (1)
-
Sjoerd Mullender