|
From: Yeshurun, M. <mei...@in...> - 2005-10-18 00:03:26
|
Thanks, the whole issue of partially invalid reads and the problems with string manipulation functions is clear now (I didn't even know the two issues were related.) I guess it is safer to suppress the partial loads individually than to turn all of them off. At least in some of the cases, it looks indeed like a fast memcpy since the top-most function in the stack trace is named my_strdup. So I guess the only option is to add a suppression, right? Thanks, Meir -----Original Message----- From: Julian Seward [mailto:js...@ac...]=20 Sent: Tuesday, October 18, 2005 1:50 AM To: val...@li... Cc: Yeshurun, Meir Subject: Re: [Valgrind-users] User error? - Valgrind 3 failing terribly compared to purify > I don't think the problem in this case is related to strcpy, it's > because of the weird read in the last line of the program. Oh .. my mistake. I misread the program. So then the question is .. why do you think this program is OK? After all you really are reading off the end of the array you allocated. ISO C I'm fairly sure would say that the behaviour is therefore undefined. > Anyway, isn't there a way to suppress error messages for partially > invalid reads? Not any more. Although it would be feasible to reinstate the partial-loads-ok hack, defaulted to off, I'd much prefer people to fix code which behaves like this. Do you have any further details of what this library is trying to do? Some kind of fast memcpy? J |