From nobody Wed May 26 10:48:32 2021 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9BD50CFEC8A for ; Wed, 26 May 2021 10:48:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fqnjr3dF3z4jbG for ; Wed, 26 May 2021 10:48:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 642F87650 for ; Wed, 26 May 2021 10:48:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 14QAmWu0014782 for ; Wed, 26 May 2021 10:48:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 14QAmWw3014781 for ports-bugs@FreeBSD.org; Wed, 26 May 2021 10:48:32 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 256166] cad/brlcad: Fix build with clang 12 Date: Wed, 26 May 2021 10:48:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256166 Bug ID: 256166 Summary: cad/brlcad: Fix build with clang 12 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: dim@FreeBSD.org CC: erik@brlcad.org Flags: maintainer-feedback?(erik@brlcad.org) CC: erik@brlcad.org Created attachment 225273 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D225273&action= =3Dedit Fix null pointer accesses in brlcad's EntList During an exp-run for llvm 12 (see bug 255570), it turned out that cad/brlc= ad does not build with clang 12.0.0 [1]: [ 99% 4379/4403] cd /wrkdirs/usr/ports/cad/brlcad/work/brlcad-7.30.2/db/nis= t && /wrkdirs/usr/ports/cad/brlcad/work/brlcad-7.30.2/bin/step-g -O /wrkdirs/usr/ports/cad/brlcad/work/brlcad-7.30.2/share/db/nist/NIST_MBE_PMI= _11.g /wrkdirs/usr/ports/cad/brlcad/work/brlcad-7.30.2/db/nist/NIST_MBE_PMI_11.st= p > /wrkdirs/usr/ports/cad/brlcad/work/brlcad-7.30.2/db/nist/NIST_MBE_PMI_11.log 2>&1 FAILED: share/db/nist/NIST_MBE_PMI_11.g=20 What happens is that the step-g intermediate program segfaults, because it attempts to access a null pointer. Valgrind shows: Reading Data from /wrkdirs/share/dim/ports/cad/brlcad/work/brlcad-7.30.2/db/nist/NIST_MBE_PMI= _11.stp... HEADER read: =3D=3D24919=3D=3D Invalid read of size 4 =3D=3D24919=3D=3D at 0x1337BA10: EntList::firstNot(JoinType) (entlist.cc= :39) =3D=3D24919=3D=3D by 0x1337C93E: nextNot (complexSupport.h:185) =3D=3D24919=3D=3D by 0x1337C93E: AndList::matchNonORs(EntNode*) (non-ors= .cc:135) =3D=3D24919=3D=3D by 0x1337B77C: ComplexList::matches(EntNode*) (complex= list.cc:176) =3D=3D24919=3D=3D by 0x1337B36A: ComplexCollect::supports(EntNode*) const (collect.cc:140) =3D=3D24919=3D=3D by 0x1335FA5A: STEPcomplex::Initialize(char const**, c= har const*) (STEPcomplex.cc:126) =3D=3D24919=3D=3D by 0x1335F774: STEPcomplex::STEPcomplex(Registry*, std::__1::basic_string, std::__1::allocator > const**, int, char const*) (STEPcomplex.cc:33) =3D=3D24919=3D=3D by 0x1331842E: STEPfile::CreateSubSuperInstance(std::__1::basic_istream >&, int, ErrorDescriptor&) (STEPfile.cc:1048) =3D=3D24919=3D=3D by 0x13315E15: STEPfile::CreateInstance(std::__1::basic_istream >&, std::__1::basic_ostream >&) (STEPfile.cc:833) =3D=3D24919=3D=3D by 0x133158B1: STEPfile::ReadData1(std::__1::basic_ist= ream >&) (STEPfile.cc:502) =3D=3D24919=3D=3D by 0x13319EA8: STEPfile::AppendFile(std::__1::basic_is= tream >*, bool) (STEPfile.cc:1674) =3D=3D24919=3D=3D by 0x1331C984: STEPfile::ReadExchangeFile(std::__1::basic_string, std::__1::allocator >, bool) (STEPfile.inline.cc:119) =3D=3D24919=3D=3D by 0x3AFDCE: STEPWrapper::load(std::__1::basic_string<= char, std::__1::char_traits, std::__1::allocator >&) (STEPWrapper.cpp:1300) =3D=3D24919=3D=3D Address 0x8 is not stack'd, malloc'd or (recently) free'd =3D=3D24919=3D=3D =3D=3D24919=3D=3D =3D=3D24919=3D=3D Process terminating with default action of signal 11 (SIG= SEGV): dumping core =3D=3D24919=3D=3D Access not within mapped region at address 0x8 =3D=3D24919=3D=3D at 0x1337BA10: EntList::firstNot(JoinType) (entlist.cc= :39) =3D=3D24919=3D=3D by 0x1337C93E: nextNot (complexSupport.h:185) =3D=3D24919=3D=3D by 0x1337C93E: AndList::matchNonORs(EntNode*) (non-ors= .cc:135) =3D=3D24919=3D=3D by 0x1337B77C: ComplexList::matches(EntNode*) (complex= list.cc:176) =3D=3D24919=3D=3D by 0x1337B36A: ComplexCollect::supports(EntNode*) const (collect.cc:140) =3D=3D24919=3D=3D by 0x1335FA5A: STEPcomplex::Initialize(char const**, c= har const*) (STEPcomplex.cc:126) =3D=3D24919=3D=3D by 0x1335F774: STEPcomplex::STEPcomplex(Registry*, std::__1::basic_string, std::__1::allocator > const**, int, char const*) (STEPcomplex.cc:33) =3D=3D24919=3D=3D by 0x1331842E: STEPfile::CreateSubSuperInstance(std::__1::basic_istream >&, int, ErrorDescriptor&) (STEPfile.cc:1048) =3D=3D24919=3D=3D by 0x13315E15: STEPfile::CreateInstance(std::__1::basic_istream >&, std::__1::basic_ostream >&) (STEPfile.cc:833) =3D=3D24919=3D=3D by 0x133158B1: STEPfile::ReadData1(std::__1::basic_ist= ream >&) (STEPfile.cc:502) =3D=3D24919=3D=3D by 0x13319EA8: STEPfile::AppendFile(std::__1::basic_is= tream >*, bool) (STEPfile.cc:1674) =3D=3D24919=3D=3D by 0x1331C984: STEPfile::ReadExchangeFile(std::__1::basic_string, std::__1::allocator >, bool) (STEPfile.inline.cc:119) =3D=3D24919=3D=3D by 0x3AFDCE: STEPWrapper::load(std::__1::basic_string<= char, std::__1::char_traits, std::__1::allocator >&) (STEPWrapper.cpp:1300) =3D=3D24919=3D=3D If you believe this happened as a result of a stack =3D=3D24919=3D=3D overflow in your program's main thread (unlikely but =3D=3D24919=3D=3D possible), you can try to increase the size of the =3D=3D24919=3D=3D main thread stack using the --main-stacksize=3D flag. =3D=3D24919=3D=3D The main thread stack size used in this run was 16777216. To fix this, add null pointer checks to EntList::firstNot() and various oth= er EntList functions. [1] http://package22.nyi.freebsd.org/data/mainamd64PR255570-default/2021-05-08_= 16h02m24s/logs/brlcad-7.30.2.log --=20 You are receiving this mail because: You are the assignee for the bug.=