[Bug 1988079] Re: GCC-12.1.0-2ubuntu1~22.04 (jammy) dav1d segfaults when building with -flto=auto

Matthias Klose 1988079 at bugs.launchpad.net
Wed Aug 2 09:10:49 UTC 2023


** Changed in: gcc-12 (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-12 in Ubuntu.
https://bugs.launchpad.net/bugs/1988079

Title:
  GCC-12.1.0-2ubuntu1~22.04 (jammy) dav1d segfaults when building with
  -flto=auto

Status in gcc-12 package in Ubuntu:
  Fix Released

Bug description:
  When building Dav1d with GCC 12.1.0 from the Ubuntu-toolchain-r ppa
  the resulting binary always segfaults when the -flto=auto flag is set.

  Without the -flto=auto flag the resulting binary works as intended.

  When using GCC 12.1.0 with -flto=auto in other distributions (debian
  for example) the resulting binary works fine.

  The issue was first reported here:
  https://code.videolan.org/videolan/dav1d/-/issues/402 as it was
  perceived by me as an error in their code, but they could only
  reproduce this on ubuntu systems and not on other distributions.

  
  The Meson build system
  Version: 0.62.2
  Source dir: /home/ferdi/ffmpeg_sources/dav1d
  Build dir: /home/ferdi/ffmpeg_sources/dav1d/build
  Build type: native build
  Project name: dav1d
  Project version: 1.0.0
  C compiler for the host machine: ccache cc (gcc 12.1.0 "cc (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0")
  C linker for the host machine: cc ld.bfd 2.38
  Host machine cpu family: x86_64
  Host machine cpu: x86_64
  Fetching value of define "__ILP32__" :  
  Run-time dependency threads found: YES
  Checking for function "clock_gettime" : YES 
  Library dl found: YES
  Checking for function "dlsym" with dependency -ldl: YES 
  Library m found: YES
  Check usable header "stdatomic.h" : YES 
  Check usable header "unistd.h" : YES 
  Check usable header "io.h" : NO 
  Check usable header "pthread_np.h" : NO 
  Checking for function "getopt_long" : YES 
  Checking for function "_aligned_malloc" : NO 
  Checking for function "posix_memalign" : YES 
  Checking for function "pthread_getaffinity_np" with dependency threads: YES 
  Compiler for C supports arguments -fvisibility=hidden: YES 
  Compiler for C supports arguments -Wundef: YES 
  Compiler for C supports arguments -Werror=vla: YES 
  Compiler for C supports arguments -Wno-maybe-uninitialized: YES 
  Compiler for C supports arguments -Wno-missing-field-initializers: YES 
  Compiler for C supports arguments -Wno-unused-parameter: YES 
  Compiler for C supports arguments -Wstrict-prototypes: YES 
  Compiler for C supports arguments -Werror=missing-prototypes: YES 
  Compiler for C supports arguments -Wshorten-64-to-32: NO 
  Compiler for C supports arguments -fomit-frame-pointer: YES 
  Compiler for C supports arguments -ffast-math: YES 
  Compiler for C supports arguments -mpreferred-stack-boundary=6: YES 
  Fetching value of define "__AVX__" : 1 
  Program nasm found: YES (/home/ferdi/bin/nasm)
  Configuring config.asm using configuration
  Configuring config.h using configuration
  Configuring version.h using configuration
  Header <xxhash.h> has symbol "XXH3_createState" : YES 
  Configuring cli_config.h using configuration
  Build targets in project: 10

  dav1d 1.0.0

    User defined options
      default_library: static
      libdir         : /home/ferdi/ffmpeg_build/lib
      prefix         : /home/ferdi/ffmpeg_build
      enable_tests   : false
      enable_tools   : true

  Found ninja-1.11.0 at /usr/bin/ninja
  ferdi at Biodanza01:~/ffmpeg_sources/dav1d/build$ env | grep FLAGS
  CXXFLAGS=-march=native -O3 -pipe -flto=auto
  LDFLAGS=-fuse-ld=mold
  CFLAGS=-march=native -O3 -pipe -flto=auto
  ferdi at Biodanza01:~/ffmpeg_sources/dav1d/build$ ninja
  [111/111] Linking target tools/dav1d
  ferdi at Biodanza01:~/ffmpeg_sources/dav1d/build$ cd tools
  ferdi at Biodanza01:~/ffmpeg_sources/dav1d/build/tools$ ./dav1d -i ~/Downloads/video/testvideo/test1.ivf --l 100 -o test.yuv
  dav1d 1.0.0-46-gcd5e415 - by VideoLAN
  Segmentation fault

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-12/+bug/1988079/+subscriptions




More information about the foundations-bugs mailing list