[armhf] exception not caught when defining identical lambdas built with -O2

Bug #1482320 reported by Alberto Aguirre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-5 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Here's a minimal example that exhibits the issue in armhf:
http://pastebin.ubuntu.com/12014818/

compiled with g++ -std=c++11 -O2

Expected output:
ignored exception: some error
ignored exception: some error

Actual output:
terminate called after throwing an instance of 'std::runtime_error'
  what(): some error
Aborted (core dumped)

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

The failure was originally observed on a mir unit test failure here:
https://launchpadlibrarian.net/213612810/buildlog_ubuntu-wily-armhf.mir_0.15.0%2B15.10.20150804-0ubuntu1_BUILDING.txt.gz

which used the current wily-proposed 5.2.1-12ubuntu2 gcc5 package.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

This appears to work for me with the latest released g++.

[17:50:00] mtrudel:~ $ g++-5 -std=c++11 -O2 -o toto toto.cc
[17:50:12] mtrudel:~ $ ./toto
ignored exception: some error
ignored exception: some error
[17:50:30] mtrudel:~ $ dpkg -S g++-5
g++-5: /usr/share/man/man1/x86_64-linux-gnu-g++-5.1.gz
g++-5: /usr/bin/g++-5
g++-5: /usr/share/doc/g++-5
g++-5: /usr/bin/x86_64-linux-gnu-g++-5
g++-5: /usr/share/man/man1/g++-5.1.gz
[17:52:39] mtrudel:~ $ g++-5 -v
Using built-in specs.
COLLECT_GCC=g++-5
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.2.1-15ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.2.1 20150808 (Ubuntu 5.2.1-15ubuntu1)
[17:52:50] mtrudel:~ $ dpkg -l g++-5 | grep '^ii'
ii g++-5 5.2.1-15ubuntu1 amd64 GNU C++ compiler

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Right it only fails for armhf arch.

description: updated
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Ah, oops. I hadn't tried it on armhf. It does break for me; confirming:

(wily-armhf)root@gaea:~# ./toto
terminate called after throwing an instance of 'std::runtime_error'
  what(): some error
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted (core dumped)

Changed in gcc-5 (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Matthias Klose (doko) wrote :

confirmed, work around is to build with -O1

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-5 - 5.2.1-16ubuntu1

---------------
gcc-5 (5.2.1-16ubuntu1) wily; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-5 (5.2.1-16) unstable; urgency=medium

  * Update to SVN 20150903 (r227431, 5.2.1) from the gcc-5-branch.
    - Backport the filesystem TS library.
  * libstdc++-dev: Install libstdc++fs.a.
  * Again, configure with --enable-targets=powerpcle-linux on ppc64el.
  * Apply proposed patch for PR target/67211 (ppc64el).
  * libgo-dev: Install libgolibbegin.a.
  * Apply proposed patch for PR target/67280 (ARM). LP: #1482320.

 -- Matthias Klose <email address hidden> Thu, 03 Sep 2015 16:00:26 +0200

Changed in gcc-5 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.