From owner-svn-src-head@freebsd.org Fri Sep 18 14:06:25 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 1E2873E481A; Fri, 18 Sep 2020 14:06:25 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BtFxX5dStz4cGk; Fri, 18 Sep 2020 14:06:24 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ej1-f65.google.com with SMTP id gr14so8356574ejb.1; Fri, 18 Sep 2020 07:06:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bw0J8Vc06gSbyQdUzd0+58ZQDOYxpIBsQ+/g1bcVBIc=; b=Qj2MicPNtIU9dx6FnOjhAyN8rBjBJLBfS9CH1UydlJdY5Z7Lng2zZy4aCNqyMPmysV sJwngfbBGbwDHkmfLjHaw465FFe0IE4NDhQTHnskR/SnKMcymqwZMbVjnZVaoPA8OZyK TxhyNKzSVI2kgLhAm0erguXmnW0lHdjLAkTPOo0yBH/F7yiYYyyv/0BKTNGa4IjxMUsH YQGjhj5fedeR2Q1pKTfe8jeW0ELRwaHC4FNk4CzTcoFSGjDsJzs9cs0K5If7Fuf6udnP x8zFEJWzzNu2S54NWWq22+R4Bmbfucl7w8n+NWUUOTQeum4unFgRlajb3BtAVYDBB2hM Asgw== X-Gm-Message-State: AOAM5323BVMB+WTCUwXAxUCROqn5M6nmjOjr4RGIGrZEXgUKBfh5niDW 5MOF9tSOz53ytqA/Fgaw9kGQPOesSFBNjyIa X-Google-Smtp-Source: ABdhPJwb3/CI3U33hcfky8Fl7lR/fln7TvcGu5GcVu6HdBhCrh7oWOyLfjTaRhOwPe+ftbnOZU8BAA== X-Received: by 2002:a17:907:20d9:: with SMTP id qq25mr34569396ejb.382.1600437983111; Fri, 18 Sep 2020 07:06:23 -0700 (PDT) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com. [209.85.128.54]) by smtp.gmail.com with ESMTPSA id k13sm2312820edj.92.2020.09.18.07.06.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Sep 2020 07:06:22 -0700 (PDT) Received: by mail-wm1-f54.google.com with SMTP id d4so5459492wmd.5; Fri, 18 Sep 2020 07:06:22 -0700 (PDT) X-Received: by 2002:a1c:e256:: with SMTP id z83mr16937290wmg.137.1600437982138; Fri, 18 Sep 2020 07:06:22 -0700 (PDT) MIME-Version: 1.0 References: <202009181122.08IBMYpo032313@repo.freebsd.org> In-Reply-To: From: Alexander Richardson Date: Fri, 18 Sep 2020 15:06:09 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365876 - in head/lib/libarchive: . tests To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4BtFxX5dStz4cGk X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] 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:06:25 -0000 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 Alex