<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15803</bug_id>
          
          <creation_ts>2025-03-18 09:49:55 +0000</creation_ts>
          <short_desc>AB-INT: segfault during clang-native build</short_desc>
          <delta_ts>2025-09-11 19:57:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>5.99</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>AB-INT</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mathieu Dubois-Briand">mathieu.dubois-briand</reporter>
          <assigned_to name="Yoann Congal">yoann.congal</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>raj.khem</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sundeep.kokkonda</cc>
    
    <cc>yoann.congal</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101399</commentid>
    <comment_count>0</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-03-18 09:49:55 +0000</bug_when>
    <thetext>I feel like I already saw a similar issue in the past, this Dexp.cpp file remond me something. Yet I did not find anything on bugzilla.

  16926 ERROR: clang-native-19.1.7-r0 do_compile: Execution of &apos;/srv/pokybuild/yocto-worker/meta-clang/build/build/tmp/work/x86_64-linux/clang-native/19.1.7/temp/run.do_compile.2964406&apos; failed with exit code 1
  16927 ERROR: Logfile of failure stored in: /srv/pokybuild/yocto-worker/meta-clang/build/build/tmp/work/x86_64-linux/clang-native/19.1.7/temp/log.do_compile.2964406
  16928 Log data follows:
  16929 | DEBUG: Executing shell function do_compile
  16930 | NOTE: VERBOSE=1 cmake --build /srv/pokybuild/yocto-worker/meta-clang/build/build/tmp/work/x86_64-linux/clang-native/19.1.7/build --target all --
  16931 | Change Dir: &apos;/srv/pokybuild/yocto-worker/meta-clang/build/build/tmp/work/x86_64-linux/clang-native/19.1.7/build&apos;
  16932 | 
  16933 | Run Build Command(s): ninja -v -j 16 all
...
  23500 | /srv/pokybuild/yocto-worker/meta-clang/build/build/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp: In substitution of ‘template&lt;class _Functor, class, class&gt; std::function&lt;std::unique_ptr&lt;clang::clangd::{anonymous}::Command&gt;()&gt;::function(_Functor) [with _Functor = &lt;missing&gt;; &lt;template-parameter-1-2&gt; =
  23500  &lt;missing&gt;; &lt;template-parameter-1-3&gt; = &lt;missing&gt;]’:
  23501 | /srv/pokybuild/yocto-worker/meta-clang/build/build/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp:372:1:   required from here
  23502 | /srv/pokybuild/yocto-worker/meta-clang/build/build/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp:372:1: internal compiler error: Segmentation fault
  23503 |   372 | };
  23504 |       | ^
  23505 | 0x7f6766789dcf ???
  23506 |       ./signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
  23507 | 0x7f6766774d79 __libc_start_main
  23508 |       ../csu/libc-start.c:308
  23509 | Please submit a full bug report,
  23510 | with preprocessed source if appropriate.
  23511 | Please include the complete backtrace with any bug report.
  23512 | See &lt;file:///usr/share/doc/gcc-10/README.Bugs&gt; for instructions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101401</commentid>
    <comment_count>1</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-03-18 09:53:06 +0000</bug_when>
    <thetext>meta-clang debian11-vk-2 master-next completed at 2025-03-17T21:05:05Z
https://autobuilder.yoctoproject.org/valkyrie/#/builders/18/builds/623/steps/11/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101437</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-03-20 14:44:24 +0000</bug_when>
    <thetext>Only seen once on master-next. Wait to see if it happens again.

but we might need to test the build on Debian 11 since sstate may hid the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101448</commentid>
    <comment_count>3</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-20 17:41:11 +0000</bug_when>
    <thetext>I could reproduce it locally on the first try (an extract of my log.do_compile below) using a Debian 11 yocto/CROPS docker container:
