You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Leif Hedstrom (JIRA)" <ji...@apache.org> on 2015/11/02 05:13:27 UTC
[jira] [Commented] (TS-3990) CID 1332248: (NEGATIVE_RETURNS) in
lib/ts/ink_queue.cc (freelist)
[ https://issues.apache.org/jira/browse/TS-3990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14984722#comment-14984722 ]
Leif Hedstrom commented on TS-3990:
-----------------------------------
This should be back ported to 6.0.1 if we back port those other madvise fixes as well. There was a list of four commits necessary.
> CID 1332248: (NEGATIVE_RETURNS) in lib/ts/ink_queue.cc (freelist)
> --------------------------------------------------------------------
>
> Key: TS-3990
> URL: https://issues.apache.org/jira/browse/TS-3990
> Project: Traffic Server
> Issue Type: Bug
> Components: Core
> Reporter: Leif Hedstrom
> Assignee: Phil Sorber
> Labels: A
> Fix For: 6.1.0
>
>
> {code}
> *** 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
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)