[vtk-developers] Fwd: vtk 64 bit support
David Gobbi
david.gobbi at gmail.com
Thu May 16 11:28:57 EDT 2013
On Thu, May 16, 2013 at 9:22 AM, Sean McBride <sean at rogue-research.com> wrote:
> On Thu, 16 May 2013 08:58:16 -0600, David Gobbi said:
>
>>I've been fixing 64-bit bugs in VTK more-or-less continuously for
>>years, most recently in the volume ray cast mapper classes just a
>>few months ago. I suspect that much of VTK is 64-bit safe by now,
>>but I'm sure that bugs remain. Being able to compile and run code
>>on a 64-bit machine does not mean the code is 64-bit safe.
>
> I guess it all depends what one means by '64-bit safe'. It's been a long while since I've seen VTK truncate *memory addresses* from 64 to 32 bit, or screw up 64 bit pointer arithmetic. But where bugs very likely remain is where you try to work with more than 2^32 'things', that's bound to go wrong (in some cases), as evidenced by the number of 64-to-32 bit truncation warnings that remain (ex: long->int downcasts).
I'm going to do one of my favorite nitpicks and point out that "long"
is often 32 bits even on 64-bit compilers, so any VTK code that
expects "long" to hold a 64-bit value is already 64-bit unsafe.
- David
More information about the vtk-developers
mailing list