Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-3990

CID 1332248: (NEGATIVE_RETURNS) in lib/ts/ink_queue.cc (freelist)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.1.0
    • Core

    Description

      *** CID 1332248:    (NEGATIVE_RETURNS)
      /lib/ts/ink_queue.cc: 207 in freelist_new(_InkFreeList *)()
      201             alloc_size = INK_ALIGN(f->chunk_size * f->type_size, ats_hugepage_size());
      202             newp = ats_alloc_hugepage(alloc_size);
      203           }
      204     
      205           if (newp == NULL) {
      206             alloc_size = INK_ALIGN(f->chunk_size * f->type_size, ats_pagesize());
         CID 1332248:    (NEGATIVE_RETURNS)
         "ats_pagesize()" is passed to a parameter that cannot be negative.
      207             newp = ats_memalign(ats_pagesize(), alloc_size);
      208           }
      209     
      210           ats_madvise((caddr_t)newp, alloc_size, f->advice);
      211           SET_FREELIST_POINTER_VERSION(item, newp, 0);
      212     
      /lib/ts/ink_queue.cc: 207 in freelist_new(_InkFreeList *)()
      201             alloc_size = INK_ALIGN(f->chunk_size * f->type_size, ats_hugepage_size());
      202             newp = ats_alloc_hugepage(alloc_size);
      203           }
      204     
      205           if (newp == NULL) {
      206             alloc_size = INK_ALIGN(f->chunk_size * f->type_size, ats_pagesize());
         CID 1332248:    (NEGATIVE_RETURNS)
         "ats_pagesize()" is passed to a parameter that cannot be negative.
      207             newp = ats_memalign(ats_pagesize(), alloc_size);
      208           }
      209     
      210           ats_madvise((caddr_t)newp, alloc_size, f->advice);
      211           SET_FREELIST_POINTER_VERSION(item, newp, 0);
      212     
      

      Attachments

        Issue Links

          Activity

            People

              zwoop Leif Hedstrom
              zwoop Leif Hedstrom
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: