ports -r484565 : qemu-arm-static fails with: (start < end): backtrace included; start+len arithmetic overflow (abi_ulong wrap) for TARGET_FREEBSD_NR_mmap use

Kyle Evans kevans at freebsd.org
Mon Nov 12 01:43:39 UTC 2018


On Sun, Nov 11, 2018 at 5:24 AM Mark Millard <marklmi at yahoo.com> wrote:
>
> I attached with gdb in order to stop at the assert and look around.
>
>
>
> The following is a backtrace with notes and prints mixed in:
>
> (gdb) bt
> #0  thr_kill () at thr_kill.S:3
> #1  0x000000006028a21f in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
> #2  0x0000000060204949 in abort () at /usr/src/lib/libc/stdlib/abort.c:67
> #3  0x000000006027855a in __assert (func=<optimized out>, file=<optimized out>, line=<optimized out>, failedexpr=<optimized out>) at /usr/src/lib/libc/gen/assert.c:51
>
> Note end==37146624 below vs. start (37146624 will show up again in later notes)
>
> #4  0x0000000060036243 in page_set_flags (start=4143968256, end=37146624, flags=9) at /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-2cb0cdd/accel/tcg/translate-all.c:2077
>
> Note start and len below:
>
> #5  0x000000006003df2b in target_mmap (start=4143968256, len=188145664, prot=<optimized out>, flags=<optimized out>, fd=<optimized out>, offset=<optimized out>)
>     at /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-2cb0cdd/bsd-user/mmap.c:626
>
> (gdb) print/x start
> $5 = 0xf6fff000
> (gdb) print/x len
> $6 = 0xb36e000
>
> Note start+len for the above (without wrapping):
>
> (gdb) print/x (long long)start + (long long)len
> $10 = 0x10236d000
> (gdb) print (long long)start + (long long)len
> $11 = 4332113920
>
> With wrapping:
>
> (gdb) print/x start+len
> $8 = 0x236d000
> (gdb) print start+len
> $9 = 37146624
>
> And there is end's value again.
>

Hi,

This should be fixed as of ports r484702; please do try this and let
us know how it goes.

Thanks,

Kyle Evans


More information about the freebsd-ports mailing list