Message ID | alpine.OSX.1.10.1510131620210.2649@sabyasg-mbp-02 |
---|---|
State | Rejected |
Headers | show |
This change will cause segfaults if anything ever reaches the end of a bucket.
> This change will cause segfaults if anything ever reaches the end of a > bucket. Oh, didn't realize that, but it seems to work fine in my setup. Just wondering how it works while initializing all_raw_instances. I'm curious how would it be different for _instances.
On Tue, Oct 13, 2015 at 06:38:57PM -0700, Sabyasachi Sengupta wrote: > > >This change will cause segfaults if anything ever reaches the end of a > >bucket. > > Oh, didn't realize that, but it seems to work fine in my setup. Just > wondering how it works while initializing all_raw_instances. I'm curious how > would it be different for _instances. I take it back. It is harmless, but it doesn't have any benefit.
I agree. Its just that this was the only place where hmap_node is initialized without the initializer macro.. --- Nuage Networks Business Unit, Alcatel-Lucent, 755 Ravendale Drive, Mountain View, CA, 94043 Mailstop: 1127, Ph: 1-650-623-3461 On Tue, 13 Oct 2015, Ben Pfaff wrote: > On Tue, Oct 13, 2015 at 06:38:57PM -0700, Sabyasachi Sengupta wrote: >> >>> This change will cause segfaults if anything ever reaches the end of a >>> bucket. >> >> Oh, didn't realize that, but it seems to work fine in my setup. Just >> wondering how it works while initializing all_raw_instances. I'm curious how >> would it be different for _instances. > > I take it back. It is harmless, but it doesn't have any benefit. >
diff --git a/build-aux/extract-ofp-msgs b/build-aux/extract-ofp-msgs index e4deecf..9dc9691 100755 --- a/build-aux/extract-ofp-msgs +++ b/build-aux/extract-ofp-msgs @@ -300,7 +300,7 @@ def extract_ofp_msgs(output_file_name): output.append("static struct raw_instance %s_instances[] = {" % raw.lower()) for hdrs in r['hdrs']: - output.append(" { {0, NULL}, {%d, %d, %d, 0x%x, %d}, %s, 0 }," + output.append(" { HMAP_NODE_NULL_INITIALIZER, {%d, %d, %d, 0x%x, %d}, %s, 0 }," % (hdrs + (raw,))) output.append("};")