Menu

#1028 base: String pointer inside SaNameT not detected by Valgrind

4.5.0
fixed
None
defect
base
-
4.5.FC
major
2014-09-15
2014-08-28
No

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.

Related

Tickets: #1028

Discussion

  • Anders Widell

    Anders Widell - 2014-09-11
    • summary: osaf: String pointer inside SaNameT not detected by Valgrind --> base: String pointer inside SaNameT not detected by Valgrind
    • status: accepted --> review
    • Component: osaf --> base
     
  • Anders Widell

    Anders Widell - 2014-09-15
    • status: review --> fixed
     
  • Anders Widell

    Anders Widell - 2014-09-15

    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: #1028
    Commit: [c697de]
    Commit: [ea0b11]


Log in to post a comment.