[Tizen Product-dev] Tizen API hash function change proposal
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.
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)
Currently this issue affects at least
More information about the Product-dev