From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.2) Gecko/20010628 Description of problem: I have 32MB RAM on this box, which maxes out the motherboard. When I install a new kernel (or run module_upgrade from a shell) it segfaults. Strace shows that it's calling syslog() and passing a NULL pointer instead of a string. Memory allocation failure? Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.Install a new kernel, or run '/usr/sbin/module_upgrade' as root. 2. 3. Actual Results: segfault Expected Results: normal return Additional info:
Can you post the full strace? I'm looking at the code here, and I don't see how it can segfault calling syslog, as everything there has already been dereferenced previously.
Created attachment 34642 [details] Full strace output
gdb shows a corrupt stack, so any pointer stored on the stack could have been reset to NULL between the previous dereference and the call to syslog.
It looks like the strace just before the segfault is a red herring. The last syslog() is a call to setLogLevel from modules.c. I think I've found the real problem. In module_upgrade.c you call probeDevices(CLASS_UNSPEC, BUS_PCI, (PROBE_ALL|PROBE_SAFE)) and immediately dereference the result. But my motherboard is (E)ISA-only, so probeDevices returns a NULL pointer because there is no PCI bus to probe. It looks like this needs to be converted to a pointer to a NULL pointer for the rest of the code to work. Does the rest of the code do anything in that case? If not, you could just bail out at that point.
This was fixed in kudzu-0.98.10-1, which is in 7.2. Sorry about the late reply.