News Articles

A story about -ffast-math


A rambling account of a day-long bughunt.

Yesterday a colleague discovered that when running under ecto, PCL's ascii-format pcd writer output files with corrupted colors... many of the points were incorrectly black. This pcd writer packs four bytes into a float and serializes the float with standard c++ streaming operators. This program was executed by a python script; at length Eitan discovered that if he simply omitted the import of ecto_ros, without recompiling, the files were uncorrupted.

My first thought ODR violation, which results in Undefined Behavior, AKA Nasal Demons, bugs that manifest themselves in absolutely whatever way they choose. Probably it has nothing to do with the pcd writer per se, we thought. It might be a locale issue, i.e. that it was running on this colleague’s desk, we thought... we were wrong.

It was completely reproducible, but difficult to debug: the process loaded a python interpreter, ecto, ecto_pcl, ~20 PCL shared libraries,…

Latest Posts

Latest Comments