diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2011-09-14 22:58:00 +0200 |
---|---|---|
committer | Marcin Slusarz <marcin.slusarz@gmail.com> | 2011-09-17 23:03:02 +0200 |
commit | aa281a583c86c806a6b0273ab0fbe014ea406c81 (patch) | |
tree | a3c83a5a359eb6d558ecfd9df1a7a73fc52fd830 | |
parent | 2ac1ecce094addbf9e767a7901baa0126d3bf032 (diff) |
mmt: crash when there's not enough space for new mmap region
-rw-r--r-- | mmt/mmt_nv_ioctl.c | 2 | ||||
-rw-r--r-- | mmt/mmt_trace.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/mmt/mmt_nv_ioctl.c b/mmt/mmt_nv_ioctl.c index bc1a161e..403a2901 100644 --- a/mmt/mmt_nv_ioctl.c +++ b/mmt/mmt_nv_ioctl.c @@ -27,6 +27,7 @@ #include "pub_tool_libcfile.h" #include "pub_tool_libcbase.h" #include "pub_tool_libcproc.h" +#include "pub_tool_libcassert.h" #include <sys/select.h> @@ -78,6 +79,7 @@ static struct mmt_mmap_data *get_nvidia_mapping(Off64T offset) if (mmt_last_region + 1 >= MMT_MAX_REGIONS) { VG_(message)(Vg_UserMsg, "no space for new mapping!\n"); + tl_assert(0); return NULL; } diff --git a/mmt/mmt_trace.c b/mmt/mmt_trace.c index 3d84cc6e..81147759 100644 --- a/mmt/mmt_trace.c +++ b/mmt/mmt_trace.c @@ -28,6 +28,7 @@ #include "pub_tool_libcprint.h" #include "pub_tool_vkiscnums.h" #include "pub_tool_debuginfo.h" +#include "pub_tool_libcassert.h" //#define MMT_PRINT_FILENAMES @@ -347,6 +348,7 @@ static void post_mmap(ThreadId tid, UWord *args, UInt nArgs, SysRes res, int off if (mmt_last_region + 1 >= MMT_MAX_REGIONS) { VG_(message)(Vg_UserMsg, "not enough space for new mmap!\n"); + tl_assert(0); return; } |