← Back to team overview

touch-packages team mailing list archive

[Bug 1338693] Re: GCC miscompilation with boost::asio::io_service::work

 

checked with 4.8.4-2ubuntu1~14.04


** Tags removed: verification-needed
** Tags added: verification-done

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gcc-4.8 in Ubuntu.
https://bugs.launchpad.net/bugs/1338693

Title:
  GCC miscompilation with boost::asio::io_service::work

Status in gcc-4.8 package in Ubuntu:
  Incomplete
Status in gcc-4.9 package in Ubuntu:
  Fix Released
Status in gcc-4.8 source package in Trusty:
  Fix Committed
Status in gcc-4.9 source package in Trusty:
  Invalid

Bug description:
  The following program should keep running forever until it's being
  killed:

  #include <boost/asio.hpp>

  int main()
  {
      boost::asio::io_service io_service;
      boost::asio::io_service::work work(io_service);

      boost::system::error_code ec;
      io_service.run(ec);

      std::cout << ec.value() << " - " << ec.message() << std::endl;

      return 0;
  }

  However, on gcc 4.8.2-19ubuntu1 which ships with Ubuntu 14.04 Trusty (amd64 version), it returns right away with output "0 - Success".
  Switching to clang++ makes the snippet behave as intended.
  Boost.Asio is a header-only library, so compilers matter.

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: gcc-4.8 4.8.2-19ubuntu1
  ProcVersionSignature: Ubuntu 3.13.0-30.55-generic 3.13.11.2
  Uname: Linux 3.13.0-30-generic x86_64
  ApportVersion: 2.14.1-0ubuntu3.2
  Architecture: amd64
  CurrentDesktop: KDE
  Date: Mon Jul  7 13:03:08 2014
  InstallationDate: Installed on 2014-06-26 (10 days ago)
  InstallationMedia: Kubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.1)
  ProcEnviron:
   LANGUAGE=en_CA:en
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_CA.UTF-8
   SHELL=/bin/bash
  SourcePackage: gcc-4.8
  UpgradeStatus: No upgrade log present (probably fresh install)

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