[5975/6471] $TOPDIR/tmp/hosttools/g++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/build/tools/clang/tools/extra/clangd/index/dex/dexp -I$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd/index/dex/dexp -I$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd/../include-cleaner/include -I$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/build/tools/clang/tools/extra/clangd/../clang-tidy -I$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang/include -I$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/build/tools/clang/include -I$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/build/include -I$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/llvm/include -I$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd -I$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/build/tools/clang/tools/extra/clangd -isystem$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/recipe-sysroot-native/usr/include -O2 -pipe   -fvisibility-inlines-hidden -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -isystem$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/recipe-sysroot-native/usr/include -O2 -pipe   -fvisibility-inlines-hidden -DNDEBUG -g0 -std=c++17 -MD -MT tools/clang/tools/extra/clangd/index/dex/dexp/CMakeFiles/dexp.dir/Dexp.cpp.o -MF tools/clang/tools/extra/clangd/index/dex/dexp/CMakeFiles/dexp.dir/Dexp.cpp.o.d -o tools/clang/tools/extra/clangd/index/dex/dexp/CMakeFiles/dexp.dir/Dexp.cpp.o -c $TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
FAILED: tools/clang/tools/extra/clangd/index/dex/dexp/CMakeFiles/dexp.dir/Dexp.cpp.o 
$TOPDIR/tmp/hosttools/g++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/build/tools/clang/tools/extra/clangd/index/dex/dexp -I$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd/index/dex/dexp -I$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd/../include-cleaner/include -I$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/build/tools/clang/tools/extra/clangd/../clang-tidy -I$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang/include -I$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/build/tools/clang/include -I$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/build/include -I$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/llvm/include -I$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd -I$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/build/tools/clang/tools/extra/clangd -isystem$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/recipe-sysroot-native/usr/include -O2 -pipe   -fvisibility-inlines-hidden -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -isystem$TOPDIR/tmp/work/x86_64-linux/clang-native/19.1.7/recipe-sysroot-native/usr/include -O2 -pipe   -fvisibility-inlines-hidden -DNDEBUG -g0 -std=c++17 -MD -MT tools/clang/tools/extra/clangd/index/dex/dexp/CMakeFiles/dexp.dir/Dexp.cpp.o -MF tools/clang/tools/extra/clangd/index/dex/dexp/CMakeFiles/dexp.dir/Dexp.cpp.o.d -o tools/clang/tools/extra/clangd/index/dex/dexp/CMakeFiles/dexp.dir/Dexp.cpp.o -c $TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp: In substitution of ‘template&lt;class _Functor, class, class&gt; std::function&lt;std::unique_ptr&lt;clang::clangd::{anonymous}::Command&gt;()&gt;::function(_Functor) [with _Functor = &lt;missing&gt;; &lt;template-parameter-1-2&gt; = &lt;missing&gt;; &lt;template-parameter-1-3&gt; = &lt;missing&gt;]’:
$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp:372:1:   required from here
$TOPDIR/tmp/work-shared/llvm-project-source-19.1.7-r0/llvm-project-19.1.7.src/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp:372:1: internal compiler error: Segmentation fault
  372 | };
      | ^
Please submit a full bug report,
with preprocessed source if appropriate.
See &lt;file:///usr/share/doc/gcc-10/README.Bugs&gt; for instructions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101451</commentid>
    <comment_count>4</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-21 09:55:40 +0000</bug_when>
    <thetext>While trying to extract a reproducer (currently a 7MB preprocessed C++ file (!)), I found that the segfault does not happens every time. My test loop is currently at 20 tries and usually catch the segfault on try 1-10.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101455</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-03-21 19:49:30 +0000</bug_when>
    <thetext>FYI:
There is a tool called c-reduce:
   C-Reduce is a tool that takes a large C or C++ program 
   that has a property of interest (such as triggering a compiler bug) 
   and automatically produces a much smaller C/C++ program that 
   has the same property.

c-reduce now has a faster python wrapper called cvise as mentioned in https://wiki.gentoo.org/wiki/GCC_ICE_reporting_guide#.5Bbonus.5D_minimize_self-contained_source_using_cvise

