public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "verdagon at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/56835] New: std::promise seems broken on 10.8 lion
Date: Wed, 03 Apr 2013 18:05:00 -0000	[thread overview]
Message-ID: <bug-56835-4@http.gcc.gnu.org/bugzilla/> (raw)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56835

             Bug #: 56835
           Summary: std::promise seems broken on 10.8 lion
    Classification: Unclassified
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: verdagon@gmail.com


Hi all, the following code crashes on 10.8 lion.

#include <future>
#include <iostream>

int main() {
   std::cout << "doing the test" << std::endl;
   std::promise<bool> mypromise;
   std::future<bool> myfuture = mypromise.get_future();
   mypromise.set_value(true);
   bool result = myfuture.get();
   std::cout << "success, result is " << result << std::endl;
   return 0;
}

with this output:

$ g++-mp-4.8 -std=c++11 test.cpp
$ ./a.out
doing the test
Segmentation fault: 11
$ 

more info:
gcc version 4.8.0 20130310 (experimental) (MacPorts gcc48 4.8-20130310_0) 
I'm on a Mac OS 10.8 (mountain lion)
compiled with: g++-mp-4.8 -std=c++11 test.cpp
(though I've tried with -lpthread and -pthread and they also crashed)
No compiler output, compiled just fine.

(see
http://stackoverflow.com/questions/15778085/is-stdpromise-broken-on-my-machine-using-g-mp?noredirect=1#comment22437010_15778085
for some runs on other machines)


             reply	other threads:[~2013-04-03 18:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03 18:05 verdagon at gmail dot com [this message]
2013-04-03 18:06 ` [Bug c++/56835] " verdagon at gmail dot com
2013-04-04  8:39 ` redi at gcc dot gnu.org
2013-04-09 20:33 ` howarth at nitro dot med.uc.edu
2013-04-09 22:55 ` howarth at nitro dot med.uc.edu
2013-04-09 22:57 ` howarth at nitro dot med.uc.edu
2013-04-11 12:44 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56835-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).