understanding the sensor values in our samples
Linus Torvalds
torvalds at linux-foundation.org
Thu Apr 28 11:06:19 PDT 2022
On Thu, Apr 28, 2022 at 10:34 AM Dirk Hohndel <dirk at hohndel.org> wrote:
>
> > On Apr 28, 2022, at 10:30 AM, Linus Torvalds <torvalds at linux-foundation.org> wrote:
> >
> > Can you send me the test-case so that I can follow along?
>
> Yep, will do off list.
Ok, so that makes *one* of the bugs very obvious.
The cylinder_with_sensor_sample() function indeed only tests "do we
have a mapping to this cylinder for this sample".
But it doesn't actually test "does the sample have an actual
_reading_?" as part of that.
That's what is causing the pointless "The deleted cylinder has sensor
readings, which will be lost." warning.
Trivial patch attached. We could do this other ways - maybe we could
do it as part of some cylinder cleanup phase where we just remove the
sensor[] thing for cylinders without any sensor data.
But this trivial patch is right regardless, and worth doing.
But I think one of the reports had a "subsurface crashes" in it too,
and I don't see _that_ part.
Was there some way to reproduce the crash? I ran it (very very slowly)
under valgrind too, and there were no complaints when removing the
cylinder (now without any warning), so it's at least not something
hugely obvious.
Linus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 664 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20220428/000852d1/attachment.bin>
More information about the subsurface
mailing list