Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-649

[IBM XLC++ 9.0/AIX 5.3] SIGSEGV in 0.printf

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: Tests
    • Labels:
      None
    • Environment:

      64-bit builds only

    • Patch Info:
      Patch Available
    • Severity:
      Incorrect Behavior

      Description

      extension: "%

      {@}

      " nested format directive

      Segmentation fault in memchr.memchr at 0x90000000007fa84 ($t1)
      0x90000000007fa84 (memchr+0x18) 8ca40001 lbzu r5,0x1(r4)

      Here is the stack trace

      (dbx) where
      memchr.memchr(??, ??, ??) at 0x90000000007fa84
      collate.memchr(const void*,int,unsigned long)(0x18786400000000, 0x0, 0x1000), line 125 in "string.h"
      unnamed block $b893, line 221 in "memattr.cpp"
      unnamed block $b891, line 221 in "memattr.cpp"
      __rw_memattr(const void*,unsigned long,int)(addr = 0x0018786400000000, nbytes = 18446744073709551615, attr = -1), line 221 in "memattr.cpp"
      printf.strlen(const char*)(0xfffffffffffd8a0, 0xffffffffffff648, 0x18786400000000, 0xffffffffffffffff, 0x300000003), line 1939 in "printf.cpp"
      _rw_fmtstr(const FmtSpec&,Buffer&,const char*,unsigned long)(spec = &(...), buf = &(...), str = (invalid char ptr (0x0018786400000000)), len = 18446744073709551615), line 2373 in "printf.cpp"
      unnamed block $b661, line 597 in "printf.cpp"
      _rw_vasnprintf_c99(FmtSpec*,unsigned long,Buffer&,VarArgs*)(pspec = 0x0fffffffffffd858, paramno = 1, buf = &(...), pva = 0x0fffffffffffe3c8), line 597 in "printf.cpp"
      unnamed block $b709, line 901 in "printf.cpp"
      unnamed block $b708, line 901 in "printf.cpp"
      unnamed block $b704, line 901 in "printf.cpp"
      _rw_pvasnprintf(Buffer&,const char*,VarArgs*)(buf = &(...), fmt = ", %#s)", pva = 0x0fffffffffffe3c8), line 901 in "printf.cpp"
      unnamed block $b677, line 3229 in "printf.cpp"
      _rw_fmtnested(const FmtSpec&,Buffer&,const char*,VarArgs*)(spec = &(...), buf = &(...), fmt = "(%zu, %#s)", pva = 0x0ffffffffffff670), line 3229 in "printf.cpp"
      unnamed block $b679, line 2604 in "printf.cpp"
      _rw_vasnprintf_ext(FmtSpec*,unsigned long,Buffer&,const char*,VarArgs*)(pspec = 0x0fffffffffffeac8, paramno = 0, buf = &(...), fmt = " .*A@", pva = 0x0ffffffffffff670), line 2604 in "printf.cpp"
      unnamed block $b706, line 810 in "printf.cpp"
      unnamed block $b704, line 810 in "printf.cpp"
      _rw_pvasnprintf(Buffer&,const char*,VarArgs*)(buf = &(...), fmt = "{%{ .*A@}}", pva = 0x0ffffffffffff670), line 810 in "printf.cpp"
      rw_vasnprintf(char*,unsigned long,const char*,char*)(pbuf = 0x0ffffffffffff760, pbufsize = 0x0ffffffffffff768, fmt = "{%{ .*A@}}", varg = ""), line 1013 in "printf.cpp"
      rw_sprintfa(const char*,...)(fmt = "{%{ .*A@}}", ... = 0x3, 0x100188370, 0x11000ed18, 0x0, 0x0, 0x1, 0x10030260), line 3316 in "printf.cpp"
      test_nested_format()(), line 2953 in "0.printf.cpp"
      main(), line 3064 in "0.printf.cpp"

        Attachments

        1. stdcxx-649.patch
          1 kB
          Travis Vitek

          Activity

            People

            • Assignee:
              vitek Travis Vitek
              Reporter:
              vitek Travis Vitek
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: