From owner-freebsd-stable@freebsd.org Thu Jan 28 23:57:54 2021 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C79874F174F; Thu, 28 Jan 2021 23:57:54 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DRcq65HwHz4skx; Thu, 28 Jan 2021 23:57:54 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.not-for.work (onlyone.not-for.work [148.251.9.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: lev/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 8EFC0618A; Thu, 28 Jan 2021 23:57:54 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from [IPv6:2001:470:923f:1:40b6:c8cd:a69f:2276] (unknown [IPv6:2001:470:923f:1:40b6:c8cd:a69f:2276]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.not-for.work (Postfix) with ESMTPSA id 8736EA41A; Fri, 29 Jan 2021 02:57:51 +0300 (MSK) To: freebsd-stable@freebsd.org, FreeBSD Hackers Reply-To: lev@FreeBSD.org From: Lev Serebryakov Subject: `clang -pg` generates binary which coredumps on start Organization: FreeBSD Message-ID: <61cebbd1-4e8d-d9d7-dda2-388e81e61599@FreeBSD.org> Date: Fri, 29 Jan 2021 02:57:50 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2021 23:57:54 -0000 I'm trying to profile my user-level program on FreeBSD 12-STABLE (amd64). When I build it with `cc -g -pg -O3` it coredumps on start. What do I do wrong? (lldb) bt * thread #1, name = 'mergenets', stop reason = signal SIGSEGV * frame #0: 0x0000000000000000 frame #1: 0x000000000028ebbf mergenets`__vdso_gettc(th=0x00007ffffffff270, tc=0x00007fffffffddbc) at __vdso_gettc.c:0 frame #2: 0x000000000028e8c3 mergenets`binuptime [inlined] tc_delta(th=) at __vdso_gettimeofday.c:46:10 frame #3: 0x000000000028e8ba mergenets`binuptime(bt=0x00007fffffffde08, tk=0x00007ffffffff1b0, abs=0) at __vdso_gettimeofday.c:78 frame #4: 0x000000000028ea73 mergenets`__vdso_clock_gettime(clock_id=4, ts=0x00007fffffffde68) at __vdso_gettimeofday.c:165:10 frame #5: 0x0000000000281efb mergenets`__clock_gettime(clock_id=4, ts=0x00007fffffffde68) at clock_gettime.c:48:11 frame #6: 0x000000000024339f mergenets`nstime_update_impl [inlined] nstime_get(time=0x0000000800403a88) at jemalloc_nstime.c:128:2 frame #7: 0x0000000000243395 mergenets`nstime_update_impl(time=0x0000000800403a88) at jemalloc_nstime.c:160 frame #8: 0x0000000000234b6d mergenets`__je_arena_new [inlined] arena_decay_reinit(decay=0x0000000800403a20, decay_ms=) at jemalloc_arena.c:572:2 frame #9: 0x0000000000234b21 mergenets`__je_arena_new [inlined] arena_decay_init(decay=0x0000000800403a20, decay_ms=, stats=0x00000008004009a0) at jemalloc_arena.c:593 frame #10: 0x0000000000234b1a mergenets`__je_arena_new(tsdn=0x0000000000000000, ind=0, extent_hooks=) at jemalloc_arena.c:1858 frame #11: 0x00000000002239c0 mergenets`__je_arena_init [inlined] arena_init_locked(tsdn=0x0000000000000000, ind=0, extent_hooks=0x0000000000205778) at jemalloc_jemalloc.c:338:10 frame #12: 0x00000000002239b2 mergenets`__je_arena_init(tsdn=0x0000000000000000, ind=0, extent_hooks=0x0000000000205778) at jemalloc_jemalloc.c:366 frame #13: 0x000000000022f946 mergenets`malloc_init_hard_a0_locked at jemalloc_jemalloc.c:1328:6 frame #14: 0x0000000000222cf5 mergenets`a0ialloc [inlined] malloc_init_hard_a0 at jemalloc_jemalloc.c:1343:8 frame #15: 0x0000000000222caa mergenets`a0ialloc [inlined] malloc_init_a0 at jemalloc_jemalloc.c:214 frame #16: 0x0000000000222caa mergenets`a0ialloc(size=6223, zero=false, is_internal=false) at jemalloc_jemalloc.c:234 frame #17: 0x00000000002225fc mergenets`__libc_allocate_tls [inlined] malloc_aligned(size=6200, align=16) at tls.c:135:8 frame #18: 0x00000000002225e2 mergenets`__libc_allocate_tls(oldtls=0x0000000000000000, tcbsize=, tcbalign=) at tls.c:359 frame #19: 0x00000000002227d0 mergenets`_init_tls at tls.c:469:8 frame #20: 0x000000000021f234 mergenets`_start(ap=, cleanup=) at crt1.c:66:3 -- // Lev Serebryakov