From: Michael S. <msb...@me...> - 2010-10-07 01:14:24
|
FYI... If I recall correctly, what is happening in this section of the code is this: In REAL_ADDRESSING mode, the addresses in the VM (Mac OS) are the same as in the host system (e.g. Linux or Mac OS). The problem is Mac OS wants a low memory global area, which means it needs an allocation at address zero in the host address space. First it tries to allocate the entire RAM/ROM area starting at address zero in the host, assuming that it can arrange for the SheepShaver module to be loaded at some other address (HAVE_LINKER_SCRIPT). If that succeeds, we're in good shape. Otherwise, on Darwin (OS X) hosts it can use a trick to get around the problem (PAGEZERO_HACK). The auto-config is supposed to test if that works. The hack means it doesn't have to do a low memory allocation. If it can't do PAGEZERO_HACK then it tries to allocate just the small low memory area it needs, at zero. On some Linux systems, you must do sudo sysctl -w vm.mmap_min_addr=0 to allow it to allocate at address zero. But if you don't allow it, you should get an error, not a segv. And on non-OS X hosts, I can't figure out how it would work to not allocate the address zero block. On Oct 6, 2010, at 7:46 PM, Geoffrey Brown wrote: > sigsegv right after the gtk gui. I was able (barely) to step in gdb until > the crash occurred and if I recall correctly it was exactly at the point > of executing that ifdefed code. I was trying to build a fresh > checkout to see if my vhd stuff breaks on linux. Later, I > looked to see what had "changed" and found that diff. > > Geoffrey > > On Wed, Oct 6, 2010 at 8:42 PM, Alexei Svitkine > <ale...@gm...> wrote: >> How does it crash? >> >> -Alexei >> >> On Wed, Oct 6, 2010 at 8:35 PM, Geoffrey Brown <geo...@in...> wrote: >>> Ok, that's curious. The sources I was building on Linux previously >>> had this diff >>> >>> diff -r1.88 main_unix.cpp >>> 846c846 >>> < #if REAL_ADDRESSING && HAVE_LINKER_SCRIPT >>> --- >>>> #if REAL_ADDRESSING && HAVE_LINKER_SCRIPT && PAGEZERO_HACK >>> >>> But as you point out there doesn't seem to have been any activity on >>> this recently >>> so I'm not sure how I ended up with that diff -- I went to the web based cvs to >>> see if I could find the change and can't. >>> >>> In any case, without the "PAGEZERO_HACK' flag to make that #if false, things >>> bomb immediately on linux. Adding that "back" I can make forward progress. >>> I have no idea where that came from (a bug fix suggested on a forum?) >>> >>> So, maybe I need to configure for linux differently -- I've been doing >>> >>> ./configure --enable-sdl-audio --enable-sdl-video >>> >>> I'll try to figure out what is going on. >>> >>> Geoffrey >>> >>> >>> >>> >>> On Wed, Oct 6, 2010 at 8:09 PM, Alexei Svitkine >>> <ale...@gm...> wrote: >>>> Which change are you talking about? >>>> >>>> I don't see any recent activity around that part of main_unix.cpp... >>>> >>>> Which combination of macros does your config define that causes the problem? >>>> >>>> -Alexei >>>> >>>> On Wed, Oct 6, 2010 at 7:55 PM, Geoffrey Brown <geo...@in...> wrote: >>>>> The following change which was checked in to the repository causes >>>>> immediate segv on Linux >>>>> (Linux ... machine name elided .... .6.18-194.17.1.el5 #1 SMP Mon Sep >>>>> 20 07:16:16 EDT 2010 i686 i686 i386 GNU/Linux >>>>> >>>>> >>>>> RCS file: /home/cvs/cebix/SheepShaver/src/Unix/main_unix.cpp,v >>>>> retrieving revision 1.88 >>>>> diff -r1.88 main_unix.cpp >>>>> 846c846 >>>>> < #if REAL_ADDRESSING && HAVE_LINKER_SCRIPT >>>>> --- >>>>>> #if REAL_ADDRESSING && HAVE_LINKER_SCRIPT && PAGEZERO_HACK >>>>> >>>>> >>>>> Clearly that code was turned off previously >>>>> >>>>> Geoffrey >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Beautiful is writing same markup. Internet Explorer 9 supports >>>>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >>>>> Spend less time writing and rewriting code and more time creating great >>>>> experiences on the web. Be a part of the beta today. >>>>> http://p.sf.net/sfu/beautyoftheweb >>>>> _______________________________________________ >>>>> basilisk-devel mailing list >>>>> bas...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/basilisk-devel >>>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Beautiful is writing same markup. Internet Explorer 9 supports >>>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >>>> Spend less time writing and rewriting code and more time creating great >>>> experiences on the web. Be a part of the beta today. >>>> http://p.sf.net/sfu/beautyoftheweb >>>> _______________________________________________ >>>> basilisk-devel mailing list >>>> bas...@li... >>>> https://lists.sourceforge.net/lists/listinfo/basilisk-devel >>>> >>> >>> ------------------------------------------------------------------------------ >>> Beautiful is writing same markup. Internet Explorer 9 supports >>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >>> Spend less time writing and rewriting code and more time creating great >>> experiences on the web. Be a part of the beta today. >>> http://p.sf.net/sfu/beautyoftheweb >>> _______________________________________________ >>> basilisk-devel mailing list >>> bas...@li... >>> https://lists.sourceforge.net/lists/listinfo/basilisk-devel >>> >> >> ------------------------------------------------------------------------------ >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >> Spend less time writing and rewriting code and more time creating great >> experiences on the web. Be a part of the beta today. >> http://p.sf.net/sfu/beautyoftheweb >> _______________________________________________ >> basilisk-devel mailing list >> bas...@li... >> https://lists.sourceforge.net/lists/listinfo/basilisk-devel >> > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > basilisk-devel mailing list > bas...@li... > https://lists.sourceforge.net/lists/listinfo/basilisk-devel |