I&apos;ve only used c-reduce one years ago but maybe this info will help you get a smaller reproducer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101457</commentid>
    <comment_count>6</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-21 23:00:29 +0000</bug_when>
    <thetext>Thanks Randy, I stumble on creduce this morning and ran it today. It simplified the reproducer to (it has gone from 7MB to 12 lines, I got down to 10, I have the last word ;) ):

--- bug.cpp ---
class a {
  template &lt;typename b&gt; a(b);
};
template &lt;typename c&gt; typename c ::j d();
class e;
struct {
  a h;
} i {
  d&lt;e&gt;
}
--------

I also simplified the g++ command line:
  g++ -std=c++17 -o /dev/null -c bug.cpp

This gives randomly 2 outputs (around 50% of the times)
---- output 1 ----
bug.cpp:10:1: error: cannot resolve overloaded function ‘d’ based on conversion to type ‘a’
   10 | }
      | ^
------------------
(No segfault)

---- output 2 ----
bug.cpp: In substitution of ‘template&lt;class b&gt; a::a(b) [with b = &lt;missing&gt;]’:
bug.cpp:10:1:   required from here
bug.cpp:10:1: internal compiler error: Segmentation fault
   10 | }
      | ^
Please submit a full bug report,
with preprocessed source if appropriate.
See &lt;file:///usr/share/doc/gcc-10/README.Bugs&gt; for instructions.
------------------
(segfault)

Some things to note:
* Debian 11 is on GCC 10.2
   $ g++ --version
   g++ (Debian 10.2.1-6) 10.2.1 20210110
* gcc 10 is not maintained anymore by upstream  (maintained: 12.x and up)
* This bug does not reproduce on Debian12 (gcc 12.2)
* While the compiler should not segfault on bad code, maybe we can fix the upstream code to avoid triggering the compiler bug that seems to be related to the code &quot;badness&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101459</commentid>
    <comment_count>7</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-21 23:40:45 +0000</bug_when>
    <thetext>The Dexp.cpp file triggering the compiler bug has this header:
  // This file implements a simple interactive tool which can be used to manually
  // evaluate symbol search quality of Clangd index.

Sound like something not critical that we can maybe not compile?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101461</commentid>
    <comment_count>8</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-23 14:28:42 +0000</bug_when>
    <thetext>CC&apos;ing Khem, he may have an idea on how to fix/workaround this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101463</commentid>
    <comment_count>9</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2025-03-24 01:10:54 +0000</bug_when>
    <thetext>Thanks for the reproducer. I tried it with gcc10 from ubuntu 20.04 which I have quick access to, and the segfault does not happen, in few iterations I have tried. However, I can see it in debian11 almost half the times as you said.

GCC on 20.04 is
gcc version 10.2.0 (Ubuntu 10.2.0-5ubuntu1~20.04)

The default is gcc-9 but they do have gcc-10 available optionally.

GCC on debian-11

gcc version 10.2.1 20210110 (Debian 10.2.1-6)


I could reproduce it on a vanilla debian 11 system as well. At this point, it seems its specific to debian11&apos;s gcc10.2 when C++17 is enabled, now there are many template related fixes around template argument deduction etc. We can look into what broke in debian11 but I am not sure if they will respin the toolchain if it was fixed since debian11 is oldstable and currently on final LTS stretch for another year.

- One solution would be to force -std=c++14 with g++
- other solution is to use newer gcc ( if available for debian 11 )
- Use buildtools tarball
- Bar AB to build clang on debian-11 workers
- Clang is upgraded to 20.1 on master this week, its possible that
we do not see this failure with clang-20 and all is hunky dory ( in other words sweep under the carpet )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101480</commentid>
    <comment_count>10</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-03-25 15:37:33 +0000</bug_when>
    <thetext>Assuming that Dexp.cpp is the only place that we can crash gcc when building clang, the file says this:

// This file implements a simple interactive tool which can be used to manually
// evaluate symbol search quality of Clangd index.

and

&quot;This is an **experimental** interactive tool to process user-provided search queries over given symbol collection obtained via clangd-indexer. The tool can be used to evaluate search quality of existing index implementations and manually construct non-trivial test cases.&quot;

