Project

General

Profile

Actions

Bug #198

closed

valgrind report a context error on SSLParserTest01

Added by Pablo Rincon over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

valgrind sometimes reports the following error with -O2 on a 64bit vmware box:
pablo@kdevel:/home/pablo/oisf/src# file .libs/suricata
.libs/suricata: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped

11613 Conditional jump or move depends on uninitialised value(s)
11613 at 0x5D6044: SSLParseClientRecord (app-layer-ssl.c:91)
11613 by 0x5B63EC: AppLayerDoParse (app-layer-parser.c:675)
11613 by 0x5B6F4D: AppLayerParse (app-layer-parser.c:879)
11613 by 0x5D7A10: SSLParserTest01 (app-layer-ssl.c:275)
11613 by 0x53A90A: UtRunTests (util-unittest.c:199)
11613 by 0x405E95: main (suricata.c:893)
11613
11613 ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 27 from 4)

Files

0002-This-patch-for-app-layer-ssl-fix-the-bug-198-SSLPa.patch (2.01 KB) 0002-This-patch-for-app-layer-ssl-fix-the-bug-198-SSLPa.patch It's really weird, but it seems that the way of initializing the input was not handled properly by gcc on -O2 and -O3. I changed it to avoid the usage of brackets as array, and directly use a string with hexa data, fixing the length, since it has \0's, an Pablo Rincon, 06/30/2010 10:12 AM
Actions #1

Updated by Victor Julien over 14 years ago

  • Due date set to 06/30/2010
  • Assignee changed from OISF Dev to Pablo Rincon
  • Target version set to 1.0.0
  • Estimated time set to 2.00 h
Actions #2

Updated by Pablo Rincon over 14 years ago

It's really weird, but it seems that the way of initializing the input was not handled properly by gcc on -O2 and -O3. I changed it to avoid the usage of brackets as array, and directly use a string with hexa data, fixing the length, since it has \0's, and now it doesn't report ctx errors. The problem was at the last 2 bytes, after two 0x00.

Actions #3

Updated by Victor Julien over 14 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100

Applied, thanks Pablo.

Actions

Also available in: Atom PDF