other: 0.164 device: 0.164 semantic: 0.160 performance: 0.107 graphic: 0.060 files: 0.055 network: 0.049 PID: 0.048 permissions: 0.039 vnc: 0.036 socket: 0.034 debug: 0.032 boot: 0.028 KVM: 0.024 debug: 0.494 other: 0.103 files: 0.091 PID: 0.050 semantic: 0.048 network: 0.035 socket: 0.030 performance: 0.029 device: 0.026 vnc: 0.023 boot: 0.022 permissions: 0.019 graphic: 0.019 KVM: 0.011 util/path.c/follow_path() does not handle "/" well Hello, I noticed that qemu does not handle "/" very well in follow_path(). Specifically, I was trying to run gdbserver under qemu, and it failed inside its implementation of __getcwd. Indeed it does something like if (__lstat ("/", &st) < 0) ..... and then loops from current dir toward the top using lstat("..") On qemu side, lstat forwards the request to follow_path() in util/path.c, and when passed "/", it returns the path in QEMU_LD_PREFIX (which was the top of my sysroot). OTHT, the series of lstat("..") finally reaches the real device root because it's not recognized as "/" in follow_path(), so this is inconsistent and __getcwd fails. I suppose there's a good reason for returning QEMU_LD_PREFIX when asking for "/", but why is it so? If there's no good reason, maybe the behaviour could be changed to map "/" to "/" ? Thanks This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/162