[Tizen Product-dev] Tizen API hash function change proposal

Vyacheslav Barinov v.barinov at samsung.com
Tue Jun 24 14:07:48 GMT 2014


Good day All, 

  Current Tizen API (package osp-appfw) has a problem with hash function: the current implementation
  is primitive for hash and uses cast from pointer to 32-bit unsigned int which may cause data loss
  on 64-bit architectures.

https://review.tizen.org/gerrit/gitweb?p=framework/osp/appfw.git;a=blob;f=inc/FBaseColMapEntryT.h;h=677b1bed33ce2cc888f6b8efb3613114f321d8a6;hb=a874dcd442f5c27cf3ecf894429c326733e0ec9a#l139

  GCC detects this problem which causes build fail for any package using osp-appfw, currently failed
  builds are listed below.

  Now we applied an "-fpermissive" key to gcc during build as a workaround, but I suppose this
  hashing function must be changed in next Tizen API revision, because its current implementation
  has non-hashing algorithm (object's address is treated as random number) and it is architecture
  dependent. If 32bit hash is needed, there is a number of existing algorithms (just crc32 for
  instance) which would work better and have an optimized version in standard library.

  For example you can see osp-uifw build log for aarch64 and a huge number of cast warnings (they
  become errors in case of build without fpermissive)

https://build.tizen.org/package/rawlog?arch=aarch64&package=osp-uifw&project=devel:arm_toolchain:Mobile:Main&repository=aarch

Best Regards,
Vyacheslav Barinov.

Currently this issue affects at least
 apps.Clock
 apps.Contacts
 apps.Lock
 apps.Gallery
 apps.Internet
 apps.MusicPlayer
 apps.Settings
 apps.Phone
 osp-app-controls
 osp-appfw
 osp-app-service
 osp-appwidget-service
 osp-bluetooth
 osp-channel-service
 osp-connectivity-service
 osp-content
 osp-image
 osp-ime
 osp-installer
 osp-json
 osp-locations
 osp-media
 osp-net
 osp-nfc
 osp-secure-element
 osp-security-service
 osp-common-service
 osp-shell
 osp-social
 osp-telephony
 osp-uix
 osp-uifw
 osp-vision
 osp-web


More information about the Product-dev mailing list