Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVStore call crashes when compiled with ARMCC #6706

Closed
romkuz01 opened this issue Apr 23, 2018 · 3 comments
Closed

NVStore call crashes when compiled with ARMCC #6706

romkuz01 opened this issue Apr 23, 2018 · 3 comments

Comments

@romkuz01
Copy link

Use the following main.cpp to reproduce the crash:

#include "nvstore.h"

const uint8_t global_buffer[91] = {0}; // doesn't crash without "const"

int main()
{
     NVStore &nvstore = NVStore::get_instance();

     printf("Trying to reproduce NVStore crash...\n");
     nvstore.set(10, sizeof(global_buffer), global_buffer);
     printf("NVStore didn't crash...\n");
}

Compile and run with:
mbed compile -t ARM -m K64F --profile debug -f

The failure was detected with ARMCC version:
ARM Compiler 5.06 update 3 (build 300)

Some observations:

  • Crashes only with --profile set to "debug" or "release", doesn't crash with "develop"
  • Passes when "const" removed from array definition
  • Passes if array is defined as uint32_t (change in data alignment?)
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 23, 2018

@davidsaada Please review

@davidsaada
Copy link
Contributor

Resolved by PR #6864.

@ciarmcom
Copy link
Member

ciarmcom commented Jun 1, 2018

ARM Internal Ref: MBOTRIAGE-68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants