[
https://issues.apache.org/jira/browse/MYNEWT-369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15438307#comment-15438307
]
Sterling Hughes commented on MYNEWT-369:
----------------------------------------
hi peter, can you please submit a PR for this against develop?
thanks
> stats_init zeroes out stats_hdr including s_name
> ------------------------------------------------
>
> Key: MYNEWT-369
> URL: https://issues.apache.org/jira/browse/MYNEWT-369
> Project: Mynewt
> Issue Type: Bug
> Components: OS
> Affects Versions: v0_9_0
> Environment: mynewt OS platform independent
> Reporter: Peter Snyder
> Assignee: Peter Snyder
> Priority: Minor
> Labels: easyfix
> Fix For: v1_0_0_beta1
>
>
> Duplicate calls to register a stats section (via stats_register() or
> stats_init_and_reg()) are prevented by comparing the name against the names
> of previously registered stats. stats_init() zeroes out the entire header
> including the name which results in a SEGV in stats_register() when called
> multiple times. stats_init() should zero out the list of statistics but not
> the header.
> This was caught by running the nffs unit tests which calls nffs_init()
> multiple times.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)