summaryrefslogtreecommitdiffstats
path: root/runtime/map.h
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2010-01-25 15:04:55 -0600
committerDavid Smith <dsmith@redhat.com>2010-01-25 15:04:55 -0600
commit9f49a9853caff67bcc5de7dfe2c52ab1ae7f3738 (patch)
treea05d5fbfa56c4f35ff7d9fa4353bade8995b458b /runtime/map.h
parentb515db67ec9fff58d6c789e6e27c8e18ed01d6ce (diff)
downloadsystemtap-steved-9f49a9853caff67bcc5de7dfe2c52ab1ae7f3738.tar.gz
systemtap-steved-9f49a9853caff67bcc5de7dfe2c52ab1ae7f3738.tar.xz
systemtap-steved-9f49a9853caff67bcc5de7dfe2c52ab1ae7f3738.zip
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.
Diffstat (limited to 'runtime/map.h')
-rw-r--r--runtime/map.h8
1 files changed, 5 insertions, 3 deletions
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 */