Fri Jul 24 10:02:06 EDT 1998 C980724-619 Having problems with ladebug and long non-null terminated strings causing long pauses when displaying structures. What is the latest version? Is it fixed there? 10:10 - 1st callback from Bill 10:35 - 2nd callback from Bill Fri Jul 24 11:27:02 EDT 1998 Reached Bill. Explained the problem. He had to route it over to the ladebug group. Fri Jul 24 12:15:58 EDT 1998 Got a call back from Raj from the ladebug group. Very hard to understand. Explained the problem again. He said they were up to 4.0-46 and sent me info about how to upgrade. I mailed him a copy of my x.c test program which demonstrates how a simple printf will hang ladebug. Tue Jul 28 12:13:47 EDT 1998 Got a message from Raj basically giving me a solution to the problem in the form of a hack around it. This is bullshit. Calling the 800 number to get this dealt with elsewhere. Tue Jul 28 14:29:26 EDT 1998 Spoke to Ed Haletky. Very frustrating. He said that ladebug is assuming that it is null terminated because this is what the C language defines it as. Then when I got into asking why it was looking for this null, he said we could not assume that is what it was doing. I finally realized that this was going no where and got out of the call. He did agree that ladebug hanging was not good and that engineering should address this. Tue Jul 28 14:32:15 EDT 1998 Just spoke with him again to let him know that according to my C manual, (char *) had nothing to do with null characters, as well as if I changed my program to spit out 1000 characters, it will only spit out 100 which he had disagreed with me on. His comment is "That's Wonderful". Loaded with sarcasm. Mon Aug 10 11:03:14 EDT 1998 Got me a copy of the 4-47 version of ladebug. I downloaded it but did not test it with my test program. Wed Sep 16 15:20:14 EDT 1998 After installing it on godzilla and running it, I saw that they had not fixed the problem and called again into the service number. Fools. Wed Sep 16 16:20:14 EDT 1998 Missed a call back. Trying again. Got Raj again and he said that his test program did not work either and he would check again with engineering. He said that according to his information, it was scheduled to be fixed in version 4-47. [[ Final update. This was a bug in the DEC implementation of sprintf. If they said %.100s, their library would do a strlen and access the memory past the 100th character. So for huge lists, this would hang even though they were spitting out 100 characters or so. I was right. They were just ignorant. ]] ------------------------------------------------------------------------------- #define BIG_NUMBER 10000000 main() { char *x; x = malloc(BIG_NUMBER); if (x == 0L) { exit(1); } memset(x, 'a', BIG_NUMBER); /* * this should be quick. If it is slow then it is exhibiting the * printf bug which causes it to do a strlen regardless of the .* * operator. */ (void)printf("%.*s\n", 10, x); /* * so break here and in ladebug do a: print x * this hangs for a while (maybe forever) on 4.0-44. */ free(x); exit(0); }