Stable release crashes on import

Linus Torvalds torvalds at linux-foundation.org
Mon Apr 11 11:12:49 PDT 2016


On Sun, Apr 10, 2016 at 9:30 PM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> Have you tried running things under valgrind? That tends to be very good at
> finding memory corruption bugs.

Ugh. The released version of valgrind still fails to run on
subsurface, due to not understanding the fancier vector instructions.

I hacked up my own version, and I get

==27661== Invalid read of size 4
==27661==    at 0x4FCE30: DiveLogImportDialog::on_buttonBox_accepted()
(divelogimportdialog.cpp:779)
==27661==    by 0x55CC74:
DiveLogImportDialog::qt_static_metacall(QObject*, QMetaObject::Call,
int, void**) (moc_divelogimportdialog.cpp:364)

and the reason seems to be trivially obvious:

                                for(int s_nr = 0 ; s_nr <=
dive->dc.samples ; s_nr++) {

that "<=" is bogus, it should be "<".

With that, things seem to work fine for me.

                  Linus


More information about the subsurface mailing list