{"action":"created","issue":{"url":"https://api.github.com/repos/pellepl/spiffs/issues/86","repository_url":"https://api.github.com/repos/pellepl/spiffs","labels_url":"https://api.github.com/repos/pellepl/spiffs/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/pellepl/spiffs/issues/86/comments","events_url":"https://api.github.com/repos/pellepl/spiffs/issues/86/events","html_url":"https://github.com/pellepl/spiffs/issues/86","id":149935644,"number":86,"title":"build/linux_spiffs_test fails (segfault) on first test","user":{"login":"dpruessner","id":20125,"avatar_url":"https://avatars.githubusercontent.com/u/20125?v=3","gravatar_id":"","url":"https://api.github.com/users/dpruessner","html_url":"https://github.com/dpruessner","followers_url":"https://api.github.com/users/dpruessner/followers","following_url":"https://api.github.com/users/dpruessner/following{/other_user}","gists_url":"https://api.github.com/users/dpruessner/gists{/gist_id}","starred_url":"https://api.github.com/users/dpruessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpruessner/subscriptions","organizations_url":"https://api.github.com/users/dpruessner/orgs","repos_url":"https://api.github.com/users/dpruessner/repos","events_url":"https://api.github.com/users/dpruessner/events{/privacy}","received_events_url":"https://api.github.com/users/dpruessner/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-04-21T01:47:52Z","updated_at":"2016-04-23T18:39:41Z","closed_at":"2016-04-21T21:29:38Z","body":"I'm using gcc version 5.1.0 on Linux64 (arch).  Just running `make; and make test` fails with \r\n\r\n```\r\nadding suites...\r\nadding test evil_write\r\n[...]\r\n72 tests added\r\nrunning tests...\r\nfish: “./linux_spiffs_test” terminated by signal SIGSEGV (Address boundary error)\r\n```\r\n\r\nLooks like the `SUITE(check_tests)` macro creates a function, then the subsequent `TEST(...)` macros create nested functions.  However, it looks like pointers to these nested functions are assigned into a global variable.  As far as I can tell, these function pointers are accessed after the call to `__suite_check_tests(...)` is called.  I'm trying to piece together how this could ever run, given how I understand GCC creates nested functions with trampolines.\r\n\r\nBut from other comments, this test suite clearly works for other folks.  What toolchain successfully builds the test suite?\r\n\r\nThanks,\r\nDaniel"},"comment":{"url":"https://api.github.com/repos/pellepl/spiffs/issues/comments/213803265","html_url":"https://github.com/pellepl/spiffs/issues/86#issuecomment-213803265","issue_url":"https://api.github.com/repos/pellepl/spiffs/issues/86","id":213803265,"user":{"login":"talon75","id":17934277,"avatar_url":"https://avatars.githubusercontent.com/u/17934277?v=3","gravatar_id":"","url":"https://api.github.com/users/talon75","html_url":"https://github.com/talon75","followers_url":"https://api.github.com/users/talon75/followers","following_url":"https://api.github.com/users/talon75/following{/other_user}","gists_url":"https://api.github.com/users/talon75/gists{/gist_id}","starred_url":"https://api.github.com/users/talon75/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talon75/subscriptions","organizations_url":"https://api.github.com/users/talon75/orgs","repos_url":"https://api.github.com/users/talon75/repos","events_url":"https://api.github.com/users/talon75/events{/privacy}","received_events_url":"https://api.github.com/users/talon75/received_events","type":"User","site_admin":false},"created_at":"2016-04-23T18:39:41Z","updated_at":"2016-04-23T18:39:41Z","body":"Hi! Hope you don't bother if I try to help a bit...\r\nOf course, @pellepl is absolutely right.\r\nAnyway, on STM32, you could also use backup domain registers to keep your boot counter. Or, since you're on STM32F2, you have plenty of backup SRAM to play with. "}}