]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commit
Fix size for long types on aarch64
authorMaria Sfiraiala <maria.sfiraiala@gmail.com>
Wed, 3 Aug 2022 15:53:05 +0000 (18:53 +0300)
committerUnikraft <monkey@unikraft.io>
Wed, 16 Nov 2022 17:23:52 +0000 (17:23 +0000)
commite42e8a700043f04d1822f9915eeb4d4dededd9a5
treedc59df62b37726f1d321c8f4733035d7927b77d4
parent45748686968a478ce87d66c8b48e6307b8a01ecf
Fix size for long types on aarch64

Default size of the data model for AArch64 is 8 (64 bits) for long
types, however newlibc ends up defining LONG_MAX as 32 bits.

This issue causes extremely optimized functions, such as memchr (which
parses DTB for apps like SQLite or redis), to crash when compiled for
AArch64.

This commit redefines the size for long types as 64 bits on AArch64.

Signed-off-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Approved-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #21
include/limits.h