ARMmbed / core-util

DEPRECATED: Mbed 3 utilities library
Other
12 stars 17 forks source link

HardFault on krbs allocation failure #46

Closed antevir closed 8 years ago

antevir commented 8 years ago

mbed_krbs_ex() returns -1 on failure while the callers checks for NULL. This results in corrupted memory and HardFault. The problem can be triggered with:

void test() {}

void app_start(int, char**) {
    while (true)
    {
        mbed::util::FunctionPointer0<void> fp(test);
        minar::Scheduler::postCallback(fp.bind());
    }
}
ciarmcom commented 8 years ago

ARM Internal Ref: IOTSFW-1306