From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 60228385783D for ; Sat, 7 Nov 2020 01:16:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 60228385783D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id CAE0F1E58D; Fri, 6 Nov 2020 20:16:03 -0500 (EST) Subject: Re: I'm a beginner and need help about "Segmentation fault" error. To: Jason Long , "gdb@sourceware.org" References: <394886388.1091427.1604422440532.ref@mail.yahoo.com> <394886388.1091427.1604422440532@mail.yahoo.com> <780402530.1737902.1604686257419@mail.yahoo.com> From: Simon Marchi Message-ID: Date: Fri, 6 Nov 2020 20:16:03 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <780402530.1737902.1604686257419@mail.yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 01:16:07 -0000 On 2020-11-06 1:10 p.m., Jason Long via Gdb wrote: > Thank you. > I did what you said: > > (gdb) run > Starting program: /usr/local/bin/ramme > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". > > > Program received signal SIGSEGV, Segmentation fault. > 0x0000000000e6e0c0 in ?? () > (gdb) backtrace > #0 0x0000000000e6e0c0 in ?? () > #1 0x00007ffff7d85462 in node::http2::Http2Session::Callbacks::Callbacks(bool) > () from /opt/Ramme/libnode.so > #2 0x00007ffff7d85525 in ?? () from /opt/Ramme/libnode.so > #3 0x00007ffff7fe437a in call_init (l=, argc=argc@entry=1, > argv=argv@entry=0x7fffffffe248, env=env@entry=0x7fffffffe258) > at dl-init.c:72 > #4 0x00007ffff7fe4476 in call_init (env=0x7fffffffe258, argv=0x7fffffffe248, > argc=1, l=) at dl-init.c:30 > #5 _dl_init (main_map=0x7ffff7ffe190, argc=1, argv=0x7fffffffe248, > env=0x7fffffffe258) at dl-init.c:119 > #6 0x00007ffff7fd60ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 > #7 0x0000000000000001 in ?? () > #8 0x00007fffffffe52b in ?? () > #9 0x0000000000000000 in ?? () > > > What is the next step? The next step would be to compile your program with debug info (-g3) and without optimization (-O0). I also suggest you search and read for any GDB tutorial out there, it will walk you though these steps. Simon