POV-Ray : Newsgroups : povray.off-topic : My wavetank : Re: My wavetank (Build #21) Server Time
6 Sep 2024 21:19:16 EDT (-0400)
  Re: My wavetank (Build #21)  
From: Invisible
Date: 24 Oct 2008 05:16:31
Message: <4901926f$1@news.povray.org>
>   http://download.orphi.me.uk/Haskell/Wavetank-B21.exe   (222 KB)

This has a bug: If you feed the program the wrong coordinates, it's 
possible to make it actually segfault. (!!)

That's what you get for premature optimisation... *sigh*

I will put out a corrected build shortly. (The bug is already fixed. I 
want to add a few other features as well though...)



[For anyone who cares: As is probably obvious, the bug is a simple 
unchecked array access glitch. The ironic thing is that in Haskell, you 
have to go out of your way to explicitly request that array accesses be 
unchecked; by default they're checked. I had the checks turned off for 
speed reasons. And sure enough, my internal code works fine. I'd 
forgotten the user-supplied coordinates might not be in range...]


Post a reply to this message

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