On Tue, 2010-05-25 at 11:13 +0200, Mark Phalan wrote: > On Mon, 2010-05-24 at 15:16 -0400, Chad Mynhier wrote: > > On Mon, May 24, 2010 at 8:56 AM, Mark Phalan <mark.pha...@sun.com> wrote: > > > On Mon, 2010-05-24 at 13:42 +0200, Mark Phalan wrote: > > >> On Tue, 2010-05-18 at 17:28 -0400, Angelo Rajadurai wrote: > > >> > > > >> > The way to fix it is to set strsize > > >> > > > >> > #pragma D option strsize=1024 // make sure your string can fit in! > > >> > > > >> > > >> Thanks for the idea but it doesn't seem to make any difference even if I > > >> increase strsize up to 2097152 (above which I get drops). > > >> The size of the string is just 5 characters "TEST" + "@". > > >> > > >> I'll file a bug. > > > > > > > > > 6955097 "out of scratch space in action" error with small amounts of > > > data > > > > > > > I don't think this is a bug in DTrace, I think this is just an > > off-by-one error in your original code. Try adding 1 to data.length. > > In the simple example I included the string is NULL-terminated. This > isn't the case in reality. strings are represented by a pointer (data) > and a string length (length). > > Anyway, I changed the C to look like this: > > int main() { > my_data data; > > data.length = strlen("TEST") + 1; > data.data = "TEST"; > > SIMPLE_START(&data); > } > > and I see exactly the same error.
I take that back. If I simply add one to the length so the NULL char is copied in it works as expected. -M _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org