DragonFly bugs List (threaded) for 2007-01
DragonFly BSD
DragonFly bugs List (threaded) for 2007-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [issue524] Making world with gcc41?


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Jan 2007 10:48:25 -0800 (PST)

:Okay, I fixed it, lets go for some explanation first:
:
:The gpfault comes from vm86_bioscall(...) in init386().  The cause is tha=
:t the assembler code passes the struct vm86frame by value, i.e. simply cr=
:eating it on the stack.  This worked up to gcc34, but gcc41 now optimizes=
: stores to unused memory locations away, whis is allowed per the standard=
:s.  This led to an uninitialized stack frame which in turn panicked the b=
:ox.
:
:After some time of bug searching (qemu with gdbserver being *very* helpfu=
:l) it turns out that freebsd did have the same problem one month ago.  So=
:, the fix is the same:  pass structs by reference if you expect the calle=
:e to modify them.
:
:The attached patch does this.  It is quite a bit, but well, it needs to b=
:e done.  Gcc41 kernel boots fine now.  Best we get that in before release=
:=2E
:
:cheers
:  simon

    Oooohh... I've actually been wanting to do that for a while.

    Ok, please go ahead and commit it right now.

    But this WILL mean we can't branch today.  Not with that big a change.
    We will have to branch tomorrow.
      
						-Matt




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