From owner-freebsd-questions@freebsd.org Sun Jun 11 02:31:03 2017 Return-Path: Delivered-To: freebsd-questions@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 07FCABFBEAF for ; Sun, 11 Jun 2017 02:31:03 +0000 (UTC) (envelope-from rcarter@pinyon.org) Received: from h2.pinyon.org (h2.pinyon.org [65.101.20.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D14C370035 for ; Sun, 11 Jun 2017 02:31:02 +0000 (UTC) (envelope-from rcarter@pinyon.org) Received: by h2.pinyon.org (Postfix, from userid 58) id E53B9F5F7; Sat, 10 Jun 2017 19:24:24 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pinyon.org; s=DKIM; t=1497147864; bh=oN/gyLfJWd2S60eFwLxfv5FhVzbqMduwXtRZPH5W+9w=; h=Subject:To:References:From:Date:In-Reply-To; b=XO8QWOK6bqTPHcUywS8msGME9TTL/ZY6Yk1N4eDaauiMTN6nzIBEdZX/GnFoUcFf5 Y/JC3+fM8ddfpaBi0ge9ZIuxJtKv8urAGty/bhiBF4gid7P4iUFuANorI7T6/o7e5R EX6Pw9was2THO31hFg3N4Nm+52wZ8GG8u4lA5Xls= X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on h2.n1.pinyon.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from [10.0.10.15] (h1.pinyon.org [65.101.20.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by h2.pinyon.org (Postfix) with ESMTPSA id 513ACF5EA for ; Sat, 10 Jun 2017 19:24:24 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pinyon.org; s=DKIM; t=1497147864; bh=oN/gyLfJWd2S60eFwLxfv5FhVzbqMduwXtRZPH5W+9w=; h=Subject:To:References:From:Date:In-Reply-To; b=XO8QWOK6bqTPHcUywS8msGME9TTL/ZY6Yk1N4eDaauiMTN6nzIBEdZX/GnFoUcFf5 Y/JC3+fM8ddfpaBi0ge9ZIuxJtKv8urAGty/bhiBF4gid7P4iUFuANorI7T6/o7e5R EX6Pw9was2THO31hFg3N4Nm+52wZ8GG8u4lA5Xls= Subject: Re: -O2 flag To: freebsd-questions@freebsd.org References: <593C4679.5010104@gmail.com> <20170610223753.4e37600d2c32d0b689144e00@yahoo.es> <593C8DE1.4060803@gmail.com> <1497145677.3245.5.camel@mailman-hosting.com> From: "Russell L. Carter" Message-ID: <74d71bbd-a177-5fbc-8ed2-ca42e3f4915c@pinyon.org> Date: Sat, 10 Jun 2017 19:24:23 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1497145677.3245.5.camel@mailman-hosting.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jun 2017 02:31:03 -0000 On 06/10/17 18:47, Jim Ohlstein wrote: > On Sat, 2017-06-10 at 21:25 -0300, Friedrich Locke wrote: >> i switched to clan40, same error, i.e., it still persist. >> >> The problem is that open OpenBSD/amd64 6.1, "gcc -O2" works 100 %. >> >> What could it be the problem ? > > As a practical suggestion, how about installing one of the versions of > gcc in ports and using that to compile your app? > > He's tried both gcc and clang and the result was the same. The problem is most likely an assumption about the values on the stack, given that the application "works" on openbsd. These stack details were pointed out previously and all the new evidence only increases the likelihood that it is a stack problem in the code. No guarantees, though. HtH, Russell