From owner-svn-src-head@freebsd.org Fri Sep 18 14:07:50 2020 Return-Path: Delivered-To: svn-src-head@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 D565E3E456F; Fri, 18 Sep 2020 14:07:50 +0000 (UTC) (envelope-from kevans@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BtFzB5Pp1z4cBn; Fri, 18 Sep 2020 14:07:50 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 9779910A8D; Fri, 18 Sep 2020 14:07:50 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f54.google.com with SMTP id ef16so2893260qvb.8; Fri, 18 Sep 2020 07:07:50 -0700 (PDT) X-Gm-Message-State: AOAM531QIUZw7zJXNCT+WekD3fdHwWTr5lXoYXhmnuyk5aUO9RNMXiQ5 eOp+p4ouFZFYAgII4ag0bsYDCQqMRp26HR8GX0A= X-Google-Smtp-Source: ABdhPJwn5ifSMqFxNwaAFLrat9DjYshju/ZPs/x6OYLJZebbyFlSdOjxI3zaWN2zFskYdLkrI0guaXLYyr2LlTBM2zc= X-Received: by 2002:a0c:f0d1:: with SMTP id d17mr17472990qvl.34.1600438069818; Fri, 18 Sep 2020 07:07:49 -0700 (PDT) MIME-Version: 1.0 References: <202009181122.08IBMYpo032313@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Fri, 18 Sep 2020 09:07:37 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365876 - in head/lib/libarchive: . tests To: Alexander Richardson Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2020 14:07:50 -0000 On Fri, Sep 18, 2020 at 9:06 AM Alexander Richardson wrote: > > On Fri, 18 Sep 2020 at 14:12, Kyle Evans wrote: > > > > On Fri, Sep 18, 2020 at 6:22 AM Alex Richardson wrote: > > > > > > Author: arichardson > > > Date: Fri Sep 18 11:22:34 2020 > > > New Revision: 365876 > > > URL: https://svnweb.freebsd.org/changeset/base/365876 > > > > > > Log: > > > libarchive: fix mismatch between library and test configuration > > > > > > I was investigating libarchive test failures on CheriBSD and it turns out > > > we get a reproducible SIGBUS for test_archive_m5, etc. Debugging this shows > > > that libarchive and the tests disagree when it comes to the definition of > > > archive_md5_ctx: libarchive assumes it's the OpenSSL type whereas the test > > > use the libmd type. The latter is not necessarily aligned enough to store > > > a pointer (16 bytes for CHERI RISC-V), so we were crashing when storing > > > EVP_MD_CTX* to an 8-byte-aligned archive_md5_ctx. > > > > > > To avoid problems like this in the future, factor out the common compiler > > > flags into a Makefile.inc and include that from the tests Makefile. > > > > > > Reviewed By: lwhsu > > > Differential Revision: https://reviews.freebsd.org/D26469 > > > > > > Added: > > > head/lib/libarchive/Makefile.inc (contents, props changed) > > > Modified: > > > head/lib/libarchive/Makefile > > > head/lib/libarchive/tests/Makefile > > > > > > [.. snip ..] > > > Modified: head/lib/libarchive/tests/Makefile > > > ============================================================================== > > > --- head/lib/libarchive/tests/Makefile Fri Sep 18 11:04:16 2020 (r365875) > > > +++ head/lib/libarchive/tests/Makefile Fri Sep 18 11:22:34 2020 (r365876) > > > @@ -1,4 +1,5 @@ > > > # $FreeBSD$ > > > +.include > > > > > > PACKAGE= tests > > > > > > @@ -15,7 +16,7 @@ PROGS+= libarchive_test > > > CFLAGS+= -I${.CURDIR} -I${.CURDIR:H} -I${.OBJDIR} > > > CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive -I${_LIBARCHIVEDIR}/libarchive/test > > > CFLAGS+= -I${_LIBARCHIVEDIR}/test_utils > > > -CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 > > > +.include "../Makefile.inc" > > > > > > # Uncomment to link against dmalloc > > > #LDADD+= -L/usr/local/lib -ldmalloc > > > > Is the explicit .include here necessary (e.g. for ordering)? I note > > that inclusion of the parent directory's Makefile.inc is already > > guaranteed by bsd.init.mk, so this duplicates all the CFLAGS > > additions. > > > Thanks, I didn't notice that it was already being included. Fixed in r365882 > Excellent, thanks! =)