6

I am trying to boot xv6 with qemu but whenever I run make qemu , I am getting the following error

usertests.c: In function ‘sbrktest’:
usertests.c:1461:13: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 1461 |   *lastaddr = 99;
      |   ~~~~~~~~~~^~~~
cc1: all warnings being treated as errors
make: *** [<builtin>: usertests.o] Error 1

Running make qemu-nox resulted in same error.I am using Kubuntu 21.10 operating system.here is a way around but I am looking for a solution if anyone finds out.

Sihat Afnan
  • 742
  • 7
  • 14
  • add CFLAGS ` -Wno-stringop-overflow` see https://stackoverflow.com/questions/53408543/strncat-wformat-overflow-warning-when-using-gcc-8-2-1 – Suny Z Jan 02 '22 at 18:42

2 Answers2

2

Maybe it would help: Delete "_usertests" & "usertests.c" from makefile and try make clean - > make -> make qemu

Pooya Afshari
  • 37
  • 1
  • 1
  • 10
0

I fix this problem just now, don't use the higher version ubuntu. I make qemu-nox success in 18.04 ubuntu operation system.