On Saturday, November 06, 2010 18:13:08 Graeme Russ wrote: > I finally got a few spare hours to do some U-Boot hacking and to my dismay > found the build for my board (eNET) had broken. It builds OK, but crashed > during Ethernet initialisation. I tried winding back to a last known good > commit without much luck. > > I realised I had upgraded to Ubuntu 10.10 lately, and thought maybe a > tool-chain change was the culprit (was running gcc-4.4.1 and binutils 2.19 > from source, now running Ubuntu gcc 4.4.5 and Binutils 2.20) > > But, I think that commit ecee9324d73555e744593f3e0d387bec4c566f55 may be > 'not quite right'. My board uses the rtl8139 driver, and the following > patch gets my board booting again: > > Just before this code we see that dev is malloc'd: > > dev = (struct eth_device *)malloc(sizeof *dev); > > So there is no guarantee that dev is NULL'd.
rtl8139 is broken. it should be clearing its memory. someone posted a whole bunch of patches to memset() net drivers ... > I saw discussion a little while ago regarding implementing a version of > malloc that returns cleared memory - did this gain any traction? i dont think anyone posted a patch. it would make sense though to generalize the zalloc() code since some places are already doing it. -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot