Opened 9 years ago
Closed 9 years ago
#9930 closed Bugs (invalid)
Copy-constructed mt19937_64 segfaults
Reported by: | Owned by: | No-Maintainer | |
---|---|---|---|
Milestone: | To Be Determined | Component: | random |
Version: | Boost 1.55.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The copy constructor for mt19937_64 seems to leave the copy in a corrupt state. Trying to generate random numbers from the copy consistently results in a segmentation fault.
The attached file exhibits the problem:
$ g++ -std=c++11 -g -O0 main.cpp && ./a.out 5 5 $ g++ -std=c++11 -g -O0 -DUSE_64BIT main.cpp && ./a.out 1 Segmentation fault (core dumped)
The version of g++ used is "g++-4.8 (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1".
Attachments (1)
Change History (3)
by , 9 years ago
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
return_generator returns a dangling reference to the local generator.
Note:
See TracTickets
for help on using tickets.
Okay, I should have previewed. This is the terminal session with proper formatting: