Re: PATCH: bonobo-activation core dump on Solaris
- From: Laszlo PETER <Laszlo Peter ireland sun com>
- To: Darin Adler <darin bentspoon com>
- Cc: Gnome Components <gnome-components-list gnome org>
- Subject: Re: PATCH: bonobo-activation core dump on Solaris
- Date: Mon, 03 Dec 2001 13:42:05 +0000
Hi,
It works if there is at least one element in the initialiser, but not
with "{}". I don't know if there's anything specific to this case in
the standard, but I'll check with the Forte team.
Anyway it's not that bad because I get a warning message (empty initializer).
I grepped for this in my build logs and there were only 16 occurrances.
I can submit patches for all of them.
Laca
Darin Adler wrote:
>
> On 11/30/01 11:27 AM, "Laszlo PETER" <Laszlo Peter ireland sun com> wrote:
>
> > The initialisation below is not valid using the Forte C compiler. The
> > structure remains uninitialised and causes bonobo-activation to core dump.
>
> This is going to be a non-trivial problem. The C-standard-required behavior,
> where structure fields get zeroed out if they aren't mentioned, is something
> we rely on in a number of other places in Gnome.
>
> The wording from the C standard is this, "If there are fewer initializers in
> a brace-enclosed list than there are elements or members of an aggregate, or
> fewer characters in a string literal used to initialize an array of known
> size than there are elements in the array, the remainder of the aggregate
> shall be initialized implicitly the same as objects that have static storage
> duration."
>
> And "same as objects that have static storage duration" essentially means
> "zero everything out".
>
> I'm not sure how many places in Gnome this comes up, but I know that I've
> relied on this behavior more than 20 times since I've worked on Gnome.
>
> -- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]