[gopher] Dynamically linked Mosaic on Linux??

Cameron Kaiser spectre at floodgap.com
Fri Nov 12 13:51:16 UTC 2010


> > > Program received signal SIGSEGV, Segmentation fault.
> > > 0x10078ae4 in set_pref_solid (pref_id=121, incoming=0x0,
> > > iincoming=0, bincoming=0 '\000') at prefs.c:1678
> > > 1678	                *((Boolean *)incoming); (gdb) backtrace
> > > #0  0x10078ae4 in set_pref_solid (pref_id=121, incoming=0x0,
> > > iincoming=0, bincoming=0 '\000') at prefs.c:1678 #1  0x10077718 in
> > > set_pref_boolean (pref_id=121, value=0 '\000') at prefs.c:1168 #2
> > > 0x1001299c in mo_do_gui (argc=1, argv=0xbfffef14) at gui.c:4437 #3
> > > 0x10006b40 in main (argc=1, argv=0xbfffef14, envp=0xbfffef1c) at
> > > main.c:251 (gdb) 
> > 
> > Okay. I can't get this to trigger, but I think I understand what the
> > problem is. In prefs.c, change line 1677-1678:
> > 
> >          case eSPLASHSCREEN:
> > -            thePrefsStructP->RdataP->splashScreen =
> > -                *((Boolean *)incoming);
> > +            thePrefsStructP->RdataP->splashScreen = bincoming;
> >              break;
> > 
> > Does this fix it? If so, I'll add to ck10.
> 
> That does indeed fix it. Just being nosy: what would the underlying
> problem be? To me, the change indicates a typecast that doesn't work as
> intended, even though bincoming seems to be exactly the boolean value
> the typecast was meant to produce.

The redundant bincoming and iincoming were added by me in ck9 to solve
this problem with preferences in general. NCSA never finished the code
that hooked up reading the preferences file to actually storing prefs in
memory, so when I turned it on, everything dereferenced a null pointer
and crashed. I added the redundant arguments so that for simple prefs a
simple value could be passed along directly (strings still need a pointer
of course) and there would be no messy mucking around, but I only did this
for the ones I needed to get running. Obviously I missed one, and I should
just do the rest of them for ck10 at the same time.

-- 
------------------------------------ personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckaiser at floodgap.com
-- Funk is its own reward. -- George Clinton ----------------------------------



More information about the Gopher-Project mailing list