[ 
https://issues.apache.org/jira/browse/TS-941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leif Hedstrom updated TS-941:
-----------------------------

    Fix Version/s: 3.1.1

Thanks for the patch! Btw, for future patches (please keep 'em coming), it's 
easier if you attach them as attachments, and also make sure that they are made 
with the "full" path (e.g. iocore/cache/CacheWrite.cc), it makes patching 
easier.

Thanks!

> invalid cast of off_t math to int
> ---------------------------------
>
>                 Key: TS-941
>                 URL: https://issues.apache.org/jira/browse/TS-941
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 3.1.0
>         Environment: Stock debian amd64 2.6.34.7 kernel modified to increase 
> XEN domU max RAM to 96Gb
> Stock build with:
> ./configure --enable-layout=Debian --sysconfdir=/etc/trafficserver --libdir=
> /usr/lib/trafficserver --with-user=root --with-group=root --enable-debug 
> --enabl
> e-static-libts CFLAGS= CXXFLAGS= --enable-wccp
>            Reporter: B Wyatt
>            Assignee: Leif Hedstrom
>             Fix For: 3.1.1
>
>
> iocore/CacheWrite.cc:Vol::evac_range calculates its looping values from 64bit 
> off_t values but stores them in 32bit integers:
> {code:title=CacheWrite.cc#1086711:694-700} 
> int
> Vol::evac_range(off_t low, off_t high, int evac_phase)
> {
>   int s = offset_to_vol_offset(this, low);
>   int e = offset_to_vol_offset(this, high);
>   int si = dir_offset_evac_bucket(s);
>   int ei = dir_offset_evac_bucket(e);
> {code}
> When Vol::start and/or the low high parameters get large enough these loop 
> values become truncated and potentially negative causing a general protection 
> fault as it attempts to access memory addresses below the valid range.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to