You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2008/03/30 22:32:24 UTC

[jira] Created: (STDCXX-808) [Sun C++ -m64] SIGBUS in strstreambuf::seekoff() on empty stream

[Sun C++ -m64] SIGBUS in strstreambuf::seekoff() on empty stream
----------------------------------------------------------------

                 Key: STDCXX-808
                 URL: https://issues.apache.org/jira/browse/STDCXX-808
             Project: C++ Standard Library
          Issue Type: Bug
          Components: 27. Input/Output
    Affects Versions: 4.2.0
            Reporter: Martin Sebor
            Assignee: Eric Lemings
             Fix For: 4.3


When compiled with Sun C++ in wide mode (with the [-m64|http://docs.sun.com/app/docs/doc/819-5267/gewhd?a=view] option) the following program (taken from the Rogue Wave regression test test_bug11205.cpp) abends with SIGBUS. This happens in both 4.2.0 and on the head of trunk. Suspect a compiler bug.
{noformat}

$ cat t.cpp && gmake t && dbx -q -c"run;where" t
#include <cassert>
#include <iosfwd>
#include <strstream>

int main ()
{
    std::strstreambuf sb;

    std::streampos pos = sb.pubseekoff (10, std::ios::beg, std::ios::in);

    assert (-1 == pos);
}
CC -library=%none -g  -m64 +w -errtags -erroff=hidef  -D_RWSTDDEBUG   -mt -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-suncc-5.9_j1-15D/include -I/amd/devco/sebor/stdcxx/examples/include  -library=%none  -mt  -m64 -L/build/sebor/stdcxx-suncc-5.9_j1-15D/lib  -R/build/sebor/stdcxx-suncc-5.9_j1-15D/lib  t.cpp  -lstd15D  -lm -o t
Running: t 
(process id 20476)
t@1 (l@1) signal BUS (invalid address alignment) in std::basic_streambuf<char,std::char_traits<char> >::eback at line 166 in file "streambuf"
  166           return _C_eback;
current thread: t@1
=>[1] std::basic_streambuf<char,std::char_traits<char> >::eback(this = 0xa), line 166 in "streambuf"
  [2] std::basic_streambuf<char,std::char_traits<char> >::_C_is_valid(this = 0xa), line 520 in "streambuf"
  [3] std::strstreambuf::seekoff(this = 0xa, off = 0, way = 4, which = 0), line 166 in "strstream.cpp"
  [4] std::basic_streambuf<char,std::char_traits<char> >::pubseekoff(this = 0xffffffff7ffff850, __off = 10, __way = __rw_beg, __which = __rw_in), line 99 in "streambuf"
  [5] main(), line 9 in "t.cpp"
{noformat}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (STDCXX-808) [Sun C++ -m64] SIGBUS in strstreambuf::seekoff() on empty stream

Posted by "Eric Lemings (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Lemings resolved STDCXX-808.
---------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s:     (was: 4.3.0)
                   4.2.2
       Regression: [Regression]

Unable to reproduce.  Added test case to regression tests.

> [Sun C++ -m64] SIGBUS in strstreambuf::seekoff() on empty stream
> ----------------------------------------------------------------
>
>                 Key: STDCXX-808
>                 URL: https://issues.apache.org/jira/browse/STDCXX-808
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.2.0
>            Reporter: Martin Sebor
>            Assignee: Eric Lemings
>             Fix For: 4.2.2
>
>   Original Estimate: 4h
>          Time Spent: 1.5h
>  Remaining Estimate: 2.5h
>
> When compiled with Sun C++ in wide mode (with the [-m64|http://docs.sun.com/app/docs/doc/819-5267/gewhd?a=view] option) the following program (taken from the Rogue Wave regression test test_bug11205.cpp) abends with SIGBUS. This happens in both 4.2.0 and on the head of trunk. Suspect a compiler bug.
> {noformat}
> $ cat t.cpp && gmake t && dbx -q -c"run;where" t
> #include <cassert>
> #include <iosfwd>
> #include <strstream>
> int main ()
> {
>     std::strstreambuf sb;
>     std::streampos pos = sb.pubseekoff (10, std::ios::beg, std::ios::in);
>     assert (-1 == pos);
> }
> CC -library=%none -g  -m64 +w -errtags -erroff=hidef  -D_RWSTDDEBUG   -mt -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-suncc-5.9_j1-15D/include -I/amd/devco/sebor/stdcxx/examples/include  -library=%none  -mt  -m64 -L/build/sebor/stdcxx-suncc-5.9_j1-15D/lib  -R/build/sebor/stdcxx-suncc-5.9_j1-15D/lib  t.cpp  -lstd15D  -lm -o t
> Running: t 
> (process id 20476)
> t@1 (l@1) signal BUS (invalid address alignment) in std::basic_streambuf<char,std::char_traits<char> >::eback at line 166 in file "streambuf"
>   166           return _C_eback;
> current thread: t@1
> =>[1] std::basic_streambuf<char,std::char_traits<char> >::eback(this = 0xa), line 166 in "streambuf"
>   [2] std::basic_streambuf<char,std::char_traits<char> >::_C_is_valid(this = 0xa), line 520 in "streambuf"
>   [3] std::strstreambuf::seekoff(this = 0xa, off = 0, way = 4, which = 0), line 166 in "strstream.cpp"
>   [4] std::basic_streambuf<char,std::char_traits<char> >::pubseekoff(this = 0xffffffff7ffff850, __off = 10, __way = __rw_beg, __which = __rw_in), line 99 in "streambuf"
>   [5] main(), line 9 in "t.cpp"
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-808) [Sun C++ -m64] SIGBUS in strstreambuf::seekoff() on empty stream

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614567#action_12614567 ] 

Martin Sebor commented on STDCXX-808:
-------------------------------------

It happens reliably with 4.2.0. Somehow it got fixed, but I can't find how. The only recent change I can find in this general area is [r418410|http://svn.apache.org/viewvc?view=rev&revision=418410] but it doesn't look like it has anything to do with this.

> [Sun C++ -m64] SIGBUS in strstreambuf::seekoff() on empty stream
> ----------------------------------------------------------------
>
>                 Key: STDCXX-808
>                 URL: https://issues.apache.org/jira/browse/STDCXX-808
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.2.0
>            Reporter: Martin Sebor
>            Assignee: Eric Lemings
>             Fix For: 4.3.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> When compiled with Sun C++ in wide mode (with the [-m64|http://docs.sun.com/app/docs/doc/819-5267/gewhd?a=view] option) the following program (taken from the Rogue Wave regression test test_bug11205.cpp) abends with SIGBUS. This happens in both 4.2.0 and on the head of trunk. Suspect a compiler bug.
> {noformat}
> $ cat t.cpp && gmake t && dbx -q -c"run;where" t
> #include <cassert>
> #include <iosfwd>
> #include <strstream>
> int main ()
> {
>     std::strstreambuf sb;
>     std::streampos pos = sb.pubseekoff (10, std::ios::beg, std::ios::in);
>     assert (-1 == pos);
> }
> CC -library=%none -g  -m64 +w -errtags -erroff=hidef  -D_RWSTDDEBUG   -mt -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-suncc-5.9_j1-15D/include -I/amd/devco/sebor/stdcxx/examples/include  -library=%none  -mt  -m64 -L/build/sebor/stdcxx-suncc-5.9_j1-15D/lib  -R/build/sebor/stdcxx-suncc-5.9_j1-15D/lib  t.cpp  -lstd15D  -lm -o t
> Running: t 
> (process id 20476)
> t@1 (l@1) signal BUS (invalid address alignment) in std::basic_streambuf<char,std::char_traits<char> >::eback at line 166 in file "streambuf"
>   166           return _C_eback;
> current thread: t@1
> =>[1] std::basic_streambuf<char,std::char_traits<char> >::eback(this = 0xa), line 166 in "streambuf"
>   [2] std::basic_streambuf<char,std::char_traits<char> >::_C_is_valid(this = 0xa), line 520 in "streambuf"
>   [3] std::strstreambuf::seekoff(this = 0xa, off = 0, way = 4, which = 0), line 166 in "strstream.cpp"
>   [4] std::basic_streambuf<char,std::char_traits<char> >::pubseekoff(this = 0xffffffff7ffff850, __off = 10, __way = __rw_beg, __which = __rw_in), line 99 in "streambuf"
>   [5] main(), line 9 in "t.cpp"
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-808) [Sun C++ -m64] SIGBUS in strstreambuf::seekoff() on empty stream

Posted by "Eric Lemings (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612181#action_12612181 ] 

Eric Lemings commented on STDCXX-808:
-------------------------------------

I just tested this on a Solaris 10 machine with a 15D build using Sun C++ 5.9 on the 4.2.x branch and it works fine.

> [Sun C++ -m64] SIGBUS in strstreambuf::seekoff() on empty stream
> ----------------------------------------------------------------
>
>                 Key: STDCXX-808
>                 URL: https://issues.apache.org/jira/browse/STDCXX-808
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.2.0
>            Reporter: Martin Sebor
>            Assignee: Eric Lemings
>             Fix For: 4.3
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> When compiled with Sun C++ in wide mode (with the [-m64|http://docs.sun.com/app/docs/doc/819-5267/gewhd?a=view] option) the following program (taken from the Rogue Wave regression test test_bug11205.cpp) abends with SIGBUS. This happens in both 4.2.0 and on the head of trunk. Suspect a compiler bug.
> {noformat}
> $ cat t.cpp && gmake t && dbx -q -c"run;where" t
> #include <cassert>
> #include <iosfwd>
> #include <strstream>
> int main ()
> {
>     std::strstreambuf sb;
>     std::streampos pos = sb.pubseekoff (10, std::ios::beg, std::ios::in);
>     assert (-1 == pos);
> }
> CC -library=%none -g  -m64 +w -errtags -erroff=hidef  -D_RWSTDDEBUG   -mt -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-suncc-5.9_j1-15D/include -I/amd/devco/sebor/stdcxx/examples/include  -library=%none  -mt  -m64 -L/build/sebor/stdcxx-suncc-5.9_j1-15D/lib  -R/build/sebor/stdcxx-suncc-5.9_j1-15D/lib  t.cpp  -lstd15D  -lm -o t
> Running: t 
> (process id 20476)
> t@1 (l@1) signal BUS (invalid address alignment) in std::basic_streambuf<char,std::char_traits<char> >::eback at line 166 in file "streambuf"
>   166           return _C_eback;
> current thread: t@1
> =>[1] std::basic_streambuf<char,std::char_traits<char> >::eback(this = 0xa), line 166 in "streambuf"
>   [2] std::basic_streambuf<char,std::char_traits<char> >::_C_is_valid(this = 0xa), line 520 in "streambuf"
>   [3] std::strstreambuf::seekoff(this = 0xa, off = 0, way = 4, which = 0), line 166 in "strstream.cpp"
>   [4] std::basic_streambuf<char,std::char_traits<char> >::pubseekoff(this = 0xffffffff7ffff850, __off = 10, __way = __rw_beg, __which = __rw_in), line 99 in "streambuf"
>   [5] main(), line 9 in "t.cpp"
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-808) [Sun C++ -m64] SIGBUS in strstreambuf::seekoff() on empty stream

Posted by "Eric Lemings (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615303#action_12615303 ] 

Eric Lemings commented on STDCXX-808:
-------------------------------------

Test case added in source file tests/regress/27.streambuf.buffer.stdcxx-808.cpp.

> [Sun C++ -m64] SIGBUS in strstreambuf::seekoff() on empty stream
> ----------------------------------------------------------------
>
>                 Key: STDCXX-808
>                 URL: https://issues.apache.org/jira/browse/STDCXX-808
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.2.0
>            Reporter: Martin Sebor
>            Assignee: Eric Lemings
>             Fix For: 4.3.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> When compiled with Sun C++ in wide mode (with the [-m64|http://docs.sun.com/app/docs/doc/819-5267/gewhd?a=view] option) the following program (taken from the Rogue Wave regression test test_bug11205.cpp) abends with SIGBUS. This happens in both 4.2.0 and on the head of trunk. Suspect a compiler bug.
> {noformat}
> $ cat t.cpp && gmake t && dbx -q -c"run;where" t
> #include <cassert>
> #include <iosfwd>
> #include <strstream>
> int main ()
> {
>     std::strstreambuf sb;
>     std::streampos pos = sb.pubseekoff (10, std::ios::beg, std::ios::in);
>     assert (-1 == pos);
> }
> CC -library=%none -g  -m64 +w -errtags -erroff=hidef  -D_RWSTDDEBUG   -mt -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-suncc-5.9_j1-15D/include -I/amd/devco/sebor/stdcxx/examples/include  -library=%none  -mt  -m64 -L/build/sebor/stdcxx-suncc-5.9_j1-15D/lib  -R/build/sebor/stdcxx-suncc-5.9_j1-15D/lib  t.cpp  -lstd15D  -lm -o t
> Running: t 
> (process id 20476)
> t@1 (l@1) signal BUS (invalid address alignment) in std::basic_streambuf<char,std::char_traits<char> >::eback at line 166 in file "streambuf"
>   166           return _C_eback;
> current thread: t@1
> =>[1] std::basic_streambuf<char,std::char_traits<char> >::eback(this = 0xa), line 166 in "streambuf"
>   [2] std::basic_streambuf<char,std::char_traits<char> >::_C_is_valid(this = 0xa), line 520 in "streambuf"
>   [3] std::strstreambuf::seekoff(this = 0xa, off = 0, way = 4, which = 0), line 166 in "strstream.cpp"
>   [4] std::basic_streambuf<char,std::char_traits<char> >::pubseekoff(this = 0xffffffff7ffff850, __off = 10, __way = __rw_beg, __which = __rw_in), line 99 in "streambuf"
>   [5] main(), line 9 in "t.cpp"
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.