stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-841) [Sun C++] SIGFPE in 20.temp.buffer in LP64
Date Mon, 14 Apr 2008 18:07:04 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588665#action_12588665
] 

Martin Sebor commented on STDCXX-841:
-------------------------------------

The {{SIGFPE}}  happens in the computation of {{nelems}}, while dividing {{PTRDIFF_MAX}} by
the value of {{i}}, when the value is 0. Since on this platform the macro {{\_RWSTD_NO_INT_TRAPS}}
is not #defined, integer division by zero traps. The simple fix is to (also) break out of
the loop when {{i}} reaches zero.

Incidentally, I'd be curious to know why the test doesn't fail with the same signal when compiled
with gcc 4.1 in the same configuration and on the same server since it doesn't #define {{\_RWSTD_NO_INT_TRAPS}}
either...

> [Sun C++] SIGFPE in 20.temp.buffer in LP64
> ------------------------------------------
>
>                 Key: STDCXX-841
>                 URL: https://issues.apache.org/jira/browse/STDCXX-841
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.2.0
>         Environment: Sun C++
>            Reporter: Martin Sebor
>            Assignee: Eric Lemings
>            Priority: Minor
>             Fix For: 4.2.1
>
>   Original Estimate: 2h
>          Time Spent: 0.5h
>  Remaining Estimate: 1.5h
>
> When compiled with Sun C++ (any version) in LP64 mode, the test [20.temp.buffer.cpp|http://svn.apache.org/viewvc/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp?view=markup]
abends with SIGFPE.

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


Mime
View raw message