[Swan-dev] NULL pointer initialization [was Re: Fwd: [Swan-commit] Changes to ref refs/heads/master]
Andrew Cagney
andrew.cagney at gmail.com
Mon Jul 16 12:40:21 UTC 2018
On Sat, 14 Jul 2018 at 02:00, D. Hugh Redelmeier <hugh at mimosa.com> wrote:
>
>
> | From: Andrew Cagney <andrew.cagney at gmail.com>
>
> | Subject: [Swan-dev] Fwd: [Swan-commit] Changes to ref refs/heads/master
>
> When replying to a commit message, please edit the Subject: to be useful.
If you know how to do this with my phone app, please let me know.
> | Hugh,
> | - ensure alg_info_ike and alg_info_esp fields are initialized to NULL
> | (initializing a pointer's raw memory to 0x00 is not guaranteed to initialize
> | the pointer to NULL)
>
> | You keep asserting this and I keep pointing out, from our POV, it
> | isn't true. Not even on an m68k with no VM.. Why?
>
> My POV is to follow the C standard where possible. The C standard does
> not provide the guarantee. Intentionally.
The systems we target do; so lets not make things harder than they already are.
> In this case, I moved two initializing assignments higher in the function.
I'm not troubled by the change, just by the constant assertion that
NULL is not zero.
More information about the Swan-dev
mailing list