Bug in openrisc __malloc_lock

Stefan Wallentowitz stefan.wallentowitz@tum.de
Mon Aug 3 10:43:00 GMT 2015

Hi Julius,

On 03.08.2015 11:25, Julius Schmidt wrote:
> I believe there is a bug in the openrisc implementation of __malloc_lock:
> The lines
> 	restore = or1k_critical_begin();
> 	_or1k_malloc_lock_restore = restore;
> are executed every time _malloc_lock is called. If __malloc_lock is called recursively then the
> old value of restore will be forgotten and so interrupts will remain disabled even after the
> required number of __malloc_unlock calls.

Sorry, I got obstructed during my last upstreaming efforts and this was
something that was fixed recently

You can find the proper version at the OpenRISC development repository:

I will prepare the upstream patches asap, sorry for the inconvenience.


More information about the Newlib mailing list