From owner-freebsd-toolchain@freebsd.org Sat Nov 7 19:55:37 2020 Return-Path: Delivered-To: freebsd-toolchain@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 351CE2D04FE for ; Sat, 7 Nov 2020 19:55:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4CT7KP0Y6hz3l3T for ; Sat, 7 Nov 2020 19:55:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 10FB62D080A; Sat, 7 Nov 2020 19:55:37 +0000 (UTC) Delivered-To: toolchain@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 1086E2D045E for ; Sat, 7 Nov 2020 19:55:37 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CT7KN6Spqz3l7s for ; Sat, 7 Nov 2020 19:55:36 +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 C95731414E for ; Sat, 7 Nov 2020 19:55:36 +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 0A7JtaEv091220 for ; Sat, 7 Nov 2020 19:55:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0A7Jtat8091219 for toolchain@FreeBSD.org; Sat, 7 Nov 2020 19:55:36 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 250702] c++filt crashes on a symbol representing a C++ lambda function Date: Sat, 07 Nov 2020 19:55:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 12.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: toolchain@FreeBSD.org X-Bugzilla-Flags: mfc-stable12+ mfc-stable11+ X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 19:55:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250702 --- Comment #22 from commit-hook@FreeBSD.org --- A commit references this bug: Author: dim Date: Sat Nov 7 19:55:07 UTC 2020 New revision: 367462 URL: https://svnweb.freebsd.org/changeset/base/367462 Log: Sync up elftoolchain with head, except for the capsicum-related commits, which are incompatible with stable/12. MFC r345360 (by oshogbo): strings: do not depend on stdin Instead of depending on one stdin FILE structure and use freopen(3), pass= to the functions appropriate FILE structure. Reviewed by: cem Discussed with: emaste Differential Revision: https://reviews.freebsd.org/D18037 MFC r345361 (by oshogbo): strings: do not continue if getc or getcharacter returns EOF Reported by: cem MFC r345362 (by oshogbo): Fix powerpc and arm builds after r345361. Reported by: jenkins MFC r345364 (by oshogbo): In case of ENCODING_8BIT the EOF code will be pass to putchar. EOF check should be done before (uint8_t)c > 127 test. Reported by: cem MFC r345431 (by oshogbo): strings: return an error code and the char value separately If we returning 32 bits value it's hard to distinguish if the returned va= lue is a valid one or if its an error (in case of EOF). For that reason separ= ate exit code of the function from the returned character. Reported by: cem, se MFC r346323 (by emaste): readelf: speed up readelf -wo Use an array instead of STAILQ, and sort at the end instead of while adding new elements. PR: 212539 Submitted by: Bora ?zarslan Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC r346327 (by emaste): readelf: use size_t for object counts PR: 212539 Reported by: cem Sponsored by: The FreeBSD Foundation MFC r348776 (by csjp): Teach readelf about some OpenBSD ELF program headers - Add constants for OpenBSD wxneeded, bootdata and randomize to the FreeBSD elf_common.h file. This is the file that gets used by the elftoolchain library. - Update readelf and elfdump utilities to decode these program headers if they are encountered. Note: FreeBSD has it's own version of elfdump(1), which will be updated in a subsequent commit. I am adding it here anyway because this diff is going to be submitted upstream. Discussed with: emaste Reviewed by: imp MFC afer: 2 weeks Differential Revision: https://reviews.freebsd.org/D20548 M contrib/elftoolchain/elfdump/elfdump.c M contrib/elftoolchain/readelf/readelf.c M sys/sys/elf_common.h MFC r349510 (by luporl): [PowerPC64] readelf: print description for 'e_flags' in ELF header (ABI t= ype) This prints out description text with the meaning of 'Flags' value in PowerPC64. Example: $ readelf -h ~/tmp/t1-Flag2 ELF Header: Magic: 7f 45 4c 46 02 02 01 09 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, big endian Version: 1 (current) OS/ABI: FreeBSD ABI Version: 0 Type: EXEC (Executable file) Machine: PowerPC 64-bit Version: 0x1 Entry point address: 0x10010000 Start of program headers: 64 (bytes into file) Start of section headers: 209368 (bytes into file) Flags: 0x2, OpenPOWER ELF V2 ABI Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 10 Size of section headers: 64 (bytes) Number of section headers: 34 Section header string table index: 31 Submitted by: alfredo.junior_eldorado.org.br Reviewed by: luporl Differential Revision: https://reviews.freebsd.org/D20782 MFC r350511 (by emaste): readelf: decode NT_GNU_PROPERTY_TYPE_0 / GNU_PROPERTY_X86_FEATURE_1_AND These bits are used for Intel CET IBT/Shadow Stack. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20516 MFC r354544 (by emaste): elfcopy/strip: Ensure sections have required alignment on output Object files may specify insufficient alignment on certain sections, for example due to a bug in NASM[1]. When we detect that case in elfcopy or strip, emit a warning and increase the alignment to the minimum required. The NASM bug was fixed in 2015[2], but we might as well have this fixup (and warning) in elfcopy in case we encounter such a file for any other reason. This might be reworked somewhat upstream - see ELF Tool Chain ticket 485[3]. [1] https://bugzilla.nasm.us/show_bug.cgi?id=3D3392307 [2] https://repo.or.cz/w/nasm.git/commit/1f0cb0f2c1ba632c0fab02424928cfb756a916= 0c [3] https://sourceforge.net/p/elftoolchain/tickets/485/ PR: 198611 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2292 MFC r357540 (by markj): readelf: Fix a double close of the input file. The caller of dump_object() is responsible for opening the file, let it be responsible for closing too. CID: 1411588 Sponsored by: The FreeBSD Foundation MFC r357541 (by markj): readelf: Fix the check for an error from realloc(). Use err() instead of errx() while here, since realloc() sets errno. CID: 1401326 Sponsored by: The FreeBSD Foundation MFC r358499 (by emaste): readelf: add PROTMAX_DISABLE and STKGAP_DISABLE From r349609 (PROTMAX_DISABLE) and r354790 (STKGAP_DISABLE). Commited upstream (in a slightly different form) as r3831. Sponsored by: The FreeBSD Foundation MFC r358631 (by emaste): Reserve WXNEEDED ELF feature control flag This will be used to tag binaries that require W+X mappings, in advance of the ability to prevent W^X in mmap/mprotect. There is still some discussion about the flag's name, but the ABI won't change even if the name does (as kib pointed out in the review). Reviewed by: csjp, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23909 MFC r358637 (by emaste): readelf: check note namesz and descsz Previously corrupt note namesz or descsz (perhaps caused by readelf's current lack of endian support for notes) resulted in a crash. Check that namesz and descsz do not extend beyond the end of the buffer before trying to access name and desc data. Reported by: jhb Sponsored by: The FreeBSD Foundation MFC r358639 (by emaste): readelf: simplify namesz / descsz checks Sponsored by: The FreeBSD Foundation MFC r358685 (by emaste): libelf: rationalize error handling in ELF note conversion Previously _libelf_cvt_NOTE_tom (to host) returned false if a note's namesz + descsz exceeded the buffer size, while _libelf_cvt_NOTE_tof (to file) silently truncated. Return false in the latter case too. Sponsored by: The FreeBSD Foundation MFC r358706 (by emaste): readelf: add XEN_ELFNOTE_PHYS32_ENTRY note See r336469 for details. Sponsored by: The FreeBSD Foundation MFC r358708 (by emaste): readelf: decode and print Xen ELF note strings Sponsored by: The FreeBSD Foundation MFC r358713 (by emaste): readelf: print GNU Build-ID Sponsored by: The FreeBSD Foundation MFC r359189 (by emaste): readelf: simplify Xen string note printing Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24140 MFC r361662 (by emaste): readelf: add more DT_FLAGS_1 flags Reference: https://docs.oracle.com/cd/E36784_01/html/E36857/chapter6-42444.html > DF_1_SINGLETON Singleton symbols exist. > DF_1_STUB Object is a stub. > DF_1_PIE Object is a position-independent executable. Sponsored by: The FreeBSD Foundation MFC r364517 (by kib): Reserve FreeBSD ELF feature control bit LA48 to control VA layout on amd6= 4. Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 MFC r365489 (by bdragon): [PowerPC64LE] PPC64LE support for libelf. Fix native detection when building on powerpc64le. I will be submitting this and r361104 upstream shortly. Sponsored by: Tag1 Consulting, Inc. MFC r366977 (by emaste): libelf: add compression header support GNU and Oracle libelf implementations added support for section compression, intended to reduce the size of DWARF debug info (which might be an order of magnitude larger than the code). There are two compressed ELF section formats: 1. Old GNU - sections are renmaed to start with 'z'. Section contains a magic number, uncompressed size, and compressed data. 2. Oracle and New GNU - compressed sections use the SHF_COMPRESSED flag. The compression header contains the compression type, uncompressed size, and uncompressed alignment. The second style is preferred and this change implements only that one. Submitted by: Tiger Gao Reviewed by: markj Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24566 MFC r367209 (by emaste): readelf: Add -z decompression support Compatible with GNU readelf, -z decompresses sections displayed by -x or -p. ELF Tool Chain ticket #555 https://sourceforge.net/p/elftoolchain/tickets/555/ Submitted by: Tiger Gao Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26909 MFC r367238 (by bdragon): Fix 32-bit build after r367209 Fix build on systems with a 32-bit size_t. Since it's being passed as a pointer, a 64-bit write to it will overflow. MFC with: r367209 MFC r367322 (by dim): Merge elftoolchain r3877 (by jkoshy): Incorporate fixes from Dimitry Andric: - Use a BUFFER_GROW() macro to avoid rounding errors in capacity calculations. - Fix a bug introduced in [r3531]. - Fix handling of nested template parameters. Ticket: #581 This should fix a number of assertions on elftoolchain's cxxfilt, and allow it to correctly demangle several names that it could not handle before. Obtained from: https://sourceforge.net/p/elftoolchain/code/3877/ PR: 250702 Changes: _U stable/12/ stable/12/contrib/elftoolchain/elfcopy/sections.c stable/12/contrib/elftoolchain/libelf/Version.map stable/12/contrib/elftoolchain/libelf/_libelf.h stable/12/contrib/elftoolchain/libelf/_libelf_config.h stable/12/contrib/elftoolchain/libelf/gelf.3 stable/12/contrib/elftoolchain/libelf/gelf.h stable/12/contrib/elftoolchain/libelf/gelf_chdr.c stable/12/contrib/elftoolchain/libelf/gelf_getchdr.3 stable/12/contrib/elftoolchain/libelf/libelf.h stable/12/contrib/elftoolchain/libelf/libelf_chdr.c stable/12/contrib/elftoolchain/libelf/libelf_convert.m4 stable/12/contrib/elftoolchain/libelftc/_libelftc.h stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c stable/12/contrib/elftoolchain/libelftc/libelftc_vstr.c stable/12/contrib/elftoolchain/readelf/readelf.1 stable/12/contrib/elftoolchain/readelf/readelf.c stable/12/contrib/elftoolchain/strings/strings.c stable/12/lib/libelf/Makefile stable/12/sys/sys/elf_common.h stable/12/usr.bin/elfctl/elfctl.c stable/12/usr.bin/readelf/Makefile --=20 You are receiving this mail because: You are the assignee for the bug.=