On 11 March 2015 at 10:32, Ola Liljedahl <[email protected]> wrote:
> These examples won't leak memory continuously so why is this a problem? > Are we catering to e.g. bare metal environments which may not clean up > after applications have terminated? > I think the tests should be clean so they can be reused in bare metal environment without too much trouble, but also I agree we only test on linux-generic. However on linux generic tools such as clang-scan, Coverity, Valgrind etc are run to catch mistakes, that is a lot easier if the code is inherently clean in those tools to begin with. In some cases we need to mark false positives, in others add some clean up - this is one of those clean up items from Coverity https://bugs.linaro.org/show_bug.cgi?id=1117 Mike > > > On 11 March 2015 at 14:52, Ciprian Barbu <[email protected]> wrote: > >> This series continues the patch I sent some while ago to replace strtok >> with >> strtok_r in odp_pktio: >> >> https://git.linaro.org/lng/odp.git/commit/273955e6db6bb220f2736d3709e4237c50d04772 >> >> The bug that this series fixes only refers to resource leaks, but the >> initial >> strtok_r fix should have been done for all examples, there is no need to >> use the >> reentrant version of strtok because it is only used from one thread, once, >> during parsing of args. >> >> There was a suggestion at some point to make the parsing of if_names >> common for >> all examples, I don't think it's easy to factor it out, it would >> introduce more >> code than necessary and we're only talking about a few lines of code. >> >> Ciprian Barbu (3): >> example: odp_l2fwd: replace strtok_r with strtok and fix leaks >> example: odp_ipsec: replace strtok_r with strtok and fix leaks >> example: generator: replace strtok_r with strtok and fix leaks >> >> example/generator/odp_generator.c | 30 ++++++++++++++++-------------- >> example/ipsec/odp_ipsec.c | 30 ++++++++++++++---------------- >> example/l2fwd/odp_l2fwd.c | 29 +++++++++++++++-------------- >> 3 files changed, 45 insertions(+), 44 deletions(-) >> >> -- >> 1.8.3.2 >> >> >> _______________________________________________ >> lng-odp mailing list >> [email protected] >> http://lists.linaro.org/mailman/listinfo/lng-odp >> > > > _______________________________________________ > lng-odp mailing list > [email protected] > http://lists.linaro.org/mailman/listinfo/lng-odp > > -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
_______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
