Bug in Redlib malloc

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bug in Redlib malloc

1,325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by udoeb on Wed Nov 05 10:38:26 MST 2014
Hi,

I'm using LPC1857 and LPCXpresso 7.4.0 and found a bug in malloc(). Steps to reproduce:

  void* p = malloc(200);
  free(p);
  p = malloc(200);


The second call to malloc crashes internally with a memory fault exception because the function dereferences a NULL pointer.This exception shows up only if the MPU is enabled and configured so that zero is a protected address. I'm using this MPU setup to detect mistakes in my own code.

If the MPU is not enabled then malloc does not crash. However, it uses a random value read from address zero then.

I would like to continue using the MPU to detect NULL pointer issues in my own code.

Questions:
1) Is the source code of Redlib available?
2) How can I get a fix for this problem?

Thanks.
Udo Eberhardt
0 Kudos
Reply
3 Replies

1,279 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by udoeb on Tue Nov 11 07:37:50 MST 2014
Dear LPCXpresso Support,

I confirm that in v7.5.0 this issue is fixed. Thank you very much!

Regards,
Udo
0 Kudos
Reply

1,279 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Nov 06 06:26:19 MST 2014

Quote: lpcxpresso-support
Thanks for reporting this issue. This problem is fixed in the next release of LPCXpresso (which will be released very shortly).



LPCXpresso 7.5.0 is now available and should fix this issue.

Regards,
LPCXpresso Support
0 Kudos
Reply

1,279 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Nov 05 10:46:14 MST 2014
Thanks for reporting this issue. This problem is fixed in the next release of LPCXpresso (which will be released very shortly).
0 Kudos
Reply