Bug 251 - ptrdiff_t conversion is wrong in JOGL
Summary: ptrdiff_t conversion is wrong in JOGL
Alias: None
Product: Gluegen
Classification: JogAmp
Component: core (show other bugs)
Version: 2
Hardware: pc_x86_64 all
: P2 critical
Assignee: Sven Gothel
Depends on:
Reported: 2006-11-23 09:17 CET by Sven Gothel
Modified: 2010-11-10 19:27 CET (History)
1 user (show)

See Also:
SCM Refs:
gluegen 6b6b9b3b81cdc85b7260664ebec547756a6be5d7 start gluegen 7865b355bd52958f4b27e42b500e83c52255ef37 end jogl d1a03d19398960d6e34232f29a30f1d569fba2a7 start jogl 3e6bddf63876bd3fef26e5b99d7475ea5dae33a9 end
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
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