public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66071] New: Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked
@ 2015-05-08 12:50 tomas.ukkonen at iki dot fi
  2015-05-08 12:56 ` [Bug c++/66071] " tomas.ukkonen at iki dot fi
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tomas.ukkonen at iki dot fi @ 2015-05-08 12:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66071

            Bug ID: 66071
           Summary: Calling condition variable's notify_all() causes
                    SEGFAULT when the binary is statically linked
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tomas.ukkonen at iki dot fi
  Target Milestone: ---

Created attachment 35497
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35497&action=edit
Example code causing segmentation fault

The following code causes segmentation fault on Debian Linux (Sid) WHEN THE
BINARY IS STATICALLY LINKED. Code works correctly when the binary is linked
dynamically:

#include <condition_variable>

int main()
{
  std::condition_variable cv;
  cv.notify_all();
  return 0;
}

Commands:

g++ -v -save-temps -std=c++11 -static test.cpp
./a.out
Segmentation fault

uname -a
Linux moria 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3 (2015-04-23) x86_64
GNU/Linux

gcc -v
gcc version 4.9.2 (Debian 4.9.2-10)


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

* [Bug c++/66071] Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked
  2015-05-08 12:50 [Bug c++/66071] New: Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked tomas.ukkonen at iki dot fi
  2015-05-08 12:56 ` [Bug c++/66071] " tomas.ukkonen at iki dot fi
@ 2015-05-08 12:56 ` tomas.ukkonen at iki dot fi
  2015-05-08 12:57 ` tomas.ukkonen at iki dot fi
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tomas.ukkonen at iki dot fi @ 2015-05-08 12:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66071

--- Comment #2 from Tomas Ukkonen <tomas.ukkonen at iki dot fi> ---
Created attachment 35499
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35499&action=edit
Compilation results 2


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

* [Bug c++/66071] Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked
  2015-05-08 12:50 [Bug c++/66071] New: Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked tomas.ukkonen at iki dot fi
@ 2015-05-08 12:56 ` tomas.ukkonen at iki dot fi
  2015-05-08 12:56 ` tomas.ukkonen at iki dot fi
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tomas.ukkonen at iki dot fi @ 2015-05-08 12:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66071

--- Comment #1 from Tomas Ukkonen <tomas.ukkonen at iki dot fi> ---
Created attachment 35498
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35498&action=edit
compilation results 1


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

* [Bug c++/66071] Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked
  2015-05-08 12:50 [Bug c++/66071] New: Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked tomas.ukkonen at iki dot fi
  2015-05-08 12:56 ` [Bug c++/66071] " tomas.ukkonen at iki dot fi
  2015-05-08 12:56 ` tomas.ukkonen at iki dot fi
@ 2015-05-08 12:57 ` tomas.ukkonen at iki dot fi
  2015-05-08 14:52 ` tomas.ukkonen at iki dot fi
  2015-05-08 15:13 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: tomas.ukkonen at iki dot fi @ 2015-05-08 12:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66071

Tomas Ukkonen <tomas.ukkonen at iki dot fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tomas.ukkonen at iki dot fi

--- Comment #3 from Tomas Ukkonen <tomas.ukkonen at iki dot fi> ---
Created attachment 35500
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35500&action=edit
Shell script compiling the code and causing segmentation fault


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

* [Bug c++/66071] Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked
  2015-05-08 12:50 [Bug c++/66071] New: Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked tomas.ukkonen at iki dot fi
                   ` (2 preceding siblings ...)
  2015-05-08 12:57 ` tomas.ukkonen at iki dot fi
@ 2015-05-08 14:52 ` tomas.ukkonen at iki dot fi
  2015-05-08 15:13 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: tomas.ukkonen at iki dot fi @ 2015-05-08 14:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66071

Tomas Ukkonen <tomas.ukkonen at iki dot fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.9.2                       |5.1.1

--- Comment #5 from Tomas Ukkonen <tomas.ukkonen at iki dot fi> ---
Tested with 5.1.1 and it creates Segmentation fault.


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

* [Bug c++/66071] Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked
  2015-05-08 12:50 [Bug c++/66071] New: Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked tomas.ukkonen at iki dot fi
                   ` (3 preceding siblings ...)
  2015-05-08 14:52 ` tomas.ukkonen at iki dot fi
@ 2015-05-08 15:13 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2015-05-08 15:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66071

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is almost certainly the same issue as PR58909

*** This bug has been marked as a duplicate of bug 58909 ***


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

end of thread, other threads:[~2015-05-08 15:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-08 12:50 [Bug c++/66071] New: Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked tomas.ukkonen at iki dot fi
2015-05-08 12:56 ` [Bug c++/66071] " tomas.ukkonen at iki dot fi
2015-05-08 12:56 ` tomas.ukkonen at iki dot fi
2015-05-08 12:57 ` tomas.ukkonen at iki dot fi
2015-05-08 14:52 ` tomas.ukkonen at iki dot fi
2015-05-08 15:13 ` 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).