ZFS patches for FreeBSD.

Bruce Evans bde at zeta.org.au
Fri Nov 17 02:08:19 PST 2006


On Thu, 16 Nov 2006, Jung-uk Kim wrote:

> On Thursday 16 November 2006 02:15 pm, Andriy Gapon wrote:
>> Hmm, I saw errors like this with some other 3rd party kernel module
>> when its sources had constructs like:
>>
>> struct some_struct s = {0};
>>
>> Changing the above initialization to explicit bzero() call helped
>> in that case, but I think that there should be some compiler flags
>> or something to handle this.
>
> AFAIK, there was no way to handle this GCC bug with compiler flags.
> '-ffreestanding' should prevent this to happen but it does not.  As
> Max Laier pointed out, it was discussed long time ago.  Bruce Evans
> had good analysis on this issue, too.

Source code that triggers this bug might be broken anyway.  gcc should
only call a function to do the zeroing for large structs, but large
structs might be too large for the kernel stack.

Bruce


More information about the freebsd-current mailing list