| Summary: | Valgrind on Mac should suppress setenv() mem leak | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Nirnimesh <nirnimesh> |
| Component: | memcheck | Assignee: | Nicholas Nethercote <njn> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | glider, jseward, njn |
| Priority: | NOR | ||
| Version First Reported In: | 3.5 SVN | ||
| Target Milestone: | blocking3.5.0 | ||
| Platform: | Unlisted Binaries | ||
| OS: | macOS | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
For reference, here's the relevant section from the man page:
BUGS
Successive calls to setenv() or putenv() assigning a differently sized
value to the same name will result in a memory leak. The FreeBSD seman-
tics for these functions (namely, that the contents of value are copied
and that old values remain accessible indefinitely) make this bug
unavoidable. Future versions may eliminate one or both of these semantic
guarantees in order to fix the bug.
Fixed in r10380. Thanks for the report. This is missing in darwin10.supp since the merge of MACOSX106. Was it intentional? Fixed, r11519. |
setenv() on Mac leaks memory intentionally. (refer: man setenv) Valgrind should suppress this on Mac. Probably: { setenv() leaks on Mac intentionally. Memcheck:Leak ... fun:__setenv fun:setenv$UNIX2003 }