Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-726 [HP aCC 6.16] many cadvise warnings
  3. STDCXX-755

[HP aCC 6.16] Potential null pointer dereference in locale.cpp

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2.0
    • 4.2.1
    • Test Driver
    • None
    • $ uname -sr && aCC -V
      HP-UX B.11.31
      aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]

    Description

      When compiled with HP aCC 6.16 with the +w option, the locale.cpp test driver source file produces a bunch of warnings (and remarks):

      aCC -c    -mt -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/src/locale.cpp
      "$(TOPDIR)/include/limits", line 449: warning #4070-D: floating point underflow exception
            _RWSTD_STATIC_FUN (long double, (min), _RWSTD_LDBL_MIN) 
            ^
      
      "$(TOPDIR)/tests/src/locale.cpp", line 1534: remark #4298-D: addition result could be truncated before cast to bigger sized type
                    offset += (len + 1);
                                   ^
      
      "$(TOPDIR)/tests/src/locale.cpp", line 380, procedure rw_locales: warning #20200-D: Potential null pointer dereference through slocname is detected (null definition:$(TOPDIR)/tests/src/locale.cpp, line 375)
      
      "$(TOPDIR)/tests/src/locale.cpp", line 472, procedure rw_locales: warning #20200-D: Potential null pointer dereference through  return of call to malloc is detected (null definition:$(TOPDIR)/tests/src/locale.cpp, line 469)
      
      "$(TOPDIR)/tests/src/locale.cpp", line 1215, procedure _rw_all_locales: warning #20206-D: Out of bound access (In expression "strcpy((char*)entry->locale_name, (char*)locale)", entry->locale_name (type: char [64]) has byte range [0 .. 63], writing byte range [0 .. 127].)
      

      Attachments

        Issue Links

          Activity

            People

              vitek Travis Vitek
              scottz Scott (Yu) Zhong
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h
                  2h