[
https://issues.apache.org/jira/browse/STDCXX-692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12580964#action_12580964
]
Eric Lemings commented on STDCXX-692:
-------------------------------------
I just spent a couple hours stepping through this failure. This issue looks
related to STDCXX-705. There's some sort of processing error in the format
specifiers. Here's the tail of the output and most of the stack trace:
(gdb) run
...
# INFO (S1) (3 lines):
# TEXT: std::search_n (RandomAccessIterator, RandomAccessIterator, Size, const
UserClass&)
# CLAUSE: lib.alg.search
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000001
0x908ce794 in memchr ()
(gdb) where
#0 0x908ce794 in memchr ()
#1 0x000dc8f8 in __rw::__rw_memattr (addr=0x1, nbytes=4294967295, attr=-1) at
/Users/elemings/Developer/Work/stdcxx/branches/4.2.x-copy/src/memattr.cpp:223
#2 0x0005d043 in _rw_fmtstr ([EMAIL PROTECTED], [EMAIL PROTECTED], str=0x1
<Address 0x1 out of bounds>, len=4294967295) at
/Users/elemings/Developer/Work/stdcxx/branches/4.2.x-copy/tests/src/printf.cpp:2383
#3 0x00062e35 in _rw_vasnprintf_c99 (pspec=0xbfffe6e0, paramno=7, [EMAIL
PROTECTED], pva=0xbfffeee8) at
/Users/elemings/Developer/Work/stdcxx/branches/4.2.x-copy/tests/src/printf.cpp:597
#4 0x00065f66 in _rw_pvasnprintf ([EMAIL PROTECTED], fmt=0x764ad ",
%4$s%{;})", pva=0xbfffeee8) at
/Users/elemings/Developer/Work/stdcxx/branches/4.2.x-copy/tests/src/printf.cpp:901
#5 0x0006630c in rw_vasnprintf (pbuf=0xbfffeff0, pbufsize=0xbfffef00,
fmt=0x7644c "template <class %s, class %s, class %s%{?}, class %s%{;}>
std::search_n (%1$s, %1$s, %2$s, %s%{?}, %4$s%{;})", varg=0xbffff0c0 "\\H\a")
at
/Users/elemings/Developer/Work/stdcxx/branches/4.2.x-copy/tests/src/printf.cpp:1013
#6 0x0005592c in _rw_vissue_diag (diag=diag_info, severity=1, file=0x0,
line=0, fmt=0x7644c "template <class %s, class %s, class %s%{?}, class %s%{;}>
std::search_n (%1$s, %1$s, %2$s, %s%{?}, %4$s%{;})", va=0xbffff0c0 "\\H\a") at
/Users/elemings/Developer/Work/stdcxx/branches/4.2.x-copy/tests/src/driver.cpp:1246
#7 0x00055f40 in _rw_vdiag (diag=diag_info, severity=1, file=0x0, line=0,
fmt=0x7644c "template <class %s, class %s, class %s%{?}, class %s%{;}>
std::search_n (%1$s, %1$s, %2$s, %s%{?}, %4$s%{;})", va=0xbffff0c0 "\\H\a") at
/Users/elemings/Developer/Work/stdcxx/branches/4.2.x-copy/tests/src/driver.cpp:1430
#8 0x00055fbe in rw_info (success=0, file=0x0, line=0, fmt=0x7644c "template
<class %s, class %s, class %s%{?}, class %s%{;}> std::search_n (%1$s, %1$s,
%2$s, %s%{?}, %4$s%{;})") at
/Users/elemings/Developer/Work/stdcxx/branches/4.2.x-copy/tests/src/driver.cpp:1534
#9 0x0004fad0 in test_search_n<UserClass, Size<int>, PredicateTag<UserClass> >
(pred_tag={dummy = 1}) at
/Users/elemings/Developer/Work/stdcxx/branches/4.2.x-copy/tests/algorithms/25.search.cpp:603
#10 0x0004fd0b in test_search_n<UserClass> () at
/Users/elemings/Developer/Work/stdcxx/branches/4.2.x-copy/tests/algorithms/25.search.cpp:665
...
In file tests/algorithms/25.search.cpp, the rw_vasnprintf_c99() function is
processing the very last specifier looks like. At line 590, the PARAM() macro
is fetching a ptr_ value from a different (previous?) format specifier. The
value retrieved is 1 which gets passed on to __rw_memattr() which chokes on it.
That's all I know at this point. I could spend more hours rooting out the
ultimate problem but someone with better knowledge of the format specifier
processing might have better insight.
> [gcc 4.0.1/Mac OS X 10.5.1 Leopard] 25.search test failure
> ----------------------------------------------------------
>
> Key: STDCXX-692
> URL: https://issues.apache.org/jira/browse/STDCXX-692
> Project: C++ Standard Library
> Issue Type: Bug
> Components: Tests
> Affects Versions: 4.2.0
> Environment: Darwin hostname 9.1.0 Darwin Kernel Version 9.1.0: Wed
> Oct 31 17:46:22 PDT 2007; root:xnu-1228.0.2~1/RELEASE_I386 i386
> Reporter: Eric Lemings
> Assignee: Eric Lemings
> Priority: Minor
> Fix For: 4.2.1
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> This test program crashes with a bus error on Apple's latest cat. Don't know
> any more than that. Just filing an issue for tracking purposes.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.