The string pointer stored inside the SaNameT structure for long DNs (longer than 255 bytes) is not detected by Valgrind, since it is not stored on an aligned address. This has the effect that allocated memory may be reported as "definitely lost" rather than "still reachable" by the Valgrind memory leak detection.
The fix is to store the pointer at an aligned address. It will only work when the SaNameT structure itself is stored at an aligned address (which is not guaranteed since it contains nothing larger than an 16-bit integer), but it should work in most cases anyhow.
changeset: 5799:ea0b11047dc2
branch: opensaf-4.5.x
parent: 5797:f54d45630e66
user: Anders Widell anders.widell@ericsson.com
date: Mon Sep 15 15:03:48 2014 +0200
summary: base: Store string pointer in extended SaNameT at an aligned address [#1028]
changeset: 5800:c697de1a1e8d
tag: tip
parent: 5798:f5bbccf3d32e
user: Anders Widell anders.widell@ericsson.com
date: Mon Sep 15 15:03:48 2014 +0200
summary: base: Store string pointer in extended SaNameT at an aligned address [#1028]
[staging:ea0b11]
[staging:c697de]
Related
Tickets:
#1028Commit: [c697de]
Commit: [ea0b11]