tests: Use strtoul in test-coredump-unwind.c
Read the address using strtoul(). If strtol() is used and the number is
bigger than LONG_MAX, LONG_MAX is returned instead, which leads to a failure
if the mapping address is 0x80000000 or larger on 32-bit platforms (and
similarly for 64-bit platforms).
@@ -314,7 +314,7 @@ main(int argc UNUSED, char **argv)
while (*argv)
{
char *colon;
- long vaddr = strtol(*argv, &colon, 16);
+ unsigned long vaddr = strtoul(*argv, &colon, 16);
if (*colon != ':')
error_msg_and_die("Bad format: '%s'", *argv);
if (_UCD_add_backing_file_at_vaddr(ui, vaddr, colon + 1) < 0)
