Segfault

Jef Driesen jefdriesen at telenet.be
Tue Feb 12 23:33:12 PST 2013


On 2013-02-12 23:32, Cristian Ionescu-Idbohrn wrote:
> On Tue, 12 Feb 2013, Dirk Hohndel wrote:
>> Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com> writes:
>> > Why did that happen?
>> > Is there an obvious glitch somewhere?
>> > Is it important to find out what it may be, where it came from?
>> > Is it more important to ignore that and go on with releasing 3.0?
>> > Will that bug come back?
>> > Will it be easier to spot the cause, later?
>> >
>> > Don't get me wrong.  I love this stuff.  Didn't think I would see 
>> that
>> > (proprietary) crap being replaced by something serious.
>> >
>> > I want to believe I know a little about bugs.  And this is 
>> definitly one
>> > of them, no dought, wouldn't you agree?
>> >
>> > A few questions that cry for qualified answers.  But, on the other 
>> side,
>> > it might be just me, being never satisfied ;)
>>
>> No, it's not just you. I'd really like to find out, too.
>
> Glad to hear that ;)
>
> So, Jef.  Is there something you can recall?  Anything?

Nothing special. I just did a "git pull" followed by "make" as usual. 
No change in environment, compiler options, or anything like that. (The 
only change I have in my checkout is to adjust the path to the 
libdivecomputer library in the Makefile.)

I have absolutely no explanation on how it happened. Maybe it's indeed 
as Linus says some left over object file from the old manual dependency 
tracking? I find that hard to believe, because I update subsurface quite 
frequently. Anyway, what I can tell is how I discovered something was 
wrong. I was trying to track down where that bogus pointer was assigned. 
I noticed that the dive structure in one function was perfectly fine 
(e.g. a NULL pointer for the cylinder description), but the same 
structure (at the same memory address!) in another function suddenly had 
that bogus pointer. After the initial "What the hell is going on here?", 
the only reasonable explanation I could think of is that the definition 
of the dive structure had changed, and one object file was compiled with 
the old definition, and another with the new definition. So I did a 
"make clean && make" and the problem was gone.

I believe this is an isolated case, that is very unlikely to happen 
again and thus doesn't need any further investigation.

Jef


More information about the subsurface mailing list