[uClibc]new "malloc" directory ...

Marshall M. Midden m4 at brecis.com
Fri Sep 13 04:27:20 UTC 2002


I have run into a problem with "snmpwalk" (from net-snmp-5.0.1).
Running with 2.4.19 kernel, with uclinux patches to 2.4.17 -- upgraded as
needed, with lots of little things added, etc.

# snmpwalk -c public 192.168.1.2
If I use the new malloc, sometimes -- seldom, and randomly, not necessarily
the first time runs.  Otherwise the program will display the sysDescr field,
then a check in sys_munmap() yells that memory is being freed that was never
allocated to the program (and it won't free it).  [and program terminates]

[Yeah, mips bigendian, NOMMU, and lots of checks for overwriting things ...]

If I run several the program several more times, sometimes it will succeed
in overwriting low memory.
    pid 111 (snmpwalk): address (0000000c)!=0 (0x57875cd8)???
A NULL pointer was probably used and offset of 12 was set to value 57875cd8.

(... no MMU, anyone can write to anyplace in memory...)

If I revert back the malloc-simple (you know, mmap and munmap -- with a check
for free(NULL) added for those posix required programs -- insmod/delmod),
everything works just fine.

Any ideas?  Oh, uclibc from snapshot Sept 6th, 2002.



More information about the uClibc mailing list