[haiku-bugs] Re: [Haiku] #661: CannaIM deskbar replicant popup menu not working; replicant handle menu displayed instead.

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Sun, 01 Nov 2015 07:18:57 -0000

#661: CannaIM deskbar replicant popup menu not working; replicant handle menu
displayed instead.
-------------------------+----------------------------
Reporter: koki@… | Owner: korli
Type: bug | Status: reopened
Priority: normal | Milestone: R1
Component: - General | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 1 | Platform: All
-------------------------+----------------------------
Changes (by pulkomandy):

* version: => R1/Development


Comment:

Looking at the full commit (http://cgit.haiku-
os.org/haiku/commit/?id=57ab0395ad31761e27ef6d5aa3af68cc3e4d71b2), there
are places where we put a pointer there. When using an int32, we only use
the low part of the pointer, which can work most of the time, but in rare
cases two pointers will have the same low-part and become mixed up.

We have several solutions:
* Use void* as in the original change, and adjust Canna to still work,
* Use int32, and on 64-bit platforms, use an hash map to map the 32-bit
cookie back to a 64-bit pointer pointer,
* Use void* on non-gcc2 platforms, keep int32 for gcc2 for binary
compatibility, and apps need to take care of the difference depending on
the architecture.

I'm not very happy with any of these 3 solutions, however.

--
Ticket URL: <https://dev.haiku-os.org/ticket/661#comment:24>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: