|
![](/i/fill.gif) |
Le_Forgeron <jgr### [at] free fr> wrote:
> Le 13/10/2012 09:26, Le_Forgeron nous fit lire :
> > Le 13/10/2012 03:34, Anthony D. Baye nous fit lire :
> >> "Anthony D. Baye" <Sha### [at] spamnomore hotmail com> wrote:
> >>> anybody else get a seg-fault running this code?
> >>>
> >> snip...
> >>
> >> Probably should mention that I'm running RC5 in Linux Mint 11 (Katya) on an AMD
> >> Phenom II X6
> >>
> >> my command line is: povray +a0.03 +H768 +W1024 +T8 +P filename.pov
> >>
> >> currently compiling RC6 sources, but they configured saying that it was RC5.
> >>
> >> Regards,
> >> A.D.B.
> >>
> >>
> >>
> >
> > Segfault occurs at parsing time (or seems so)
>
> > Broader union, depth 1
> > (as opposed to your cascaded union of 60000 levels, with 1 extra sphere
> > per level)
> >
>
> And it parses faster too.
>
> The segfault is due to the depth of CSG: each level will stack a few
> calls... the provisionned stack is not big enough for diving in that data.
Thanks for responding.
It's pretty much what I figured, although I had thought it was a signed 16-bit
overflow somewhere, but 32768 works just fine.
my solution was to create another container to hold unions of a safe size, but
it seems that there's a better solution.
at any rate, it would probably be a good idea to do some error checking on the
stack size before it overflows and causes a segfault.
Regards,
A.D.B
Post a reply to this message
|
![](/i/fill.gif) |