Changeset: 35cd61014c60 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=35cd61014c60
Modified Files:
gdk/gdk.h
Branch: Feb2013
Log Message:
Added error checking for if upgrading the string offset heap fails.
diffs (23 lines):
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1165,7 +1165,8 @@ gdk_export bte ATOMelmshift(int sz);
if ((b)->HT->width < SIZEOF_VAR_T && \
((b)->HT->width <= 2 ? _d - GDK_VAROFFSET : _d) >=
((size_t) 1 << (8 * (b)->HT->width))) { \
/* doesn't fit in current heap, upgrade it */ \
- GDKupgradevarheap((b)->HT, _d, (copyall)); \
+ if (GDKupgradevarheap((b)->HT, _d, (copyall))
== GDK_FAIL) \
+ goto bunins_failed; \
} \
_ptr = (p); \
switch ((b)->HT->width) { \
@@ -1211,7 +1212,8 @@ gdk_export bte ATOMelmshift(int sz);
if ((b)->HT->width < SIZEOF_VAR_T && \
((b)->HT->width <= 2 ? _d - GDK_VAROFFSET : _d) >=
((size_t) 1 << (8 * (b)->HT->width))) { \
/* doesn't fit in current heap, upgrade it */ \
- GDKupgradevarheap((b)->HT, _d, 0); \
+ if (GDKupgradevarheap((b)->HT, _d, 0) ==
GDK_FAIL) \
+ goto bunins_failed; \
} \
_ptr = (p); \
switch ((b)->HT->width) { \
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list