This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

27/istream_extractor_arith fail on solaris 2.8



FAILs, here's the backtrace.

#0  0x0001ffc0 in number ()
    at /es/scratch/rth/src-3.1/libstdc++-v3/libsupc++/new_handler.cc:40
#1  0x0001fc54 in __doscan_u ()
    at /es/scratch/rth/src-3.1/libstdc++-v3/libsupc++/new_handler.cc:40
#2  0x0001f294 in sscanf ()
    at /es/scratch/rth/src-3.1/libstdc++-v3/libsupc++/new_handler.cc:40
#3  0x0008f260 in void std::__convert_to_v<double>(char const*, double&, 
std::_Ios_Iostate&, int* const&, int) ()
    at /es/scratch/rth/src-3.1/libstdc++-v3/libsupc++/new_handler.cc:40
#4  0x0005decc in std::num_get<char, std::istreambuf_iterator<char, 
std::char_traits<char> > >::do_get(std::istreambuf_iterator<char, 
std::char_traits<char> >, std::istreambuf_iterator<char, 
std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, long 
double&) const (this=0xc3868, __beg=
      {<iterator<std::input_iterator_tag,char,long int,char*,char&>> = 
{<No data fields>}, _M_sbuf = 0xffbef900, _M_c = -2}, __end=
      {<iterator<std::input_iterator_tag,char,long int,char*,char&>> = 
{<No data fields>}, _M_sbuf = 0x0, _M_c = -2}, __io=@0xffbef87c, 
__err=@0xffbef7d8, 
    __v=@0xffbef860)
    at 
/seadog/salty/rth/sp/sparc-sun-solaris2.8/libstdc++-v3/include/bits/locale_facets.tcc:562


Looks like this is an error in solaris libc: the following reliably 
cores:

#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string>

int main()
{
  std::string st;
  std::string part = "1234567890123456789012345678901234567890";
  for (int i = 0; i < 123 + 1; ++i)
    st += part;
 
  const char* __s = st.c_str();
  long double __ld;
  int __p = sscanf(__s, "%Lf", &__ld);
}

Since this is an extrema test, the Solaris failure looks like a qoi issue 
that most people will never notice.

-benjamin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]