[
https://issues.apache.org/jira/browse/MYNEWT-369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15439287#comment-15439287
]
ASF subversion and git services commented on MYNEWT-369:
--------------------------------------------------------
Commit 1e6c958bbd568e1267001731a9cbf41348700fad in incubator-mynewt-core's
branch refs/heads/develop from [~peterfs]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-mynewt-core.git;h=1e6c958
]
Don't zero stats_hdr in stats_init() so s_name is preserved
Address jira ticket MYNEWT-369
https://issues.apache.org/jira/browse/MYNEWT-369
> 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)