<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>392</bug_id>
          
          <creation_ts>2010-03-29 19:53:43 +0200</creation_ts>
          <short_desc>32bit/64bit values and arrays are misrepresented</short_desc>
          <delta_ts>2010-03-29 22:56:28 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Gluegen</product>
          <component>core</component>
          <version>2</version>
          <rep_platform>pc_x86_32</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs>7220416bcef3140883d3966d921442feae3107c4
84e5ba7a4821469f43c0f4bbeaa8e383b203d050</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>436</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2010-03-29 19:53:43 +0200</bug_when>
    <thetext>Bugs:

- PointerBuffer is used to map 64bit integer values,
  which is illegal due to the latest PointerBuffer changes,
  where the underlying ByteBuffer is either 32bit wide 
  or 64bit wide (in respect to the pointer size).

  The PointerBuffer semantic itself is correct, 
  but no more suitable to represent 64bit values and arrays.

  A Int64Buffer (LongBuffer does not exist in CDC/CVM patch)
  should be used instead.

- Determine use of Int64Buffer and PointerBuffer

  Assuming the 1st step being solved, it has to determined 
  for which cases gluegen shall map a type to a PointerBuffer.

  All pointer pointer types, regardless of a Opaque mapping, ie:

  +++
  typedef struct __MYAPIConfig * MYAPIConfig;

  Opaque long MYAPIConfig

  void foo(MYAPIConfig * ptrarray);
  +++

  The argument &apos;ptrarray&apos; must be represented as a PointerBuffer
  otherwise data is misrepresented in case:
    - 32bit machines _and_
    - array semantics - more than one value is being used</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>437</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2010-03-29 19:54:49 +0200</bug_when>
    <thetext>Solved as described ..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>438</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2010-03-29 22:56:28 +0200</bug_when>
    <thetext>    - PointerBuffer: Adding methods
        PointeRBuffer referenceBuffer(int index, Buffer data)
        PointeRBuffer referenceBuffer(Buffer data)
    
        Buffer getReferencedBuffer(int index)
        Buffer getReferencedBuffer()
    
      Adding a reference of a given direct Buffer
      to this pointer buffer, and retrieving a
      previously referenced direct Buffer.
    
      This allows a more convenient handling of PointerBuffer
      with the user API&apos;s ..</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>