This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11358] New: vfprintf.o segmentation translation exception virtual storage error


function call printf_unknown() gives memory exception error when trying to use
sprintf() to print the following.

    headerCDN = headerCDN - 12; // CDN header length check  /* R001 */
    memcpy(&msgLength, &amsg_ptr->am0cct, 2);               /* R001 */
    memset(accdParm, '\0', sizeof(accdParm));               /* R001 */
    memcpy(accdParm, &amsg_ptr->am0txt+16+headerCDN, 4);    /* R001 */
    memset(actnParm, '\0', sizeof(actnParm));               /* R001 */
    memcpy(actnParm, &amsg_ptr->am0txt+20+headerCDN, 4);    /* R001 */
    memset(account, '\0', sizeof(account));                 /* R001 */
    memcpy(account, &amsg_ptr->am0txt+32+headerCDN, 18);    /* R001 */
    sprintf(workBuf,"DV72: omsg length-%d\n"                /* R001 */
                    "      CDN header -%d\n"                /* R001 */
                    "      access code-%s\n"                /* R001 */
                    "      msg type   -%s\n"                /* R001 */
                    "      acct info  -%s\n",               /* R001 */
    msgLength, headerCDN, accdParm, actnParm, account);     /* R001 */

msgLength=258
headerCDN=0
accdParm=903I\0
actnParm=CCB\n\0
account=\n%1123456789112345\n\0

it looks like an invalid format identifier at the beginning of account field but
I wouldnt expect the sprintf function to throw an exception error.

-- 
           Summary: vfprintf.o segmentation translation exception virtual
                    storage error
           Product: glibc
           Version: 2.3.2
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: jrandles at hotmail dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: s390x-linux-gnu
  GCC host triplet: s390x-linux-gnu
GCC target triplet: s390x-ibm-tpf


http://sourceware.org/bugzilla/show_bug.cgi?id=11358

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]