Opened 14 years ago

Closed 14 years ago

#3215 closed enhancement (invalid)

CPLMalloc to zero memory in debug

Reported by: Mateusz Łoskot Owned by: Mateusz Łoskot
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords: cpl
Cc:

Description

A tiny patch that makes CPLMalloc function setting bytes of newly allocated memory block to Zeros, in debug configuration only.

Attachments (1)

cplmalloc-memset-in-debug.patch (377 bytes ) - added by Mateusz Łoskot 14 years ago.
Patch with memset call from CPLMalloc if _DEBUG is defined

Download all attachments as: .zip

Change History (4)

by Mateusz Łoskot, 14 years ago

Patch with memset call from CPLMalloc if _DEBUG is defined

comment:1 by Even Rouault, 14 years ago

What is the aim of the patch ? memset'ing the memory will hide potential use of uninitialized memory if the process is run under Valgrind for example

comment:2 by Mateusz Łoskot, 14 years ago

Owner: changed from warmerdam to Mateusz Łoskot
Status: newassigned

comment:3 by Mateusz Łoskot, 14 years ago

Resolution: invalid
Status: assignedclosed

Nevermind. I've forgotten about the Valgrind feature and suggested to initialize by default, in debug.

Note: See TracTickets for help on using tickets.