Hacker News new | ask | show | jobs
by phkahler 846 days ago
Is it feasible to run this on something large like Solvespace[1] (CAD) which is ~5MB executable? Or would we just get an insanely long list of issues?

[1] https://solvespace.com/index.pl

There are hundreds of numerical algorithms in there, and we have some bugs that might be related to this kind of implementation error.

1 comments

It should be possible. Herbgrind is designed under the philosophy that it's not bad numerics themselves that are significant, it's how they affect the outputs of your program. So the reports are organized around program outputs (either through print calls, or you can annotate values you care about with macros), and errors are reported in terms of how they are affecting your outputs. That should allow you to skip any numerical errors that are insignificant in the final output, and prioritize the ones that are affecting the outputs you care about most greatly.

But Herbgrind is a heavyweight dynamic binary analysis using the Valgrind framework, so the slowdown it imposes on the runtime might be prohibitive for debugging some programs which take a while to compute their results.