POV-Ray : Newsgroups : povray.beta-test : splinefollow : Re: splinefollow Server Time
19 May 2024 09:55:09 EDT (-0400)
  Re: splinefollow  
From: Le Forgeron
Date: 27 Feb 2016 08:46:01
Message: <56d1a899@news.povray.org>
Le 27/02/2016 14:34, ThH a écrit :
> Am 27.02.2016 um 14:04 schrieb Le_Forgeron:
> 
>> I can confirm for the master branch ( 3.7.1-alpha.8497793.unofficial )

>>
>> Segmentation fault (core dumped)
> 
> Thank you for checking and confirming Le_Forgeron :)
> 
>> No such problem on stable branch, and not yet either on my two branche
s.
>> So, it's new, it's fresh... (less than a year old)
>>
>> traced to se.resize()
>>
>> void mkfree(GenericSpline * sp, SplineEntryList::size_type i)
>> {
>>      SplineEntryList::size_type j;
>>      SplineEntryList& se = sp->SplineEntries;
>>
>>      se.resize(se.size()+1);
>>      for (j=sp->SplineEntries.size()-1; j>i; j--)
>>          se[j] = se[j-1];
>> }
>>
>> But it might be due to a previous memory corruption because the
>> segfault is due to malloc.c, a code that is safe as long as memory is
>> not corrupted.
>>
>> I would bet for, somewhere else, a write out of allocated area.
> 
> This part is for real coders, right? At least I can read it but am not
> understanding it ;)

Attached is a log from valgrind (a memory checker) about trying to run
splinefollow.

The spline parsing code should be checked, because it seems to have
miscounted its number of entries.


Post a reply to this message


Attachments:
Download 'memcheck.txt' (16 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.