<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>43468</bug_id>
          
          <creation_ts>2022-08-07 01:32:14 +0300</creation_ts>
          <short_desc>Ошибки в поведении программы unifdef после сборки gcc12</short_desc>
          <delta_ts>2022-08-07 03:20:46 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>glibc-devel</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vitaly Lipatov">lav</reporter>
          <assigned_to name="Gleb F-Malinovskiy">glebfm</assigned_to>
          <cc>glebfm</cc>
    
    <cc>ldv</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>213506</commentid>
    <comment_count>0</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2022-08-07 01:32:14 +0300</bug_when>
    <thetext>В какой-то момент пакет unifdef перестал собираться.
В нём стали проваливаться тесты: программа вела себя не всегда так, как ожидалось.

При этом сборка через clang такой проблемы не имеет.
Ещё более подозрительным мне кажется, что сборка с -O1 или -O0 (вместо -O2, который по умолчанию) тоже работает корректно.

Посмотрел на разных системах и версиях gcc/clang:


  OK (status 0) with gcc-10, CFLAGS=-Wall -O1 -pedantic, ALT Sisyphus Sisyphus
  OK (status 0) with gcc-11, CFLAGS=-Wall -O1 -pedantic, ALT Sisyphus Sisyphus
  OK (status 0) with gcc-12, CFLAGS=-Wall -O1 -pedantic, ALT Sisyphus Sisyphus
  OK (status 0) with clang-11, CFLAGS=-Wall -O1 -pedantic, ALT Sisyphus Sisyphus
  OK (status 0) with clang-12, CFLAGS=-Wall -O1 -pedantic, ALT Sisyphus Sisyphus
  OK (status 0) with clang-13, CFLAGS=-Wall -O1 -pedantic, ALT Sisyphus Sisyphus
FAIL (status 2) with gcc-10, CFLAGS=-Wall -O2 -pedantic, ALT Sisyphus Sisyphus
FAIL (status 2) with gcc-11, CFLAGS=-Wall -O2 -pedantic, ALT Sisyphus Sisyphus
FAIL (status 2) with gcc-12, CFLAGS=-Wall -O2 -pedantic, ALT Sisyphus Sisyphus
  OK (status 0) with clang-11, CFLAGS=-Wall -O2 -pedantic, ALT Sisyphus Sisyphus
  OK (status 0) with clang-12, CFLAGS=-Wall -O2 -pedantic, ALT Sisyphus Sisyphus
  OK (status 0) with clang-13, CFLAGS=-Wall -O2 -pedantic, ALT Sisyphus Sisyphus


  OK (status 0) with gcc-10, CFLAGS=-Wall -O1 -pedantic, ALT p10 branch
  OK (status 0) with clang-11, CFLAGS=-Wall -O1 -pedantic, ALT p10 branch
  OK (status 0) with gcc-10, CFLAGS=-Wall -O2 -pedantic, ALT p10 branch
  OK (status 0) with clang-11, CFLAGS=-Wall -O2 -pedantic, ALT p10 branch


  OK (status 0) with gcc-12, CFLAGS=-Wall -O1 -pedantic, Fedora Linux 36 (Workstation Edition)
  OK (status 0) with clang-14, CFLAGS=-Wall -O1 -pedantic, Fedora Linux 36 (Workstation Edition)
  OK (status 0) with gcc-12, CFLAGS=-Wall -O2 -pedantic, Fedora Linux 36 (Workstation Edition)
  OK (status 0) with clang-14, CFLAGS=-Wall -O2 -pedantic, Fedora Linux 36 (Workstation Edition)


  OK (status 0) with gcc-9, CFLAGS=-Wall -O1 -pedantic, Ubuntu 20.04.4 LTS
  OK (status 0) with gcc-10, CFLAGS=-Wall -O1 -pedantic, Ubuntu 20.04.4 LTS
  OK (status 0) with clang-11, CFLAGS=-Wall -O1 -pedantic, Ubuntu 20.04.4 LTS
  OK (status 0) with gcc-9, CFLAGS=-Wall -O2 -pedantic, Ubuntu 20.04.4 LTS
  OK (status 0) with gcc-10, CFLAGS=-Wall -O2 -pedantic, Ubuntu 20.04.4 LTS
  OK (status 0) with clang-11, CFLAGS=-Wall -O2 -pedantic, Ubuntu 20.04.4 LTS


Fedora:
$ gcc --version
gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)

ALT:
$ gcc --version
x86_64-alt-linux-gcc (GCC) 12.1.1 20220518 (ALT Sisyphus 12.1.1-alt1)


Сначала я думал, что дело в версии gcc в Сизифе, поэтому багу повесил на gcc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213507</commentid>
    <comment_count>1</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2022-08-07 02:38:11 +0300</bug_when>
    <thetext>Проблема появляется при обновлении на p10
glibc-devel-6:2.32-alt4
до
glibc-devel-6:2.35.0.6.491f2e-alt1

Собранный ранее пакет
Source RPM  : unifdef-2.12-alt1.src.rpm
Build Date  : Чт 20 авг 2020 01:03:15

проблем не имеет (тесты при использовании /usr/bin/unifdef из него успешно проходят).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213508</commentid>
    <comment_count>2</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2022-08-07 03:20:46 +0300</bug_when>
    <thetext>(Ответ для Vitaly Lipatov на комментарий #1)
&gt; Проблема появляется при обновлении на p10
&gt; glibc-devel-6:2.32-alt4
&gt; до
&gt; glibc-devel-6:2.35.0.6.491f2e-alt1
А точнее, при обновлении с 2.34.0.103 до 2.35.0.5
* Сб фев 05 2022 Gleb F-Malinovskiy &lt;glebfm@altlinux.org&gt; 6:2.35.0.5.249624-alt1
- Updated to glibc-2.35-5-g2496242707.

* Вт фев 01 2022 Gleb F-Malinovskiy &lt;glebfm@altlinux.org&gt; 6:2.34.0.103.008003-alt1
- Updated to glibc-2.34-103-g008003dc6e (fixes: CVE-2022-23219, CVE-2022-23218,
  CVE-2021-3998, CVE-2021-3999).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>