Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Sep 2013 01:21:40 GMT
From:      Yahor Shybeka <egor.shibeko@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/182175: libc++ iostream initialization problem
Message-ID:  <201309170121.r8H1LeOv098315@oldred.freebsd.org>
Resent-Message-ID: <201309170130.r8H1U0Th034971@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309170121.r8H1LeOv098315>