Valgrind

Pierre Abbat phma at leaf.dragonflybsd.org
Tue Feb 2 11:34:24 PST 2016


On 02/ 2/16 06:22 PM, Vasily Postnicov wrote:
> Do you mean an uninitialized pointer problem? Do you have a source code
> of that software that you think causes a trouble? If you think your
> memory is corrupted because of uninitialized pointer, I suggest to
> compile problematic code with clang with AddressSanitizer. Just don't
> forget to compile llvm with compiler-rt option. I hope this helps.
> Didn't try this by myself, though

It's on Github. Follow the links from http://bezitopo.org/. It's not an 
uninitialized pointer, it's a double variable, which is a control point 
of a Bézier triangle. The function is returning something like 1e-300 
instead of 280. I inserted a debugging statement to output "ctrlpt 
garbage" if it ever returned such a number. On Linux, inserting the 
statement made the bug go away, but it reappeared on DragonFly.

I ran bezitest under Valgrind a few weeks ago and fixed some 
uninitialized variables and allocation mixups.

Pierre



More information about the Users mailing list