DragonFly BSD
DragonFly kernel List (threaded) for 2003-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Linking panic


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Nov 2003 13:21:25 -0800 (PST)

:Hi !
:
:>     Yah, type 'trace' at the DDB> prompt after the panic.
:Sorry, had to rebuild the kernel without
:"options DDB_UNATTENDED" first.
:
:OK, here we are:
:Kernel: type 12 trap, code = 0
:Stopped at      linker_preload+0x122: cmpl $0xc015e44,0x8(%eax)
:db> trace
:linker_preload(35f000,c0332304,c03322e0,c0326e24,c0326ec0) at 
:linker_preload+0x122
:__set_sysinit_set_sym_mbuf_sys_init(c015f658,0,0,622f3b2f,2f746f6f)
:at __set_sysinit_set_sym_mbuf_sys_init
:
:That's it.
:Uh, and my modules are all from the last build.
:
:Cheers
:Peter

    Try the following patch.  I have no idea what the problem is, but I
    put a NULL check in where it's crashing and I print out some debugging
    info.  Post the output.

					-Matt
    
Index: kern_linker.c
===================================================================
RCS file: /cvs/src/sys/kern/kern_linker.c,v
retrieving revision 1.15
diff -u -r1.15 kern_linker.c
--- kern_linker.c	20 Nov 2003 22:07:33 -0000	1.15
+++ kern_linker.c	21 Nov 2003 21:19:51 -0000
@@ -1007,15 +1007,22 @@
 	    }
 	}
 	if (lf) {
+	    printf("CLASS: %p %s file %s\n", lc, lc->desc, lf->filename);
 	    lf->userrefs++;
 
 	    if (linker_file_lookup_set(lf, "sysinit_set", &si_start, &si_stop, NULL) == 0) {
+		printf("Get sysinit_set: %p %p\n", si_start, si_stop);
 		/* HACK ALERT!
 		 * This is to set the sysinit moduledata so that the module
 		 * can attach itself to the correct containing file.
 		 * The sysinit could be run at *any* time.
 		 */
 		for (sipp = si_start; sipp < si_stop; sipp++) {
+		     if (*sipp == NULL) {
+			 printf("PROBLEM! *sipp is NULL at %p\n", *sipp);
+			 continue;
+		     }
+
 		    if ((*sipp)->func == module_register_init) {
 			moddata = (*sipp)->udata;
 			error = module_register(moddata, lf);



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]