[ 
https://issues.apache.org/jira/browse/STDCXX-781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Sebor reassigned STDCXX-781:
-----------------------------------

    Assignee: Martin Sebor

> [HP aCC 6.16] warning #20206-D: Out of bound access and #20208-D: Forming out 
> of bound address in _traits.h
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: STDCXX-781
>                 URL: https://issues.apache.org/jira/browse/STDCXX-781
>             Project: C++ Standard Library
>          Issue Type: Sub-task
>          Components: 21. Strings
>    Affects Versions: 4.2.0
>         Environment: $ uname -sr && aCC -V
> HP-UX B.11.31
> aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]
>            Reporter: Scott (Yu) Zhong
>            Assignee: Martin Sebor
>             Fix For: 4.2.1
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> When compiled with HP aCC 6.16 with +w +O, the test 
> [23.bitset.cons.stdcxx-297.cpp|http://svn.apache.org/repos/asf/stdcxx/trunk/tests/containers/23.bitset.cons.cpp]
>  produces the following warning out of the 
> [_traits.h|http://svn.apache.org/repos/asf/stdcxx/trunk/include/rw/_traits.h] 
> header:
> {noformat}
> aCC -c -I$(TOPDIR)/include -I$(BUILDDIR)/include -I$(TOPDIR)/tests/include  
> -AA  +O2  +DD64 +w \
>     +W392 +W655 +W684 +W818 +W819 +W849 +W2193 +W2236 +W2261 +W2340 +W2401 
> +W2487 +W4227 \
>     +W4229 +W4231 +W4235 +W4237 +W4249 +W4255 +W4272 +W4284 +W4285 +W4286 
> +W4296 +W4297 +W3348 \
>     $(TOPDIR)/tests/regress/23.bitset.cons.stdcxx-297.cpp
> "$(TOPDIR)/include/string", line 842: warning #4232-D: conversion from "int 
> *" to a more strictly aligned type "__rw::__string_ref<int, 
> std::char_traits<int>, std::allocator<int>> *" may cause misaligned access
>           return _RWSTD_REINTERPRET_CAST (_C_string_ref_type*, _C_data) - 1; 
>                  ^
>           detected during:
>             instantiation of "__rw::__string_ref<_Traits::char_type, _Traits, 
> _Allocator> *std::basic_string<_CharT, _Traits, _Allocator>::_C_pref() const 
> [with _CharT=int, _Traits=std::char_traits<int>, 
> _Allocator=std::allocator<int>]" at line 899
>             instantiation of "void std::basic_string<_CharT, _Traits, 
> _Allocator>::_C_unlink(_Allocator::pointer) [with _CharT=int, 
> _Traits=std::char_traits<int>, _Allocator=std::allocator<int>]" at line 198
>             instantiation of "std::basic_string<_CharT, _Traits, 
> _Allocator>::~basic_string() [with _CharT=int, _Traits=std::char_traits<int>, 
> _Allocator=std::allocator<int>]" at line 42 of 
> "$(TOPDIR)/tests/regress/23.bitset.cons.stdcxx-297.cpp"
> "$(TOPDIR)/include/rw/_traits.h", line 333, procedure main: warning #20208-D: 
> Forming out of bound address (In expression "(const 
> int*)(&(&std::basic_string<int, std::char_traits<int>, 
> std::allocator<int>>::_C_null_ref)-><compiler generated undef>_0+1)+1", 
> &(&std::basic_string<int, std::char_traits<int>, 
> std::allocator<int>>::_C_null_ref)-><compiler generated undef>_0+1 (type: 
> struct __rw::__string_ref<std::basic_string<int, std::char_traits<int>, 
> std::allocator<int>>::value_type, std::basic_string<int, 
> std::char_traits<int>, std::allocator<int>>::traits_type, 
> std::basic_string<int, std::char_traits<int>, 
> std::allocator<int>>::allocator_type> ) (defined by &(&std::basic_string<int, 
> std::char_traits<int>, std::allocator<int>>::_C_null_ref)-><compiler 
> generated undef>_0) has byte range [0 .. 23], forming address byte range [28 
> .. 31].)
> "$(TOPDIR)/include/rw/_traits.h", line 314, procedure main: warning #20206-D: 
> Out of bound access (In expression "&(&std::basic_string<int, 
> std::char_traits<int>, std::allocator<int>>::_C_null_ref)-><compiler 
> generated undef>_0+1", &(&std::basic_string<int, std::char_traits<int>, 
> std::allocator<int>>::_C_null_ref)-><compiler generated undef>_0 (type: 
> struct __rw::__string_ref<std::basic_string<int, std::char_traits<int>, 
> std::allocator<int>>::value_type, std::basic_string<int, 
> std::char_traits<int>, std::allocator<int>>::traits_type, 
> std::basic_string<int, std::char_traits<int>, 
> std::allocator<int>>::allocator_type> ) has byte range [0 .. 23], reading 
> byte range [24 .. 47].)
> {noformat}

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

Reply via email to