[#6781] libstdc++ 21_strings/basic_string/append/wchar_t/3.cc execution test fails now

Document created by Aaronwu Employee on Oct 17, 2013
Version 1Show Document
  • View in full screen mode

[#6781] libstdc++ 21_strings/basic_string/append/wchar_t/3.cc execution test fails now

Submitted By: Mingquan Pan

Open Date

2011-09-05 23:05:01     Close Date

2011-10-20 21:41:50

Priority:

Medium     Assignee:

Vivi Li

Mingquan Pan

Board:

N/A     Silicon Revision:

Resolution:

Fixed     Fixed In Release:

N/A

Processor:

ALL     

Host Operating System:

toolchain rev.:

    kernel rev.:

State:

Closed     Found In Release:

2011R1

Is this bug repeatable?:

N/A     

Summary: libstdc++ 21_strings/basic_string/append/wchar_t/3.cc execution test fails now

Details:

 

libstdc++ 21_strings/basic_string/append/wchar_t/3.cc execution test fails now.

 

Tests that now fail, but worked before:

 

bfin-linux-uclibc: 21_strings/basic_string/append/wchar_t/3.cc execution test

 

 

Executing on bfin-linux-uclibc: /tmp/3.exe.9918    (timeout = 300)

terminate called after throwing an instance of 'std::bad_alloc'

  what():  std::bad_alloc

ABRT

XYZ134ZYX

Executing on bfin-linux-uclibc: rm -f  /tmp/3.exe.9918    (timeout = 300)

XYZ0ZYX

Executed ./3.exe, status 1

terminate called after throwing an instance of 'std::bad_alloc'

  what():  std::bad_alloc

ABRT

FAIL: 21_strings/basic_string/append/wchar_t/3.cc execution test

extra_tool_flags are:

 

 

Follow-ups

 

--- Stuart Henderson                                         2011-09-16 06:45:11

this only actually fails during testing.  if you run it on its own, it doesn't

fail.  presumably the memory on the board is becoming fragmented.

 

we can XFAIL it if it's going to be a nuisance in the logs.

 

--- Mingquan Pan                                             2011-09-26 04:11:49

Yeah, you are right. I run it independently on the same kernel image, the

3.exe can pass.

 

root:/>

root:/> version

kernel:    Linux release 3.0.0-ADI-2011R1-pre-svn10064, build #16 Thu Sep 1

11:12:16 GMT 2011

toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI-trunk/svn-5455)

user-dist: release svn-10348, build #1 Thu Sep 1 11:11:21 GMT 2011

root:/> ./3.exe

root:/> echo $?

0

root:/>

 

And it is just frequenly fails in the toolchain test log of Sep. It do see this

case pass occasionly even in regression log now.

 

It looks it call alloc function from other function which makes it fail.

 

 

~/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/3.cc:

 

#include <string>

#include <testsuite_hooks.h>

 

// Upon reallocation (basic_string::reserve) we were copying from

// deallocated memory.

void

test03()

{

  bool test __attribute__((unused)) = true;

 

  using namespace std;

 

  const wchar_t * source = L"Kesto";

 

  for (unsigned i = 0; i < 10; ++i)

    {

      wstring one(source);

      wstring two(source);

      for (unsigned j = 0; j < 18; ++j)

        {

          VERIFY( one == two );

          one.append(one);

          one += L'x';

          two.append(two.c_str(), two.size());

          two += L'x';

        }

    }

}

 

int main()

{

  test03();

  return 0;

}

 

--- Mingquan Pan                                             2011-10-13 04:59:20

On bf537, there is another case fails like this:

 

Executing on host: bfin-linux-uclibc-g++ -g -O2 -D_GLIBCXX_ASSERT

-fmessage-length=0  -DLOCALEDIR="."

-I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/util

/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/wchar_t/4.cc

    ./libtestc++.a  -lm  -mcpu=bf537-0.2  -o ./4.exe    (timeout = 600)

spawn bfin-linux-uclibc-g++ -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0

-DLOCALEDIR="."

-I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/util

/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/wchar_t/4.cc

./libtestc++.a -lm -mcpu=bf537-0.2 -o ./4.exe^M

PASS: 27_io/basic_stringbuf/setbuf/wchar_t/4.cc (test for excess errors)

Executing on bfin-linux-uclibc: /tmp/4.exe.1157    (timeout = 300)

spawn [open ...]^M

terminate called after throwing an instance of 'std::bad_alloc'

  what():  std::bad_alloc

ABRT

XYZ134ZYX

Executing on bfin-linux-uclibc: rm -f  /tmp/4.exe.1157    (timeout = 300)

spawn [open ...]^M

XYZ0ZYX

Executed ./4.exe, status 1

terminate called after throwing an instance of 'std::bad_alloc'

  what():  std::bad_alloc

ABRT

FAIL: 27_io/basic_stringbuf/setbuf/wchar_t/4.cc execution test

extra_tool_flags are:

 

 

This case on other boards are mostly passed.

 

--- Stuart Henderson                                         2011-10-17 08:52:47

i've changed the tests so they use less memory.

 

--- Mingquan Pan                                             2011-10-17 23:32:00

hi,stuart, would you please also check in this patch on 2011R1 branch? I only

see it applied on trunk and we usually do release testing on branch.

 

--- Stuart Henderson                                         2011-10-18 07:10:45

done.

 

--- Mingquan Pan                                             2011-10-20 21:47:39

Yes, they are both passing in regression testing now.

Executing on host: bfin-linux-uclibc-g++ -g -O2 -D_GLIBCXX_ASSERT

-fmessage-length=0  -DLOCALEDIR="."

-I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/util

/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/3.cc

    ./libtestc++.a  -lm  -mcpu=bf537-0.2  -o ./3.exe    (timeout = 600)

spawn bfin-linux-uclibc-g++ -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0

-DLOCALEDIR="."

-I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/util

/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/3.cc

./libtestc++.a -lm -mcpu=bf537-0.2 -o ./3.exe^M

PASS: 21_strings/basic_string/append/wchar_t/3.cc (test for excess errors)

Executing on bfin-linux-uclibc: /tmp/3.exe.22466    (timeout = 300)

spawn [open ...]^M

XYZ0ZYX

Executing on bfin-linux-uclibc: rm -f  /tmp/3.exe.22466    (timeout = 300)

spawn [open ...]^M

XYZ0ZYX

Executed ./3.exe, status 0

PASS: 21_strings/basic_string/append/wchar_t/3.cc execution test

extra_tool_flags are:

Executing on host: bfin-linux-uclibc-g++ -g -O2 -D_GLIBCXX_ASSERT

-fmessage-length=0  -DLOCALEDIR="."

-I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/util

/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/wchar_t/4.cc

    ./libtestc++.a  -lm  -mcpu=bf537-0.2  -o ./4.exe    (timeout = 600)

spawn bfin-linux-uclibc-g++ -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0

-DLOCALEDIR="."

-I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/util

/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/wchar_t/4.cc

./libtestc++.a -lm -mcpu=bf537-0.2 -o ./4.exe^M

PASS: 27_io/basic_stringbuf/setbuf/wchar_t/4.cc (test for excess errors)

Executing on bfin-linux-uclibc: /tmp/4.exe.22466    (timeout = 300)

spawn [open ...]^M

XYZ0ZYX

Executing on bfin-linux-uclibc: rm -f  /tmp/4.exe.22466    (timeout = 300)

spawn [open ...]^M

XYZ0ZYX

Executed ./4.exe, status 0

PASS: 27_io/basic_stringbuf/setbuf/wchar_t/4.cc execution test

extra_tool_flags are:

 

So close.

 

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes