From 9f49a9853caff67bcc5de7dfe2c52ab1ae7f3738 Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 25 Jan 2010 15:04:55 -0600 Subject: Fixed PR 11220 by setting MAP_STRING_LENGTH to MAXSTRINGLEN. * runtime/map.h: Set MAP_STRING_LENGTH to MAXSTRINGLEN so that large strings can be stored in arrays. * testsuite/systemtap.base/array_string.exp: New testcase. --- runtime/map.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'runtime/map.h') diff --git a/runtime/map.h b/runtime/map.h index 6c1c855b..09e46f85 100644 --- a/runtime/map.h +++ b/runtime/map.h @@ -49,10 +49,12 @@ amount of memory. Do not increase above 5. */ #define MAX_KEY_ARITY 5 #endif -/** Maximum length of strings in maps. This sets the amount of space reserved - for each string. */ +/** Maximum length of strings in maps. This sets the amount of space + reserved for each string. This should match MAXSTRINGLEN. If + MAP_STRING_LENGTH is less than MAXSTRINGLEN, a user could get + strings truncated that are stored in arrays. */ #ifndef MAP_STRING_LENGTH -#define MAP_STRING_LENGTH 256 +#define MAP_STRING_LENGTH MAXSTRINGLEN #endif /** @cond DONT_INCLUDE */ -- cgit