libosmocore[master]: rate_ctr: doc: explain intentional "mem leak" for mangled gr...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sat Nov 18 11:58:42 UTC 2017


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/4866/1/src/rate_ctr.c
File src/rate_ctr.c:

Line 185:  * Attention: if the description struct (\a desc) contains invalid characters, a mangled description
> Actually, if it behaves like this, I think it's a bug.  We cannot create a 
I see these ways forward:

- drop mangling, output a warning on startup instead of aborting the program. Then old programs will lack some ctrl variables, but we don't break compat.

- place a mangled_desc pointer in rate_ctr_group. It can then be deallocated on group_free(). We'll create a new mangling for each alloc, not really harmful.

Mangling is nice for fixing "into the past", but once we have proper rate ctr names everywhere, it would be dead code into the future and it would be better to forbid instead of mangling... dilemma decision. I guess I slightly tend towards having less code and let the past be the past... but don't feel strongly either way.


-- 
To view, visit https://gerrit.osmocom.org/4866
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I35363c4c1fa0d62fd7fed40fe689487244248a3f
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list