Bug 251

Summary: ptrdiff_t conversion is wrong in JOGL
Product: [JogAmp] Gluegen Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED FIXED    
Severity: critical CC: bienator
Priority: P2    
Version: 2   
Hardware: pc_x86_64   
OS: all   
Type: DEFECT SCM Refs:
gluegen 6b6b9b3b81cdc85b7260664ebec547756a6be5d7 start gluegen 7865b355bd52958f4b27e42b500e83c52255ef37 end jogl d1a03d19398960d6e34232f29a30f1d569fba2a7 start jogl 3e6bddf63876bd3fef26e5b99d7475ea5dae33a9 end
Workaround: ---

Description Sven Gothel 2010-03-24 07:49:39 CET


---- Reported by kbr 2006-11-23 21:17:02 ----

The C-level "ptrdiff_t" data type is being mapped to the Java type "int" by
GlueGen, which is incorrect. It should be mapped to type "long" for 64-bit
safety. It is not completely clear why this is happening. Updating
make/stub_includes/common/stddef.h with the correct typedef does not fix the
problem. More investigation is needed. Once this is correctly changed, we need
to provide manual trampoline methods with the original signatures taking "int"
in order to maintain backward binary compatibility.



--- Bug imported by sgothel@jausoft.com 2010-03-24 07:49 EDT  ---

This bug was previously known as _bug_ 251 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=251
Comment 1 Michael Bien 2010-03-27 10:43:58 CET
increased importance since this one could be dangerous