diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-06-16 16:59:00 +0000 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-06-16 16:59:33 +0000 |
| commit | 9aba81d8eb048db908c94a3c40c25a5fde0caee6 (patch) | |
| tree | b765e7fb5e9a3c2143c68b0414e0055adb70e785 /results/classifier/118/network/2143 | |
| parent | b89a938452613061c0f1f23e710281cf5c83cb29 (diff) | |
| download | emulator-bug-study-9aba81d8eb048db908c94a3c40c25a5fde0caee6.tar.gz emulator-bug-study-9aba81d8eb048db908c94a3c40c25a5fde0caee6.zip | |
add 18th iteration of classifier
Diffstat (limited to 'results/classifier/118/network/2143')
| -rw-r--r-- | results/classifier/118/network/2143 | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/results/classifier/118/network/2143 b/results/classifier/118/network/2143 new file mode 100644 index 00000000..c291f3b8 --- /dev/null +++ b/results/classifier/118/network/2143 @@ -0,0 +1,68 @@ +network: 0.920 +performance: 0.891 +peripherals: 0.885 +architecture: 0.875 +boot: 0.856 +graphic: 0.833 +debug: 0.815 +socket: 0.813 +device: 0.809 +ppc: 0.801 +semantic: 0.783 +arm: 0.719 +hypervisor: 0.689 +mistranslation: 0.671 +permissions: 0.669 +PID: 0.661 +user-level: 0.579 +x86: 0.557 +i386: 0.555 +KVM: 0.536 +assembly: 0.535 +vnc: 0.531 +TCG: 0.529 +kernel: 0.526 +risc-v: 0.481 +virtual: 0.441 +files: 0.434 +VMM: 0.423 +register: 0.390 + +ladr_match can cause bus error due to unaligned fetch +Description of problem: +On a SPARC host system, which does not support unaligned fetches, QEMU sometimes takes a bus error in ladr_match. +Steps to reproduce: +1. (see QEMU command line above) +2. let the system boot +3. +Additional information: +Problem is a hack in ladr_match - hw/net/pcnet.c:635 (present since 2006!): + +``` +Core was generated by `./qemu-system-sparc -rtc base=utc,clock=host -vga cg3 -g 1024x768x8 -machine SS'. +Program terminated with signal SIGKILL, Killed. +#0 0xffffffff7ec3b178 in ladr_match (size=110, buf=0xffffffff7ffee972 "33", s=0x808f2a20) at ../hw/net/pcnet.c:634 +634 if ((*(hdr->ether_dhost)&0x01) && +[Current thread is 632 (LWP 1 )] +(gdb) list +629 } +630 +631 static inline int ladr_match(PCNetState *s, const uint8_t *buf, int size) +632 { +633 struct qemu_ether_header *hdr = (void *)buf; +634 if ((*(hdr->ether_dhost)&0x01) && +635 ((uint64_t *)&s->csr[8])[0] != 0LL) { +636 uint8_t ladr[8] = { +637 s->csr[8] & 0xff, s->csr[8] >> 8, +638 s->csr[9] & 0xff, s->csr[9] >> 8, +(gdb) print &s->csr[8] +$1 = (uint16_t *) 0x808f4a7c +``` +The address of s->csr[8], in this case, is on a 4-byte boundary not an 8-byte boundary, so the hack to test for 8 bytes (4 x 16-bit words) being 0 by casting the address up to a pointer to uint64_t and dereferencing it fails. + +The data does not seem to be allocated with a deterministic alignment, this failure does not always occur. + +A solution to avoid alignment errors could be to test +``` + (s->csr[8] | s->csr[9] | s->csr[10] | s->csr[11]) != 0 +``` |