[Bug 885557] New: SUSE12 stdio lib issue - no output when redirect file for constructor and destructor
https://bugzilla.novell.com/show_bug.cgi?id=885557 https://bugzilla.novell.com/show_bug.cgi?id=885557#c0 Summary: SUSE12 stdio lib issue - no output when redirect file for constructor and destructor Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: LittleEndian OS/Version: openSUSE 12.3 Status: NEW Severity: Normal Priority: P5 - None Component: Kernel AssignedTo: kernel-maintainers@forge.provo.novell.com ReportedBy: wangn@ca.ibm.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0 test case failed on sles12 beta 7 P8 machines when using g++ compiler. it seems it is stdio lib issue. Reproducible: Always Steps to Reproduce: 1.machine Welcome to SUSE Linux Enterprise Server 12 Beta7 (ppc64le) - Kernel \r (\l). 2. source code: wangn@cit324:/gsa/tlbgsa-h1/00/wangn/project/analy/analysis/res_LoPLEVdev.2/eh1__THROW_ADTOR.scenario$ cat eh1__THROW_ADTOR.C #line 1 "eh1.C" extern "C" int printf(const char *restrict, ...); int glob = 0; struct S { S(); S(int f, int s, int p); ~S(); int arr[2]; int *ptr; }; S s_by_val1() { return S(); } S s_by_val2() { return S(15, 33, 55); } void f() { printf("Entered function f()\n"); S &&ref = S(); printf("Value of ptr through the reference: %d\n", *(ref.ptr)); printf("Exiting function f()\n"); } S::S() { arr[0] = 11, arr[1] = 22; ptr = new int(55); printf("Default constructing S with 11, 22, 55\n"); #line 37 } S::S(int f, int s, int p) { arr[0] = p, arr[1] = s; ptr = new int(p); printf("Constructing S with %d, %d, %d\n", f, s, p); #line 47 } S::~S() { printf("Destroying S with %d, %d, %d\n", arr[0], arr[1], *ptr); delete ptr; ptr = 0, ptr--; #line 57 } struct A { A(int i); ~A(); int mem; int &&ref; }; A::A(int i) : ref(11), mem(i) { printf("constructing A(%d)\n", mem); #line 73 } A::~A() { printf("destroying A(%d)\n", mem); printf("throwing\n"); throw(1); } struct B { B(int); ~B(); A &&refa; int mem; }; B::B(int i) : refa(A(i+1)), mem(i) { printf("constructing B(%d)\n", mem); #line 97 } B::~B() { printf("destroying B(%d)\n", mem); #line 105 } struct C { C(int); ~C(); operator A(); operator B(); A mema; A &&refa; B memb; B &&refb; int mem; }; C::C(int i) : refa(A(i+2)), mema(A(i+1)), refb(B(i+4)), memb(B(i+3)), mem(i) { printf("constructing C(%d)\n", mem); #line 126 } C::~C() { printf("destroying C(%d)\n", mem); #line 134 } C::operator A() { printf("converting a C to an A\n"); #line 142 return A(5); } C::operator B() { printf("converting a C to an B\n"); #line 152 return B(6); } int main(void) { try { A &&ref = A(10); A &&ref2 = C(30); B &&ref3 = B(50); B &&ref4 = C(70); f(); } catch (int e) { return e + 54; } } 3. how to reproduce: g++ -std=c++0x -m64 eh1__THROW_ADTOR.C ./a.out 1>a.txt 2>1& 4. actual output: in std output: Aborted but a.txt contain nothing 5. if not redirect file: $ ./a.out constructing A(10) constructing A(31) constructing A(32) constructing A(34) constructing B(33) destroying A(34) throwing terminate called after throwing an instance of 'int' Aborted 5. expected output in a.txt: constructing A(10) constructing A(31) constructing A(32) constructing A(34) constructing B(33) destroying A(34) throwing terminate called after throwing an instance of 'int' Aborted Actual Results: no output for constructor and destructor Expected Results: constructor and destruct-or calls shown in redirected output file. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=885557 https://bugzilla.novell.com/show_bug.cgi?id=885557#c1 Takashi Iwai <tiwai@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |tiwai@suse.com Resolution| |INVALID --- Comment #1 from Takashi Iwai <tiwai@suse.com> 2014-07-04 15:16:20 UTC --- openSUSE 12.3 is *not* SLE12. Also, this has nothing to do kernel. Please report the bug again with the right product and component through the right channel. Thanks! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com