
Dear Remy Bohmer,
In message AANLkTi=eR+5ZTY_S0hE8QR460QntEHXs1izsFNtopopR@mail.gmail.com you wrote:
So broken that you cannot get back to the command line interpreter? Really?
If malloc is broken, I consider that reason enough for hang/reboot...
That's not a good idea. =A0Please fix.
Fix what? If runtime a condition is detected that should _never_ _ever_ happen (like malloc does not work properly for some reason), which would even make Linux OOPS or panic may not result in a hang() on U-boot?
malloc() is not broken, it just has not enough resources to fulfil your request. That does not mean that the rest of the system (which does not make any such requests) would not be able to continue.
In that case I can remove the hang() and consider if it never happened. Maybe even the code will reach the prompt, but there will be no guarantees...
Fail the running command with appropriate error message and returen code, but do not decide for the user if he is able and willing to continue.
I personally consider that worse compared to tell the user that something serious has gone wrong...
Of course we have to issue appropriate error messages and return codes, but there is no need to halt the system.
You stop your car, but you don't (usually) take it to a knacker's yard when there is a flat tire.
Best regards,
Wolfgang Denk