openwrt/package/utils
Liangbin Lian 4bb9af48ca lua: lnum: fix strtoul based number parsing
Lua's LNUM patch currently doesn't parse properly certain numbers as
it's visible from the following simple tests.

On x86_64 host (stock Lua 5.1.5, expected output):

 $ /usr/bin/lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  2147483648
  8796093022208
  4294967296

On x86_64 host:

 $ staging_dir/hostpkg/bin/lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  -2147483648
  0
  0

On x86_64 target:

 $ lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  -2147483648
  0
  0

On ath79 target:

 $ lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  -2147483648
  8796093022208
  4294967296

It's caused by two issues fixed in this patch, first issue is caused by
unhadled strtoul overflow and second one is caused by the cast of
unsigned to signed Lua integer when parsing from hex literal.

Run tested on:

 * Zidoo Z9S with RTD1296 CPU (aarch64_cortex-a53)
 * qemu/x86_64
 * qemu/armvirt_64
 * ath79

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
[commit subject/message touches, fixed From to match SOB, fixed another
 unhandled case in luaO_str2i, host Lua, package bump]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-05-23 10:19:52 +02:00
..
adb adb: fix missing PKG_MIRROR_HASH 2019-03-21 00:57:54 +01:00
bsdiff
busybox busybox: add missing install dir 2019-03-11 17:03:17 +01:00
bzip2 treewide: revise library packaging 2019-01-24 10:39:30 +01:00
ct-bugcheck
e2fsprogs e2fsprogs: Update to 1.44.5 2019-01-26 23:11:49 +01:00
f2fs-tools treewide: revise library packaging 2019-01-24 10:39:30 +01:00
fbtest
fritz-tools fritz-tools: add support for IPQ40xx platform 2019-03-13 16:25:34 +01:00
fuse treewide: revise library packaging 2019-01-24 10:39:30 +01:00
jboot-tools
jsonfilter
lua lua: lnum: fix strtoul based number parsing 2019-05-23 10:19:52 +02:00
mdadm mdadm: Update to 4.1 2019-02-17 17:33:18 +01:00
mtd-utils
nvram packages: nvram: make it possible to include it for ath79 targets 2018-08-13 08:46:22 +02:00
osafeloader
oseama
otrx
px5g treewide: Bump PKG_RELEASE due to mbedtls update 2018-07-30 10:35:12 +02:00
spidev_test utils/spidev_test: build package directly from Linux 2019-05-11 16:37:11 +02:00
ugps ugps: update to latest git HEAD 2018-11-11 02:37:05 +01:00
usbmode package/: fix $(PROJECT_GIT) usage 2018-10-11 08:42:52 +02:00
usbreset
usbutils usbutils: Update usb.ids to 0.321 2019-03-18 20:43:09 +01:00
util-linux treewide: revise library packaging 2019-01-24 10:39:30 +01:00
xfsprogs xfsprogs: Replace valloc with posix_memalign 2019-05-11 23:10:10 +02:00