Issue Details (XML | Word | Printable)

Key: STDCXX-804
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Martin Sebor
Reporter: Martin Sebor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

infinite recursion in 27.objects

Created: 28/Mar/08 09:13 PM   Updated: 03/Jun/08 12:22 AM
Return to search
Component/s: Tests
Affects Version/s: None
Fix Version/s: 4.2.1

Time Tracking:
Original Estimate: 3h
Original Estimate - 3h
Remaining Estimate: 0h
Time Spent - 5h
Time Spent: 5h
Time Spent - 5h

File Attachments:
  Size
File Licensed for inclusion in ASF works tying_two_streams_together.eml 2008-03-31 08:06 PM Martin Sebor 6 kB
Environment: all
Issue Links:
Reference
 
dependent
 

Regression: Regression
Severity: Runtime Error
Resolution Date: 01/Apr/08 12:18 AM


 Description  « Hide
When compiled with MSVC (both 8 and 9), in the 15s, 15S configurations, the test 27.objects is failing with the Windows equivalent of SIGSEGV.

In stdcxx 4.2.0, the test ran successfully to completion (with both MSVC 7.1 and 8.0).



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor added a comment - 31/Mar/08 06:02 PM
Possibly related to (or even a duplicate of) STDCXX-813 observed on other platforms, including AIX, HP-UX, and Solaris.

Farid Zaripov added a comment - 31/Mar/08 06:05 PM
The problem introduced with changes for STDCXX-626.

-------
std::cout.tie (&std::cerr);
...

std::cerr.tie (&std::cout);
std::cerr << std::cerr.tie () << ' ';
-------

Here cout tied with cerr and cerr tied with cout.

The cerr::operator<<() constructs sentry object (in __rw_insert()), the sentry ctor flushes tied cout stream (in _C_opfx()), the cout.flush() also constructs the sentry object, which flushes the tied cerr stream and so on until stack overflow occurs.


Martin Sebor added a comment - 31/Mar/08 08:06 PM - edited
Attached c++std-lib-20887 with the proposed resolution sent to the C++ committe's reflector.

Martin Sebor added a comment - 31/Mar/08 08:10 PM
Guesstimating 3 hours.

Martin Sebor added a comment - 31/Mar/08 08:14 PM
This isn't MSVC-specific but rather affects all platforms.

Martin Sebor added a comment - 01/Apr/08 12:18 AM
Fixed in r643210.
Regression test committed in r643226.
Provided nightly builds confirm the fix will close after integrating into 4.2.x in the next bulk merge.

Farid Zaripov added a comment - 17/Apr/08 09:41 AM
Fix and regression test are merged in 4.2.x branch thus: http://svn.apache.org/viewvc?view=rev&revision=648752

Martin Sebor added a comment - 03/Jun/08 12:22 AM
Verified on 4.2.x and 4.3.x.