To me that doesn&apos;t sound that essential, so one option would be to just patch it out of clang-native builds?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101481</commentid>
    <comment_count>11</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2025-03-25 15:40:24 +0000</bug_when>
    <thetext>yes, after we ensure that clangd does not rely on it in some fashion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101482</commentid>
    <comment_count>12</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-25 15:41:16 +0000</bug_when>
    <thetext>Next steps (discussed at tech call 20250325):
* Try to reproduce with sister distros (Ubuntu 20.04, 20.10 also on GCC 10.x)
* Report a bug on Debian 11 (little hope to get a fix, but we never know...)
* Try on latest clang 20.1.1 (merged on meta-clang yesterday)
* Find out whether the &quot;dexp&quot; tool (where the bug appears) is used in clang. If not, disable it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101483</commentid>
    <comment_count>13</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-03-25 15:58:00 +0000</bug_when>
    <thetext>Some data:

clang-tools-extra/clangd/index/dex/dexp/CMakeLists.txt builds Dexp.cpp into a dexp binary:

add_clang_executable(dexp
  Dexp.cpp
  )

Searching the clang-tools-extra repository for references &quot;dexp&quot; that are not in dexp itself:

clangd/CMakeLists.txt:add_subdirectory(index/dex/dexp)

This is the line we&apos;d patch out.

clangd/test/CMakeLists.txt:  dexp
clangd/test/index-serialization/version-is-correct.test:# RUN: dexp %/S/Inputs/sample.idx -c=&quot;find B&quot; | grep Bar || not grep -v &apos;^#&apos; %s

If we ran the tests we&apos;d need to patch these out, but we don&apos;t.

clang-include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp:      {&quot;include/wordexp.h$&quot;, &quot;&lt;wordexp.h&gt;&quot;},
clang-tidy/abseil/StringFindStartswithCheck.cpp:                      ignoringParenImpCasts(StringFind.bind(&quot;findexpr&quot;))))
clang-tidy/abseil/StringFindStartswithCheck.cpp:                      ignoringParenImpCasts(StringRFind.bind(&quot;findexpr&quot;))))
clang-tidy/abseil/StringFindStartswithCheck.cpp:  const Expr *Haystack = Result.Nodes.getNodeAs&lt;CXXMemberCallExpr&gt;(&quot;findexpr&quot;)
clang-tidy/concurrency/MtUnsafeCheck.cpp:    &quot;::wordexp&quot;,
clang-tidy/performance/TypePromotionInMathFnCheck.cpp:                                    &quot;::fmin&quot;, &quot;::fmod&quot;, &quot;::hypot&quot;, &quot;::ldexp&quot;,
clangd/index/CanonicalIncludes.cpp:    {&quot;include/wordexp.h&quot;, &quot;&lt;wordexp.h&gt;&quot;},
test/clang-tidy/checkers/bugprone/suspicious-string-compare.c:int condexpr_wrapper(const char* a, const char* b) {
test/clang-tidy/checkers/performance/type-promotion-in-math-fn.cpp:double ldexp(double, double);
test/clang-tidy/checkers/performance/type-promotion-in-math-fn.cpp:  ldexp(a, b);
test/clang-tidy/checkers/performance/type-promotion-in-math-fn.cpp:  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: call to &apos;ldexp&apos;
test/clang-tidy/checkers/performance/type-promotion-in-math-fn.cpp:  // CHECK-FIXES: {{^}}  std::ldexp(a, b);{{$}}

False-positives.

I think patching out add_subdirectory(index/dex/dexp) is a worthy experiment to try.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101484</commentid>
    <comment_count>14</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-03-25 16:05:57 +0000</bug_when>
    <thetext>FYI, trying bug.cpp on a variety of toolchains (most of the 10.x ones!) using the flags:
   -O -std=c++17
on:
   https://godbolt.org/

never produced an ICE but rather always produced:
   &lt;source&gt;:10:1: error: cannot resolve overloaded function &apos;d&apos; based on conversion to type &apos;a&apos;
      10 | }
         | ^
   Compiler returned: 1

