GCC reent structures are not swapped out on task switches as they should be. This needs to be fixed. Useful link below: https://developer.mbed.org/users/AdamGreen/notebook/newlib-nano/