public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56835] New: std::promise seems broken on 10.8 lion
@ 2013-04-03 18:05 verdagon at gmail dot com
  2013-04-03 18:06 ` [Bug c++/56835] " verdagon at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: verdagon at gmail dot com @ 2013-04-03 18:05 UTC (permalink / raw)
  To: gcc-bugs


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)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-04-11 12:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-03 18:05 [Bug c++/56835] New: std::promise seems broken on 10.8 lion verdagon at gmail dot com
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

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).