Skip to content
Snippets Groups Projects
Commit f1560798 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Workaround for a valgrind warning on 64-bit systems.

Workaround a valgrind warning in strtod on 64 bit systems.

On 64-bit systems, strtod uses an optimized version of
strcasecmp to find out whether or not a string represents
a number.

This version uses int (8 byte) comparison. If the string
in turn is less than 8 bytes, or is not aligned around 8 byte
boundary, uninitialized memory can be accessed.

Work this around with a simple test (this is lame and
incomplete, but covers our cases. In future either
this in valgrind will be gone, or our code will change,
or we add a suppression).
parent e4fcacbf
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment