You can store strings in arrays. However, on x86_64 f12 (kernel 2.6.31.9-174.fc12.x86_64), you can't store strings that are near MAXSTRINGLEN (512) in size in an array - the strings seem to get truncated at around 256 bytes.
Created attachment 4555 [details] test script that demonstrates the problem Here's the output from the attached test script: # stap ../string_array.stp strings *don't* match! str: 0:123456789+123456789+123456789+123456789+123456789+123456789 1:123456789+123456789+123456789+123456789+123456789+123456789 2:123456789+123456789+123456789+123456789+123456789+123456789 3:123456789+123456789+123456789+123456789+123456789+123456789 4:123456789+123456789+123456789+123456789+123456789+123456789 5:123456789+123456789+123456789+123456789+123456789+123456789 6:123456789+123456789+123456789+123456789+123456789+123456789 7:123456789+123456789+123456789+123456789+123456789+123456789 string_array[0]: 0:123456789+123456789+123456789+123456789+123456789+123456789 1:123456789+123456789+123456789+123456789+123456789+123456789 2:123456789+123456789+123456789+123456789+123456789+123456789 3:123456789+123456789+123456789+123456789+123456789+123456789 4
This is because runtime/map.h MAP_STRING_LENGTH is not simply MAXSTRINGLEN, though it should be.
Fixed in commit 9f49a98.