Received: from eggs.gnu.org ([2001:4830:134:3::10]:58749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDwMb-00072x-FR for qemu-devel@nongnu.org; Fri, 17 Jun 2016 12:11:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDwMW-0005rp-UO for qemu-devel@nongnu.org; Fri, 17 Jun 2016 12:11:21 -0400 Received: from indium.canonical.com ([91.189.90.7]:43258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDwMW-0005rW-ON for qemu-devel@nongnu.org; Fri, 17 Jun 2016 12:11:16 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1bDwMV-0000md-UQ for ; Fri, 17 Jun 2016 16:11:15 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id D0DA92E80CB for ; Fri, 17 Jun 2016 16:11:15 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Fri, 17 Jun 2016 16:05:30 -0000 From: Peter Maydell Reply-To: Bug 1346769 <1346769@bugs.launchpad.net> Sender: bounces@canonical.com References: <20140722064729.20624.54307.malonedeb@wampee.canonical.com> Message-Id: <20160617160530.24696.20761.malone@gac.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1346769] Re: /proc/self/maps content returned to 32-bits guest under 64-bits qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org We removed the ifdefs at some point; the test case in this bug report now runs successfully. ** Changed in: qemu Status: New =3D> Fix Released -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1346769 Title: /proc/self/maps content returned to 32-bits guest under 64-bits qemu Status in QEMU: Fix Released Bug description: Reading /proc/self/maps a user doesn't get a stack record. Not all programs relies on the maps file but some do. The bug found by running 32-bits binaries with address sanitizer (Asan) instrumentations under 64-bit qemu. $ echo "int main() { return 0; }" > /tmp/test.c $ gcc -m32 -fsanitize=3Daddress -fno-common -Wall -g -fPIC -o /tmp/test /= tmp/test.c $ qemu-i386-static /tmp/test =3D=3D4092=3D=3DAddressSanitizer CHECK failed: /home/michail/Downloads/gc= c-4.9.0/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:63 "(((upt= r)&rl >=3D start && (uptr)&rl < end)) !=3D (0)" (0x0, 0x0) #0 0xf632ff01 (/home/michail/build/lib32/libasan.so.1+0x53f01) #1 0xf6333f49 (/home/michail/build/lib32/libasan.so.1+0x57f49) #2 0xf6338785 (/home/michail/build/lib32/libasan.so.1+0x5c785) #3 0xf6338bd1 (/home/michail/build/lib32/libasan.so.1+0x5cbd1) #4 0xf6331baf (/home/michail/build/lib32/libasan.so.1+0x55baf) #5 0xf6331dca (/home/michail/build/lib32/libasan.so.1+0x55dca) #6 0xf6331f5a (/home/michail/build/lib32/libasan.so.1+0x55f5a) #7 0xf6330bd4 (/home/michail/build/lib32/libasan.so.1+0x54bd4) #8 0xf67ebeec (/lib/ld-linux.so.2+0xeeec) #9 0xf67de10e (/lib/ld-linux.so.2+0x110e) This happened because during initialization Asan can't find stack boundaries. For some reasons Qemu wants to report stack boundaries just for several arch targets skipping other ones. This is from linux- user/syscall.c open_self_maps() #if defined(TARGET_ARM) || defined(TARGET_M68K) || defined(TARGET_UNICORE= 32) dprintf(fd, "%08llx-%08llx rw-p %08llx 00:00 0 [stack]\n", (unsigned long long)ts->info->stack_limit, (unsigned long long)(ts->info->start_stack + (TARGET_PAGE_SIZE - 1)) & TARGET_PAG= E_MASK, (unsigned long long)0); #endif Not very clear why the case covers just specific targets. This bug continues the previously reported issue with not hiden system map http://lists.nongnu.org/archive/html/qemu- devel/2014-07/msg02793.html. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1346769/+subscriptions