misc/182175: libc++ iostream initialization problem

Yahor Shybeka egor.shibeko at gmail.com
Tue Sep 17 01:30:00 UTC 2013


>Number:         182175
>Category:       misc
>Synopsis:       libc++ iostream initialization problem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 17 01:30:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Yahor Shybeka
>Release:        9.2
>Organization:
>Environment:
FreeBSD err0r-laptop.err0r-house 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Sat Sep 14 05:39:27 EDT 2013     root at err0r-laptop.err0r-house:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Hi,

It looks like libc++ in base doesn't have static instance of std::ios_base::Init in <iostream>, a trick which you can find in GCC's header:

  static ios_base::Init __ioinit;

It was discussed with libc++ developer here - http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077141.html. I'm not sure about shared library initialization order in FreeBSD, but I think it's a problem with libc++.a anyway.

Thanks,
Yahor
>How-To-Repeat:
check the libc++ sources
>Fix:
add static instance of ios::base::Init into <iostream>.

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list