From owner-freebsd-arm@freebsd.org Thu Oct 22 13:59:38 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4C62A1C082 for ; Thu, 22 Oct 2015 13:59:38 +0000 (UTC) (envelope-from mattia.rossi.mailinglists@gmail.com) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A63217D1 for ; Thu, 22 Oct 2015 13:59:38 +0000 (UTC) (envelope-from mattia.rossi.mailinglists@gmail.com) Received: by wicfv8 with SMTP id fv8so121610897wic.0 for ; Thu, 22 Oct 2015 06:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=ZvCvLq0dMhoq1QHwTkzUU6dX0JHjIWGSj1hLA7n6vVs=; b=uaxdI8HldZZQpXzpSnFCkw8pmlLKcoN4Iwl+MyVY7SQjtsXPVvt07W74Iko3HFWVMB PDbYXQ+sSx49x+Yc1/ZPMs32v/GFocUg5ggqkWwK7Tf6ijqZSBjW1VwNVjcRPtxVEcaT ija4IW0bXk/X54k+kU6yBkak+flzS0x/DKdLXGw2v/Yc6eXxLe5xG2FlA0VlzUPhFS2q DyfZcC+KHZ3vQqqZmiGLCcK4i0T+7uM3MjkeD9g6qdLOnzYrYsdYmINsiicoSctanxv5 PYHZZQa3bcqI1bm00YHVtBbeyYuQhXGabjaX/MaF8dRiiTZR8LAcDbXwUW7JKO8x1zPc xNHA== X-Received: by 10.194.129.129 with SMTP id nw1mr20502700wjb.37.1445522376696; Thu, 22 Oct 2015 06:59:36 -0700 (PDT) Received: from ?IPv6:2001:1620:ff0:c51:d995:61c4:e64:8acc? ([2001:1620:ff0:c51:d995:61c4:e64:8acc]) by smtp.googlemail.com with ESMTPSA id r6sm4767247wia.0.2015.10.22.06.59.35 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Oct 2015 06:59:36 -0700 (PDT) Subject: Re: CC core dumping with CLANG 3.7 on armv5 - DREAMPLUG To: Konstantin Belousov References: <5626144F.9060003@gmail.com> <5628873F.7050509@gmail.com> <20151022081551.GB2257@kib.kiev.ua> <5628B0B0.8040804@gmail.com> <20151022111407.GD2257@kib.kiev.ua> <5628D958.4060904@gmail.com> <20151022133318.GE2257@kib.kiev.ua> Cc: freebsd-arm From: Mattia Rossi Message-ID: <5628EBC7.8070904@gmail.com> Date: Thu, 22 Oct 2015 15:59:35 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151022133318.GE2257@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2015 13:59:38 -0000 Am 22.10.2015 um 15:33 schrieb Konstantin Belousov: > On Thu, Oct 22, 2015 at 02:40:56PM +0200, Mattia Rossi wrote: >> >> Am 22.10.2015 um 13:14 schrieb Konstantin Belousov: >>> On Thu, Oct 22, 2015 at 11:47:28AM +0200, Mattia Rossi wrote: >>>>> You may disassemble the instruction at the address, and print the content >>>>> of registers: >>>>> (gdb) disassemble *0x01eb0868-8,0x01eb0868+8 >>>>> (gdb) info registers >>>>> >>>>> If the cause of your issue is weird codegeneration on ARMv5, it might be >>>>> seen from the data above. On the other hand, this would not help if the >>>>> issue is algorithmic. I am afraid there is not much more to suggest. >>>> (gdb) disassemble *0x01eb0868-8,0x01eb0868+8 >>>> No function contains specified address. >>> Apparently correct syntax is >>> disassemble 0x01eb0868-8 0x01eb0868+8 >> (gdb) bt >> #0 0x01eb0868 in ?? () >> (gdb) disassemble 0x01eb0868-8 0x01eb0868+8 >> Dump of assembler code from 0x1eb0860 to 0x1eb0870: >> 0x01eb0860: add r12, r12, #1 ; 0x1 >> 0x01eb0864: and r7, r0, r3 >> 0x01eb0868: ldr r1, [r10, r7, lsl #2] >> 0x01eb086c: cmp r1, #0 ; 0x0 >> End of assembler dump. >> (gdb) info registers >> r0 0x1e53b 124219 >> r1 0x6a 106 >> r2 0xc3c3c3c6 -1010580538 >> r3 0x5a5a5a59 1515870809 >> r4 0x3 3 >> r5 0x1fd9f83 33398659 >> r6 0x1e53b 124219 >> r7 0x4019 16409 >> r8 0x22a1708c 581005452 >> r9 0xffffffff -1 >> r10 0x5a5a5a5a 1515870810 >> r11 0xbfbfeb70 -1077941392 >> r12 0x1 1 >> sp 0xbfbfeb48 -1077941432 >> lr 0x8f5c 36700 >> pc 0x1eb0868 32180328 >> fps 0x0 0 >> cpsr 0x60000010 1610612752 >> (gdb) >> >> Still I can't tell anything from that :-/ - way too low level for me > r10, which is the base register in the faulted instruction, contains the > 0x5a5a5a5a value. This pattern is filled by the debugging version of > malloc to catch dereferences through the pointers located in freed > memory. On the other hand, the asm itself looks relatively reasonable. > > The issue looks as the clang bug. But, without proper backtrace and > line numbers, I doubt that clang developers would be able to make any > further investigation. Thanks for the explanation. Is there any way to build just clang with debugging symbols? I've tried cd-ing into usr.bin/clang/ and issue "make obj all install" with the proper targets set, but that complains about src.bsd.mk not being found and bails out...