ElectronVector / fake_function_framework

A plug-in for Ceedling to use the Fake Function Framework (fff) for mocking instead of Cmock.
MIT License
36 stars 13 forks source link

SetUp causes memory access violation #19

Open DPastl opened 4 years ago

DPastl commented 4 years ago

Hello,

I'm trying to use the setUp function in fff, but am running into an issue where as soon as I attempt to access global variables, my tests crash with:

And exited with status: [0] (count of failed tests). This is often a symptom of a bad memory access in source or test code.

What I'm doing in the code is:

int somevar;

void setUp( void )
{
    somevar = 0;
}

That is sufficient to cause the tests to crash. Is there a setting in ceedling that I'm missing or something that I'm doing wrong? Or is this a bug in fff / ceedling?

DPastl commented 4 years ago

Hmm... Even doing:

void setUp( void )
{
    static somevar;
    somevar = 0;
}

Will cause a failure.

EighthMayer commented 2 years ago

Hello!

I use this plugin for some time and never had this problem. I know it's been a while, but maybe you could provide more info? Versions of Ruby / Ceedling / FFF plugin / FFF used or something else that can help to reproduce the problem?