This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,588 Users
  • 2,269,776 Discussions
  • 7,916,825 Comments

Discussions

Studio 12.6 / Solaris 11.3 amd64 "Assertion: (../lnk/inline.cc, line 1120)"

RaiderOfTheLostSPARC
RaiderOfTheLostSPARC Member Posts: 259 Blue Ribbon

Hi,

known problem?

$ CC -V

CC: Studio 12.6 Sun C++ 5.15 SunOS_i386 2017/05/30

$ cat vec.cc

#include <iostream>

#include <string>

#include <vector>

using namespace std;

int

main(void)

{

    vector<string> vs;

    string s = "one";

    vs.push_back(s);

    cout << vs.at(0) << endl;

    return 0;

}

$ CC -xcheck=%all -library=stlport4 vec.cc

>> Assertion:   (../lnk/inline.cc, line 1120)

    while processing vec.cc at line 0.

Best Answer

  • Steve.Clamage-Oracle
    Steve.Clamage-Oracle Oracle Studio C++ Project Lead Santa Clara, CA, USAMember Posts: 775
    edited Jul 5, 2017 5:27PM Answer ✓

    Thanks for reporting this problem. I was able to reproduce it. The bug seems to be triggered by the combination of using iostream output and the -xcheck=init_local sub-option. (Other operations might also trigger it, of course.)

    I have filed bug 26396699 for the problem.

    Possible workaround: Use

       -xcheck=%all,no%init_local

    to turn off just the check that results in the assertion.

Answers

  • Steve.Clamage-Oracle
    Steve.Clamage-Oracle Oracle Studio C++ Project Lead Santa Clara, CA, USAMember Posts: 775
    edited Jul 5, 2017 5:27PM Answer ✓

    Thanks for reporting this problem. I was able to reproduce it. The bug seems to be triggered by the combination of using iostream output and the -xcheck=init_local sub-option. (Other operations might also trigger it, of course.)

    I have filed bug 26396699 for the problem.

    Possible workaround: Use

       -xcheck=%all,no%init_local

    to turn off just the check that results in the assertion.

This discussion has been closed.