There&apos;s even this version:
arm-none-eabi-g++ (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
which has a similar version number (but not date) as Debian 11.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101485</commentid>
    <comment_count>15</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-25 16:35:21 +0000</bug_when>
    <thetext>Bug reported to Debian : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1101322

Ubuntu 20.04 *NOT* impacted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101488</commentid>
    <comment_count>16</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-25 18:37:25 +0000</bug_when>
    <thetext>The recent 20.1.1 clang update is also impacted : On AB[0] and I&apos;ve reproduced this locally (by looping on &quot;touch .../Dexp.cpp &amp;&amp; temp/run.do_compile&quot;)

[0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/18/builds/642

The last thing left to do now is to disable dexp from being built.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101491</commentid>
    <comment_count>17</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2025-03-25 21:23:52 +0000</bug_when>
    <thetext>(In reply to Yoann Congal from comment #16)
&gt; The recent 20.1.1 clang update is also impacted : On AB[0] and I&apos;ve
&gt; reproduced this locally (by looping on &quot;touch .../Dexp.cpp &amp;&amp;
&gt; temp/run.do_compile&quot;)
&gt; 
&gt; [0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/18/builds/642
&gt; 
&gt; The last thing left to do now is to disable dexp from being built.

if we want to modify this in clang-tools-extra then adding a cmake option to ebale/disable dexp would be a good approach. It can than be controlled from recipe via packageconfig. Secondly, icing on cake would be to submit such a patch to upstream.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101492</commentid>
    <comment_count>18</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-26 00:10:56 +0000</bug_when>
    <thetext>Fix PR in meta-clang: https://github.com/kraj/meta-clang/pull/1066

Still need to submit the patch upstream.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101502</commentid>
    <comment_count>19</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-03-26 17:27:54 +0000</bug_when>
    <thetext>meta-clang debian11-vk-3 master-next completed at 2025-03-25T16:07:34Z
https://autobuilder.yoctoproject.org/valkyrie/#/builders/18/builds/642/steps/11/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101525</commentid>
    <comment_count>20</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-27 22:16:01 +0000</bug_when>
    <thetext>Workaround merged in meta-clang: https://github.com/kraj/meta-clang/commit/fa1b780b8b9fafed08204719ab94a56e20d6a03a
(disable building dexp)

FWIW: Upstream PR is https://github.com/llvm/llvm-project/pull/133124</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101531</commentid>
    <comment_count>21</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-03-28 16:05:53 +0000</bug_when>
    <thetext>For the curious: the bug was already reported to Debian, upstreamed to gcc and fixed:

#980429 - g++-10: spurious c++17 mode segmentation fault in append_to_statement_list_1 (tree-iterator.c:65) - Debian Bug report logs
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=980429

98790 – [10/11 Regression] ICE in append_to_statement_list_1 (Segmentation Fault)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98790

Debian closed the bug as fixed in gcc-10/10.2.1-16 (in sid) but debian-11 is stuck in gcc-10/10.2.1-6 (has been for 4 years).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102756</commentid>
    <comment_count>22</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-09-11 19:43:12 +0000</bug_when>
    <thetext>I asked Yoann to reproduce with current master as it has clang 21.1.0, and he reports that it&apos;s still a problem with the workaround disabled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102757</commentid>
    <comment_count>23</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2025-09-11 19:55:12 +0000</bug_when>
    <thetext>(In reply to Ross Burton from comment #22)
&gt; I asked Yoann to reproduce with current master as it has clang 21.1.0, and
&gt; he reports that it&apos;s still a problem with the workaround disabled.

Drop debian-11 for master on AB and then we can unbolt the workaround atleast for future releases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102759</commentid>
    <comment_count>24</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-09-11 19:57:44 +0000</bug_when>
    <thetext>That&apos;s exactly why I was asking, and I&apos;ve already sent the patch ;)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>