Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-commits: [Wireshark-commits] master ec6a22d: Workaround for ASAN failure in _ws_mempbrk_s

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 6 Jul 2014 22:53:36 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=ec6a22dc3ba8e2d438b34d892d6a40e1be2a28f2
Submitter: Evan Huus (eapache@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

ec6a22d by Peter Wu (peter@xxxxxxxxxxxxx):

    Workaround for ASAN failure in _ws_mempbrk_sse42
    
    When ASAN is enabled, a false buffer overflow warning is raised. It is
    a false positive since everything starting at '\0' will get ignored by
    the PCMPISTRI instruction (see Intel(r) SSE4 Programming Reference,
    5.3.1.5 "Valid/Invalid Override of Comparisons", and 5.3.1.2
    "Aggregrate Operation", case "Equal any").
    
    Concerns about reading past the end of the page turns out to be false,
    there always seem to be a valid page after the current one (for static
    and heap memory at least). It is an non-issue since strlen also does
    not have issues with this.
    
    Rather than fully disabling SSE 4.2 and using the fallback
    implementation for ASAN-enabled builds, read the set of characters from
    'a' into the mask without a 128-bit read and then still use SSE 4.2
    for the actual query.
    
    Bug: 10214
    Change-Id: Ie4a526e60b43bfc08dd1d821556766f14a49be4d
    Reviewed-on: https://code.wireshark.org/review/2618
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
    

Actions performed:

    from  49bc104   whois,finger: fix retval, convert from tvb_length
    adds  ec6a22d   Workaround for ASAN failure in _ws_mempbrk_sse42


Summary of changes:
 wsutil/ws_mempbrk_sse42.c |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)