Peter Snyder created MYNEWT-369:
-----------------------------------
Summary: 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
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)