From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id A4CE0385841E for ; Fri, 4 Nov 2022 17:21:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A4CE0385841E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-wm1-x333.google.com with SMTP id p13-20020a05600c468d00b003cf8859ed1bso3594403wmo.1 for ; Fri, 04 Nov 2022 10:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=hgxI+/xNd6oVW/WVf38S+AfMfC0sw89WNvB0XRSAo34=; b=SWhC9MGBXMGNoH6yjVf7toTdlUAcmixpMMkcELPpxIvydPxwzaT2p+imcIYih1Ntr6 26uhL05JbI3vWhMT/M2SzWnQGtuFq4MOmKRSrrxlmthOj3LUyY1i3USNnKIUj4px8s79 BjY1n3+VgDNmyPYk+zIkarVi2AC2rB7nrpWQU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hgxI+/xNd6oVW/WVf38S+AfMfC0sw89WNvB0XRSAo34=; b=VDAuXmVgkCFR0O5++adYpj//Wi0gORoZzHcHrhZTuXPhxJBtPcKCzTzYSoHccTJ8qY S5sl/GcsGbbPWmCm5HC5od/eXcWvU6/1GzeuppslIQT7vnGn5o5md8sTsoIYIVYKlEW1 eS70ENem1PncsYBfgTQV94PPoILsNtx+gDL42ggXEe4iaUpNIqpQpD0nfXW+biB3+AeD YpD7q1rAiNiVW1zrL/Hm8oqF6qdlHh6DWaGZ4OGfpDRiQbswJwtvrzuAN4YLSffICTeP ouWBHt9WHQ7JR9sk+kKOh4lsgLEZDfVDp1RIOO3PodSacshB6W6Og/4Rnr2/54WpT60p NYZw== X-Gm-Message-State: ACrzQf3qwYX1PAvio3Bb7gHpgBvH+UeO35OgrVzVlYq3dEjoAhNi5tBI LSR4zPcrjTrzja0qCkSzNegxSQ== X-Google-Smtp-Source: AMsMyM4Xt8o1S32ty5QYIBTFB120Y02WY86/U8JpeSY83y5waM/+NuvTZkZHNUZsDuofFOMLkx+EyQ== X-Received: by 2002:a05:600c:35cb:b0:3c6:e382:62fb with SMTP id r11-20020a05600c35cb00b003c6e38262fbmr24029718wmq.22.1667582493381; Fri, 04 Nov 2022 10:21:33 -0700 (PDT) Received: from ?IPv6:2001:8b0:aba:5f3c:28c5:bec7:4f4d:2683? ([2001:8b0:aba:5f3c:28c5:bec7:4f4d:2683]) by smtp.gmail.com with ESMTPSA id c3-20020adffb43000000b0022e344a63c7sm3832713wrs.92.2022.11.04.10.21.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 10:21:32 -0700 (PDT) Message-ID: <31e522bea27d3439918ceca9b6eff01f6f2812b7.camel@linuxfoundation.org> Subject: Re: [PATCH 1/2] gcc/file-prefix-map: Allow remapping of relative paths From: Richard Purdie To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org Date: Fri, 04 Nov 2022 17:21:30 +0000 In-Reply-To: <2853801.e9J7NaK4W3@fomalhaut> References: <20220817121534.1825108-1-richard.purdie@linuxfoundation.org> <2853801.e9J7NaK4W3@fomalhaut> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 2022-11-04 at 10:12 +0100, Eric Botcazou wrote: > > gcc/ChangeLog: > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0* file-prefix-map.cc (remap_filename): Allow re= mapping of > > relative paths >=20 > Small regression in Ada though, probably a missing guard somewhere: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=3D=3D=3D gnat tests =3D=3D=3D >=20 >=20 > Running target unix > FAIL: gnat.dg/specs/coverage1.ads (test for excess errors) >=20 > In order to reproduce, configure the compiler with Ada enabled, build > it, and=20 > copy $[srcdir)/gcc/testsuite/gnat.dg/specs/coverage1.ads into the > build=20 > directory, then just issue: >=20 > gcc/gnat1 -quiet coverage1.ads -ftest-coverage -Igcc/ada/rts >=20 > raised STORAGE_ERROR : stack overflow or erroneous memory access It took me a while to work out how to get ada to build. When I did I found it was faulting due to a NULL filename being passed to lbasename: Program received signal SIGSEGV, Segmentation fault. lbasename (name=3D0x0) at gcc/libiberty/lbasename.c:82 82 return unix_lbasename (name); (gdb) bt #0 lbasename (name=3D0x0) at gcc/libiberty/lbasename.c:82 #1 0x0000000000f3d566 in remap_filename (maps=3D0x0, filename=3Dfilename@e= ntry=3D0x0) at gcc/gcc/file-prefix-map.cc:76 #2 0x0000000000f3d6df in remap_profile_filename (filename=3Dfilename@entry= =3D0x0) at gcc/gcc/file-prefix-map.cc:158 #3 0x0000000000e59f59 in coverage_begin_function (lineno_checksum=3Dlineno= _checksum@entry=3D595732889, cfg_checksum=3Dcfg_checksum@entry=3D2754642872= ) at gcc/gcc/coverage.cc:650 #4 0x00000000012263c0 in branch_prob (thunk=3Dthunk@entry=3Dfalse) at gcc/= gcc/profile.cc:1400 #5 0x00000000013b1205 in tree_profiling () at gcc/gcc/tree-profile.cc:782 #6 (anonymous namespace)::pass_ipa_tree_profile::execute (this=3D) at gcc/gcc/tree-profile.cc:888 #7 0x00000000011ef30b in execute_one_pass (pass=3D0x36ebea0) at gcc/gcc/pa= sses.cc:2644 #8 0x00000000011f0697 in execute_ipa_pass_list (pass=3D0x36ebea0) at gcc/g= cc/passes.cc:3093 #9 0x0000000000e4c28d in ipa_passes () at gcc/gcc/cgraphunit.cc:2170 #10 symbol_table::compile (this=3D0x7ffff718f000) at gcc/gcc/cgraphunit.cc:= 2291 #11 0x0000000000e4ec08 in symbol_table::compile (this=3D0x7ffff718f000) at = gcc/gcc/cgraphunit.cc:2271 #12 symbol_table::finalize_compilation_unit (this=3D0x7ffff718f000) at gcc/= gcc/cgraphunit.cc:2543 #13 0x00000000012cfea0 in compile_file () at gcc/gcc/toplev.cc:471 #14 0x00000000009a727c in do_compile (no_backend=3Dfalse) at gcc/gcc/toplev= .cc:2125 #15 toplev::main (this=3Dthis@entry=3D0x7fffffffe21e, argc=3D, argc@entry=3D4, argv=3D, argv@entry=3D0x7fffffffe348) at = gcc/gcc/toplev.cc:2277 #16 0x00000000009a8a8b in main (argc=3D4, argv=3D0x7fffffffe348) at gcc/gcc= /main.cc:39 I can send the obvious patch to make it work as before and ignore the NULL which fixes this. I'm not sure if it should really be passing NULL around in the first place or not which is why I'm sharing the backtrace. Cheers, Richard