[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Help fixing a Tellico CSV bug
From:       Albert Astals Cid <aacid () kde ! org>
Date:       2014-04-21 21:19:28
Message-ID: 1921158.sQISEdVfGx () xps
[Download RAW message or body]

El Dilluns, 21 d'abril de 2014, a les 09:20:24, Robby Stephenson va escriure:
> On 4/17/2014 2:19 PM, Albert Astals Cid wrote:
> > El Dimecres, 16 d'abril de 2014, a les 21:55:50, Robby Stephenson va 
escriure:
> >> On Wed, Apr 16, 2014 at 3:59 PM, Albert Astals Cid <aacid@kde.org> wrote:
> >>> El Dimarts, 15 d'abril de 2014, a les 21:34:38, Robby Stephenson va
> >>> 
> >>>> Anyone else have this problem? Particularly on a non-Debian/Ubuntu
> >>>> 
> >>>>    system? Anyone able to take a shot at looking at the CSV import
> >>>> 
> >>>> code? It uses the libcsv library. I have a branch where I updated to
> >>>> the latest release of libcsv (branch name is bug329677) but I can't
> >>>> determine whether that might fix it.
> >>> 
> >>> I just tried, reproduced and proposed a patch for the problem :-)
> >>> 
> >>> https://git.reviewboard.kde.org/r/117605/
> >>> 
> >>> Cheers,
> >>> 
> >>>    Albert
> >> 
> >> Many thanks! I appreciate the help.
> > 
> > We're here all to help :-)
> > 
> > Keep tellico rocking!
> 
> Any thoughts on why I couldn't reproduce it? Is there a compiler flag
> that might have exposed the bug to me sooner? Or maybe using clang or a
> different compiler altogether? if it matters, I have develop on an
> opensuse system, but I also test on a Ubuntu machine I have access to.
> And neither one hung on me with this bug.

In this case it was a "use memory after free" case. There are tools that 
should help you finding these kind of bugs, namely valgrind, that doesn't need 
a recompile, but is quite slow and gcc/clang+ASAN, that does need a recompile 
with special flags but is less slow than valgrind.

It is also weird since "use memory after free" usually causes a crash not an 
infinite loop, but well, you can't never know when you're accessing memory you 
shouldn't.

On why you can't reproduce even when you used Ubuntu, maybe you were lucky and 
the system didn't reuse the memory after freeing it so when the code went 
there it still found the "old" contents.

My suggestion would be usually "run valgrind on it" for stuff you can not 
reproduce but others can.

Actually you should revert my patch and run valgrind on to see if with the 
output you think it would help you find the culprit (since it's one of the 
tools i used for finding the bug)

Cheers,
  Albert

> 
> Robby
> 
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe
> >> <<


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic